dungeon_crawler

annotate prototype/Makefile @ 15:3a3236a4833c

adding shaders and renderer abstraction
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 19 Aug 2012 23:09:30 +0300
parents e95462632f9a
children d98240a13793
rev   line source
nuclear@1 1 csrc = $(wildcard src/*.c) $(wildcard vmath/*.c)
nuclear@1 2 ccsrc = $(wildcard src/*.cc) $(wildcard vmath/*.cc)
nuclear@1 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@1 4 dep = $(obj:.o=.d)
nuclear@1 5 bin = proto
nuclear@1 6
nuclear@1 7 CFLAGS = -pedantic -Wall -g -Ivmath
nuclear@5 8 CXXFLAGS = $(CFLAGS) -std=c++11
nuclear@14 9 LDFLAGS = $(libgl) -lm -lassimpD -limago
nuclear@1 10
nuclear@1 11 ifeq ($(shell uname -s), Darwin)
nuclear@1 12 libgl = -framework OpenGL -framework GLUT -lglew
nuclear@1 13 else
nuclear@1 14 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@1 15 endif
nuclear@1 16
nuclear@14 17 $(bin): $(obj) Makefile
nuclear@1 18 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@1 19
nuclear@1 20 -include $(dep)
nuclear@1 21
nuclear@1 22 %.d: %.c
nuclear@1 23 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 24
nuclear@1 25 %.d: %.cc
nuclear@1 26 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 27
nuclear@1 28 .PHONY: clean
nuclear@1 29 clean:
nuclear@1 30 rm -f $(obj) $(bin) $(dep)
nuclear@12 31
nuclear@12 32 include build/macapp.mk