dungeon_crawler
view prototype/Makefile @ 10:22562582c82d
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 18 Aug 2012 03:47:13 +0300 |
parents | 96de911d05d4 |
children | e5567ddbf2ef |
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 -lassimp
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)
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)