dungeon_crawler
diff prototype/Makefile.in @ 28:f5fb04fe12cd
moved compiler detection to the configure script
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 25 Aug 2012 20:20:56 +0300 |
parents | prototype/Makefile@527fede30057 |
children | 862461b686f4 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/prototype/Makefile.in Sat Aug 25 20:20:56 2012 +0300 1.3 @@ -0,0 +1,36 @@ 1.4 +csrc = $(wildcard src/*.c) $(wildcard vmath/*.c) $(wildcard drawtext/*.c) 1.5 +ccsrc = $(wildcard src/*.cc) $(wildcard vmath/*.cc) 1.6 +obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) 1.7 +dep = $(obj:.o=.d) 1.8 +bin = proto 1.9 + 1.10 +warn = -Wall -Wno-format-extra-args -Wno-char-subscripts 1.11 + 1.12 +inc = -I. -Ivmath -Idrawtext `pkg-config --cflags freetype2` 1.13 + 1.14 +CFLAGS = -pedantic $(warn) $(dbg) $(opt) $(inc) 1.15 +CXXFLAGS = $(CFLAGS) $(cxx11_cflags) 1.16 +LDFLAGS = $(cxx11_ldflags) $(libgl) -lm -lassimp -limago `pkg-config --libs freetype2` 1.17 + 1.18 +ifeq ($(shell uname -s), Darwin) 1.19 + libgl = -framework OpenGL -framework GLUT -lglew 1.20 +else 1.21 + libgl = -lGL -lGLU -lglut -lGLEW 1.22 +endif 1.23 + 1.24 +$(bin): $(obj) Makefile 1.25 + $(CXX) -o $@ $(obj) $(LDFLAGS) 1.26 + 1.27 +-include $(dep) 1.28 + 1.29 +%.d: %.c 1.30 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.31 + 1.32 +%.d: %.cc 1.33 + @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.34 + 1.35 +.PHONY: clean 1.36 +clean: 1.37 + rm -f $(obj) $(bin) $(dep) 1.38 + 1.39 +include build/macapp.mk