dungeon_crawler

view prototype/Makefile @ 22:7b65bba15553

minor
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 21 Aug 2012 06:34:14 +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