dungeon_crawler
annotate prototype/Makefile @ 23:fa8f89d06f6f
progress with light rendering
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 23 Aug 2012 00:10:10 +0300 |
parents | d98240a13793 |
children | e122ba214ee1 |
rev | line source |
---|---|
nuclear@1 | 1 csrc = $(wildcard src/*.c) $(wildcard vmath/*.c) |
nuclear@1 | 2 ccsrc = $(wildcard src/*.cc) $(wildcard vmath/*.cc) |
nuclear@1 | 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) |
nuclear@1 | 4 dep = $(obj:.o=.d) |
nuclear@1 | 5 bin = proto |
nuclear@1 | 6 |
nuclear@17 | 7 #opt = -O3 |
nuclear@17 | 8 dbg = -g |
nuclear@17 | 9 warn = -Wall -Wno-format-extra-args -Wno-char-subscripts |
nuclear@17 | 10 |
nuclear@17 | 11 CFLAGS = -pedantic $(warn) $(dbg) $(opt) -Ivmath |
nuclear@5 | 12 CXXFLAGS = $(CFLAGS) -std=c++11 |
nuclear@23 | 13 LDFLAGS = $(libgl) -lm -lassimp -limago |
nuclear@1 | 14 |
nuclear@1 | 15 ifeq ($(shell uname -s), Darwin) |
nuclear@1 | 16 libgl = -framework OpenGL -framework GLUT -lglew |
nuclear@1 | 17 else |
nuclear@1 | 18 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@1 | 19 endif |
nuclear@1 | 20 |
nuclear@14 | 21 $(bin): $(obj) Makefile |
nuclear@1 | 22 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@1 | 23 |
nuclear@1 | 24 -include $(dep) |
nuclear@1 | 25 |
nuclear@1 | 26 %.d: %.c |
nuclear@1 | 27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 28 |
nuclear@1 | 29 %.d: %.cc |
nuclear@1 | 30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@1 | 31 |
nuclear@1 | 32 .PHONY: clean |
nuclear@1 | 33 clean: |
nuclear@1 | 34 rm -f $(obj) $(bin) $(dep) |
nuclear@12 | 35 |
nuclear@12 | 36 include build/macapp.mk |