bloboland
diff Makefile @ 0:e4818a3300b9
bloboland initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 15 Dec 2012 07:52:13 +0200 |
parents | |
children | cfe68befb7cc |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Sat Dec 15 07:52:13 2012 +0200 1.3 @@ -0,0 +1,29 @@ 1.4 +src = $(wildcard src/*.cc) 1.5 +obj = $(src:.cc=.o) 1.6 +dep = $(obj:.o=.d) 1.7 +bin = blobo 1.8 + 1.9 +CXXFLAGS = -ansi -pedantic -Wall -g 1.10 +LDFLAGS = $(libgl) 1.11 + 1.12 +ifeq ($(shell uname -s), Darwin) 1.13 + libgl = -framework OpenGL -framework GLUT -lGLEW 1.14 +else 1.15 + libgl = -lGL -lGLU -lglut -lGLEW 1.16 +endif 1.17 + 1.18 +$(bin): $(obj) 1.19 + $(CXX) -o $@ $(obj) $(LDFLAGS) 1.20 + 1.21 +-include $(dep) 1.22 + 1.23 +%.d: %.cc 1.24 + @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.25 + 1.26 +.PHONY: clean 1.27 +clean: 1.28 + rm -f $(obj) $(bin) 1.29 + 1.30 +.PHONY: cleandep 1.31 +cleandep: 1.32 + rm -f $(dep)