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