foo
[deeprace] / GNUmakefile
index f62772a..e794f22 100644 (file)
@@ -10,12 +10,14 @@ def = -DMINIGLUT_USE_LIBC
 inc = -Ilibs -Ilibs/imago -Ilibs/treestor/include -Ilibs/goat3d/include
 libs = libs/unix/imago.a libs/unix/goat3d.a libs/unix/treestor.a
 
-CFLAGS = $(warn) $(dbg) $(opt) $(inc) $(def)
+CFLAGS = $(warn) $(dbg) $(opt) $(inc) $(def) -MMD
 LDFLAGS = $(libs) -lGL -lGLU -lX11 -lm
 
 $(bin): $(obj) libs
        $(CC) -o $@ $(obj) $(LDFLAGS)
 
+-include $(dep)
+
 .c.o:
        $(CC) $(CFLAGS) -c $< -o $@
 
@@ -23,6 +25,10 @@ $(bin): $(obj) libs
 clean:
        rm -f $(obj) $(bin)
 
+.PHONY: cleandep
+cleandep:
+       rm -f $(dep)
+
 .PHONY: libs
 libs:
        $(MAKE) -C libs