cloth
diff Makefile @ 0:92983e143a03
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 11 Feb 2013 19:40:36 +0200 |
parents | |
children | 2eac424f58b2 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Mon Feb 11 19:40:36 2013 +0200 1.3 @@ -0,0 +1,25 @@ 1.4 +src = $(wildcard src/*.cc) 1.5 +obj = $(src:.cc=.o) 1.6 +dep = $(obj:.o=.d) 1.7 +bin = cloth 1.8 + 1.9 +CXXFLAGS = -pedantic -Wall -g 1.10 +LDFLAGS = $(libgl) -limago -lvmath 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) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ 1.25 + 1.26 +.PHONY: clean 1.27 +clean: 1.28 + rm -f $(obj) $(bin)