intravenous

annotate Makefile @ 4:c6a6a64df6de

normalmap
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 22 Apr 2012 05:20:03 +0300
parents
children 2723dc026c4f
rev   line source
nuclear@0 1 csrc = $(wildcard src/*.c)
nuclear@0 2 ccsrc = $(wildcard src/*.cc)
nuclear@0 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@0 4 dep = $(obj:.o=.d)
nuclear@0 5 bin = intrav
nuclear@0 6
nuclear@0 7 CFLAGS = -pedantic -Wall -g -I/usr/local/include $(add_inc)
nuclear@0 8 CXXFLAGS = -std=c++0x $(CFLAGS)
nuclear@0 9 LDFLAGS = -L/usr/local/lib $(add_lib) $(libgl) $(libal) -lm -lvmath -limago
nuclear@0 10
nuclear@0 11 ifeq ($(shell uname -s), Darwin)
nuclear@0 12 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 13 add_inc += -I/opt/local/include
nuclear@0 14 add_lib += -L/opt/local/lib
nuclear@0 15 else
nuclear@0 16 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 17 endif
nuclear@0 18
nuclear@0 19 $(bin): $(obj)
nuclear@0 20 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 21
nuclear@0 22 -include $(dep)
nuclear@0 23
nuclear@0 24 %.d: %.c
nuclear@0 25 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 26
nuclear@0 27 %.d: %.cc
nuclear@0 28 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 29
nuclear@0 30 .PHONY: clean
nuclear@0 31 clean:
nuclear@0 32 rm -f $(obj) $(bin) $(dep)