imtk

diff Makefile @ 14:df2bc9406561

added gradients
author John Tsiombikas <nuclear@siggraph.org>
date Tue, 19 Apr 2011 03:01:46 +0300
parents 1b27a69603ac
children 737e9047d9c9
line diff
     1.1 --- a/Makefile	Mon Apr 18 06:15:46 2011 +0300
     1.2 +++ b/Makefile	Tue Apr 19 03:01:46 2011 +0300
     1.3 @@ -1,5 +1,6 @@
     1.4  src = $(wildcard *.c src/*.c)
     1.5  obj = $(src:.c=.o)
     1.6 +depfiles = $(obj:.o=.d)
     1.7  bin = test
     1.8  
     1.9  CC = gcc
    1.10 @@ -15,6 +16,15 @@
    1.11  $(bin): $(obj)
    1.12  	$(CC) -o $@ $(obj) $(LDFLAGS)
    1.13  
    1.14 +-include $(depfiles)
    1.15 +
    1.16 +%.d: %.c
    1.17 +	@$(CPP) $(CFLAGS) -MM -MT $(@:.d=.o) $< >$@
    1.18 +
    1.19  .PHONY: clean
    1.20  clean:
    1.21  	rm -f $(obj) $(bin)
    1.22 +
    1.23 +.PHONY: cleandep
    1.24 +cleandep:
    1.25 +	rm -f $(depfiles)