cloth
annotate Makefile @ 2:2eac424f58b2
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 12 Feb 2013 00:23:40 +0200 |
parents | 92983e143a03 |
children |
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@2 | 6 CXXFLAGS = -std=c++11 -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) |