# Mono compiler and runtime for C-sharp:
# compiler = /usr/users/wwwifa/docs/subatom/nucltheo/bin/mcs
# runtime = /usr/users/wwwifa/docs/subatom/nucltheo/bin/mono

# Pnet compiler and runtime for C-sharp:
compiler = /usr/users/wwwifa/docs/subatom/nucltheo/bin/cscc
runtime = /usr/users/wwwifa/docs/subatom/nucltheo/bin/ilrun

comma:=,
empty:=
space:=$(empty) $(empty)

# a default rule to compile .cs file into a .dll file:
%.dll: %.cs
	$(compiler) $*.cs /target:library /out:$*.dll

dlls = strata.dll
refs = $(subst $(space),$(comma),$(dlls))

main.exe: main.cs $(dlls) makefile
	$(compiler) main.cs /reference:$(refs)
	$(runtime) main.exe > out
	cat out

clean:
	rm -f $(dlls) *.exe core* out
