dbf-udg

view Makefile @ 9:7056437a361b

added demosys
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 19 Feb 2013 18:17:17 +0200
parents e09cbb2e9d4f
children 1abbed71e9c9
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 = udg
9 CFLAGS = -pedantic -Wall -g -O3 -Ilibs/metasurf -Ilibs/dsys2
10 CXXFLAGS = -std=c++11 $(CFLAGS)
11 LDFLAGS = $(libgl) -limago -lvmath
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) $(bin) $(dep)