intravenous

view Makefile @ 2:472c28b8b875

I think I pretty much nailed the camera
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 21 Apr 2012 23:03:36 +0300
parents
children 2723dc026c4f
line source
1 csrc = $(wildcard src/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
5 bin = intrav
7 CFLAGS = -pedantic -Wall -g -I/usr/local/include $(add_inc)
8 CXXFLAGS = -std=c++0x $(CFLAGS)
9 LDFLAGS = -L/usr/local/lib $(add_lib) $(libgl) $(libal) -lm -lvmath -limago
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 add_inc += -I/opt/local/include
14 add_lib += -L/opt/local/lib
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)