intravenous

annotate Makefile @ 6:2723dc026c4f

collision detection
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 23 Apr 2012 21:43:10 +0300
parents 2b30f261f641
children
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@6 12 CC = clang
nuclear@6 13 CXX = clang++
nuclear@0 14 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 15 add_inc += -I/opt/local/include
nuclear@0 16 add_lib += -L/opt/local/lib
nuclear@0 17 else
nuclear@0 18 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 19 endif
nuclear@0 20
nuclear@0 21 $(bin): $(obj)
nuclear@0 22 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 23
nuclear@0 24 -include $(dep)
nuclear@0 25
nuclear@0 26 %.d: %.c
nuclear@0 27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 28
nuclear@0 29 %.d: %.cc
nuclear@0 30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@0 31
nuclear@0 32 .PHONY: clean
nuclear@0 33 clean:
nuclear@0 34 rm -f $(obj) $(bin) $(dep)