tavli

annotate Makefile @ 2:893192aea099

board keeps objects instead of raw meshes
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 22 Jun 2015 05:15:39 +0300
parents 52e0dd47753b
children a0d30f6f20d4
rev   line source
nuclear@0 1 PREFIX ?= /usr/local
nuclear@0 2
nuclear@0 3 src = $(wildcard src/*.cc)
nuclear@0 4 obj = $(src:.cc=.o)
nuclear@0 5
nuclear@0 6 bin = tavli
nuclear@0 7
nuclear@0 8 CXXFLAGS = -pedantic -Wall -g
nuclear@1 9 LDFLAGS = $(libgl) -lvmath -limago -lm -lpthread
nuclear@0 10
nuclear@0 11 ifeq ($(shell uname -s), Darwin)
nuclear@0 12 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@0 13 else
nuclear@0 14 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@0 15 endif
nuclear@0 16
nuclear@0 17 $(bin): $(obj)
nuclear@0 18 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 19
nuclear@0 20 .PHONY: clean
nuclear@0 21 clean:
nuclear@0 22 rm -f $(obj) $(bin)
nuclear@0 23
nuclear@0 24 .PHONY: install
nuclear@0 25 install: $(bin)
nuclear@0 26 mkdir -p $(PREFIX)/bin
nuclear@0 27 cp $(bin) $(PREFIX)/bin/$(bin)
nuclear@0 28
nuclear@0 29 .PHONY: uninstall
nuclear@0 30 uninstall:
nuclear@0 31 rm -f $(PREFIX)/bin/$(bin)