dbf-udg

view Makefile @ 12:1abbed71e9c9

cleanup, copyright statements and notices, readme files
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 20 Feb 2013 05:45:27 +0200
parents 7056437a361b
children 6a836b1dc31b
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 = $(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) $(bin) $(dep)