dungeon_crawler

view prototype/Makefile @ 1:96de911d05d4

started a rough prototype
author John Tsiombikas <nuclear@mutantstargoat.com>
date Thu, 28 Jun 2012 06:05:50 +0300
parents
children 252a00508411
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)
9 LDFLAGS = $(libgl) -lm
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)