dbf-udg
annotate Makefile @ 14:5be16862d1b5
minor makefile modifications
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 20 Feb 2013 05:54:36 +0200 |
parents | 6a836b1dc31b |
children |
rev | line source |
---|---|
nuclear@5 | 1 csrc = $(wildcard src/*.c) \ |
nuclear@9 | 2 $(wildcard libs/metasurf/*.c) \ |
nuclear@9 | 3 $(wildcard libs/dsys2/*.c) |
nuclear@0 | 4 ccsrc = $(wildcard src/*.cc) |
nuclear@0 | 5 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) |
nuclear@0 | 6 dep = $(obj:.o=.d) |
nuclear@13 | 7 bin = printblobs |
nuclear@0 | 8 |
nuclear@14 | 9 CFLAGS = -pedantic -Wall -g -O3 -ffast-math -Ilibs/metasurf -Ilibs/dsys2 |
nuclear@12 | 10 CXXFLAGS = $(CFLAGS) |
nuclear@12 | 11 LDFLAGS = $(libgl) |
nuclear@0 | 12 |
nuclear@0 | 13 ifeq ($(shell uname -s), Darwin) |
nuclear@0 | 14 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 15 else |
nuclear@0 | 16 libgl = -lGL -lGLU -lglut -lGLEW |
nuclear@0 | 17 endif |
nuclear@0 | 18 |
nuclear@0 | 19 $(bin): $(obj) |
nuclear@0 | 20 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 21 |
nuclear@0 | 22 -include $(dep) |
nuclear@0 | 23 |
nuclear@0 | 24 %.d: %.c |
nuclear@0 | 25 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 26 |
nuclear@0 | 27 %.d: %.cc |
nuclear@0 | 28 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 29 |
nuclear@0 | 30 .PHONY: clean |
nuclear@0 | 31 clean: |
nuclear@14 | 32 rm -f $(obj) $(dep) |