dungeon_crawler

view prototype/Makefile @ 16:91180ee7b7d9

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 20 Aug 2012 03:40:51 +0300
parents e95462632f9a
children d98240a13793
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 CFLAGS = -pedantic -Wall -g -Ivmath
8 CXXFLAGS = $(CFLAGS) -std=c++11
9 LDFLAGS = $(libgl) -lm -lassimpD -limago
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lglew
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 $(bin): $(obj) Makefile
18 $(CXX) -o $@ $(obj) $(LDFLAGS)
20 -include $(dep)
22 %.d: %.c
23 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
25 %.d: %.cc
26 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
28 .PHONY: clean
29 clean:
30 rm -f $(obj) $(bin) $(dep)
32 include build/macapp.mk