X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=gph-cmath;a=blobdiff_plain;f=test%2FMakefile;h=4c8e22ab97bf73c2ece0f354cbabf3c3485351cc;hp=c23e3f14a10ffe7e3c8e337a3e935091cdb7136e;hb=28ac94545d140161b5a772b7436f176bbbde3802;hpb=dfee2f96f3b783e0f84582f70cfa506114bd26af diff --git a/test/Makefile b/test/Makefile index c23e3f1..4c8e22a 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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)