clray

diff Makefile @ 12:85fd61f374d9

fixed the bloody intersection bug
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 03 Aug 2010 13:06:59 +0100
parents deaf85acf6af
children 407935b73af3
line diff
     1.1 --- a/Makefile	Sat Jul 31 22:23:57 2010 +0100
     1.2 +++ b/Makefile	Tue Aug 03 13:06:59 2010 +0100
     1.3 @@ -1,5 +1,6 @@
     1.4  src = $(wildcard src/*.cc)
     1.5  obj = $(src:.cc=.o)
     1.6 +dep = $(obj:.o=.d)
     1.7  bin = test
     1.8  
     1.9  CXX = g++
    1.10 @@ -17,6 +18,11 @@
    1.11  $(bin): $(obj)
    1.12  	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.13  
    1.14 +-include $(dep)
    1.15 +
    1.16 +%.d: %.cc
    1.17 +	@$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@
    1.18 +
    1.19  .PHONY: clean
    1.20  clean:
    1.21 -	rm -f $(obj) $(bin)
    1.22 +	rm -f $(obj) $(bin) $(dep)