tavli

annotate Makefile @ 21:c3fbf9616dbd

slot bounds, and ray testing
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 02 Jul 2015 00:01:39 +0300
parents a0d30f6f20d4
children
rev   line source
nuclear@0 1 PREFIX ?= /usr/local
nuclear@0 2
nuclear@0 3 src = $(wildcard src/*.cc)
nuclear@15 4 csrc = $(wildcard src/*.c)
nuclear@15 5 obj = $(src:.cc=.o) $(csrc:.c=.o)
nuclear@6 6 dep = $(obj:.o=.d)
nuclear@0 7
nuclear@0 8 bin = tavli
nuclear@0 9
nuclear@15 10 CFLAGS = -pedantic -Wall -g
nuclear@0 11 CXXFLAGS = -pedantic -Wall -g
nuclear@1 12 LDFLAGS = $(libgl) -lvmath -limago -lm -lpthread
nuclear@0 13
nuclear@0 14 ifeq ($(shell uname -s), Darwin)
nuclear@0 15 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 16 else
nuclear@0 17 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 18 endif
nuclear@0 19
nuclear@0 20 $(bin): $(obj)
nuclear@0 21 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 22
nuclear@6 23 -include $(dep)
nuclear@6 24
nuclear@15 25 %.d: %.c
nuclear@15 26 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@15 27
nuclear@6 28 %.d: %.cc
nuclear@6 29 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@6 30
nuclear@0 31 .PHONY: clean
nuclear@0 32 clean:
nuclear@0 33 rm -f $(obj) $(bin)
nuclear@0 34
nuclear@6 35 .PHONY: cleandep
nuclear@6 36 cleandep:
nuclear@6 37 rm -f $(dep)
nuclear@6 38
nuclear@0 39 .PHONY: install
nuclear@0 40 install: $(bin)
nuclear@0 41 mkdir -p $(PREFIX)/bin
nuclear@0 42 cp $(bin) $(PREFIX)/bin/$(bin)
nuclear@0 43
nuclear@0 44 .PHONY: uninstall
nuclear@0 45 uninstall:
nuclear@0 46 rm -f $(PREFIX)/bin/$(bin)