cloth
annotate Makefile @ 0:92983e143a03
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 11 Feb 2013 19:40:36 +0200 |
parents | |
children | 2eac424f58b2 |
rev | line source |
---|---|
nuclear@0 | 1 src = $(wildcard src/*.cc) |
nuclear@0 | 2 obj = $(src:.cc=.o) |
nuclear@0 | 3 dep = $(obj:.o=.d) |
nuclear@0 | 4 bin = cloth |
nuclear@0 | 5 |
nuclear@0 | 6 CXXFLAGS = -pedantic -Wall -g |
nuclear@0 | 7 LDFLAGS = $(libgl) -limago -lvmath |
nuclear@0 | 8 |
nuclear@0 | 9 ifeq ($(shell uname -s), Darwin) |
nuclear@0 | 10 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 11 else |
nuclear@0 | 12 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@0 | 13 endif |
nuclear@0 | 14 |
nuclear@0 | 15 $(bin): $(obj) |
nuclear@0 | 16 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 17 |
nuclear@0 | 18 -include $(dep) |
nuclear@0 | 19 |
nuclear@0 | 20 %.d: %.cc |
nuclear@0 | 21 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 22 |
nuclear@0 | 23 .PHONY: clean |
nuclear@0 | 24 clean: |
nuclear@0 | 25 rm -f $(obj) $(bin) |