intravenous
view Makefile @ 10:8fbdc6f84f64
fixed after the change in vmath
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 31 May 2013 01:30:14 +0300 |
parents | 2b30f261f641 |
children |
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 CC = clang
13 CXX = clang++
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 add_inc += -I/opt/local/include
16 add_lib += -L/opt/local/lib
17 else
18 libgl = -lGL -lGLU -lglut -lGLEW
19 endif
21 $(bin): $(obj)
22 $(CXX) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.c
27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 %.d: %.cc
30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
32 .PHONY: clean
33 clean:
34 rm -f $(obj) $(bin) $(dep)