coeng

diff Makefile @ 8:8cce82794f90

seems to work nicely
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 15 Feb 2015 05:14:20 +0200
parents 2f872a179914
children 49fdb15f1100
line diff
     1.1 --- a/Makefile	Sat Feb 14 10:08:00 2015 +0200
     1.2 +++ b/Makefile	Sun Feb 15 05:14:20 2015 +0200
     1.3 @@ -1,5 +1,6 @@
     1.4 +csrc = $(wildcard src/*.c)
     1.5  ccsrc = $(wildcard src/*.cc)
     1.6 -obj = $(ccsrc:.cc=.o)
     1.7 +obj = $(ccsrc:.cc=.o) $(csrc:.c=.o)
     1.8  dep = $(obj:.o=.d)
     1.9  bin = test
    1.10  
    1.11 @@ -21,6 +22,9 @@
    1.12  
    1.13  -include $(dep)
    1.14  
    1.15 +%.d: %.c
    1.16 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.17 +
    1.18  %.d: %.cc
    1.19  	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.20