fixed inverse and submatrix, now testing identical to gmath
[gph-cmath] / test / Makefile
index c23e3f1..4c8e22a 100644 (file)
@@ -1,4 +1,5 @@
 obj = test.o
+dep = $(obj:.o=.d)
 bin = test
 
 CXXFLAGS = -pedantic -Wall -g -I../src
@@ -7,6 +8,15 @@ LDFLAGS = -lgmath -lm
 $(bin): $(obj)
        $(CXX) -o $@ $(obj) $(LDFLAGS)
 
+-include $(dep)
+
+%.d: %.cc
+       @$(CXX) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
+
 .PHONY: clean
 clean:
        rm -f $(obj) $(bin)
+
+.PHONY: cleandep
+cleandep:
+       rm -f $(dep)