CSC = mcs
ILRUN = mono
lib = nm.dll

files = \
	complex.cs\
	vector.cs\
	matrix.cs\
	linalg.cs\

all: $(lib)

$(lib) : $(files)
	$(CSC) $^ -target:library -out:$@

clean: clean-lib clean-test

clean-lib:
	rm -f $(lib)

clean-test:
	rm -f test.exe

test: test.exe
	$(ILRUN) $<

test.exe: test.cs $(lib)
	$(CSC) $< -target:exe -out:$@ -reference:$(lib)
