bloboland
diff Makefile @ 3:a39c301cdcce
terrain raytracing pretty much done
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 16 Dec 2012 14:24:16 +0200 |
parents | 1757973feaed |
children |
line diff
1.1 --- a/Makefile Sun Dec 16 00:37:35 2012 +0200 1.2 +++ b/Makefile Sun Dec 16 14:24:16 2012 +0200 1.3 @@ -1,11 +1,13 @@ 1.4 -src = $(wildcard src/*.cc) 1.5 -obj = $(src:.cc=.o) 1.6 +csrc = $(wildcard src/*.c) 1.7 +ccsrc = $(wildcard src/*.cc) 1.8 +obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) 1.9 dep = $(obj:.o=.d) 1.10 bin = blobo 1.11 1.12 opt = -O3 -ffast-math 1.13 dbg = -g 1.14 1.15 +CFLAGS = -pedantic -Wall $(opt) $(dbg) 1.16 CXXFLAGS = -ansi -pedantic -Wall $(opt) $(dbg) 1.17 LDFLAGS = $(libgl) -lvmath -limago 1.18 1.19 @@ -20,8 +22,11 @@ 1.20 1.21 -include $(dep) 1.22 1.23 +%.d: %.c 1.24 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.25 + 1.26 %.d: %.cc 1.27 - @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.28 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.29 1.30 .PHONY: clean 1.31 clean: