dungeon_crawler
annotate prototype/Makefile @ 12:e95462632f9a
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 19 Aug 2012 05:35:00 +0300 |
parents | e5567ddbf2ef |
children | 67ae9fcb802c |
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@11 | 9 LDFLAGS = $(libgl) -lm -lassimp -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@1 | 17 $(bin): $(obj) |
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 |