dbf-udg

view 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
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard libs/metasurf/*.c) \
3 $(wildcard libs/dsys2/*.c)
4 ccsrc = $(wildcard src/*.cc)
5 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
6 dep = $(obj:.o=.d)
7 bin = printblobs
9 CFLAGS = -pedantic -Wall -g -O3 -ffast-math -Ilibs/metasurf -Ilibs/dsys2
10 CXXFLAGS = $(CFLAGS)
11 LDFLAGS = $(libgl)
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 else
16 libgl = -lGL -lGLU -lglut -lGLEW
17 endif
19 $(bin): $(obj)
20 $(CXX) -o $@ $(obj) $(LDFLAGS)
22 -include $(dep)
24 %.d: %.c
25 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
27 %.d: %.cc
28 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(dep)