dbf-udg

view Makefile @ 7:603656331514

phong blobs
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 18 Feb 2013 05:44:17 +0200
parents 2d27bfd21fc5
children 7056437a361b
line source
1 csrc = $(wildcard src/*.c) \
2 $(wildcard libs/metasurf/*.c)
3 ccsrc = $(wildcard src/*.cc)
4 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
5 dep = $(obj:.o=.d)
6 bin = udg
8 CFLAGS = -pedantic -Wall -g -O3 -Ilibs/metasurf
9 CXXFLAGS = -std=c++11 $(CFLAGS)
10 LDFLAGS = $(libgl) -limago -lvmath
12 ifeq ($(shell uname -s), Darwin)
13 libgl = -framework OpenGL -framework GLUT -lGLEW
14 else
15 libgl = -lGL -lGLU -lglut -lGLEW
16 endif
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.c
24 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 %.d: %.cc
27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 .PHONY: clean
30 clean:
31 rm -f $(obj) $(bin) $(dep)