tavli
view Makefile @ 10:fc5c68da7906
added readme and license
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 26 Jun 2015 05:41:18 +0300 |
parents | 3fcd7b4d631f |
children | b1a195c3ee16 |
line source
1 PREFIX ?= /usr/local
3 src = $(wildcard src/*.cc)
4 obj = $(src:.cc=.o)
5 dep = $(obj:.o=.d)
7 bin = tavli
9 CXXFLAGS = -pedantic -Wall -g
10 LDFLAGS = $(libgl) -lvmath -limago -lm -lpthread
12 ifeq ($(shell uname -s), Darwin)
13 libgl = -framework OpenGL -framework GLUT -lGLEW
14 else
15 libgl = -lGL -lGLU -lglut -lGLEW
16 endif
18 $(bin): $(obj)
19 $(CXX) -o $@ $(obj) $(LDFLAGS)
21 -include $(dep)
23 %.d: %.cc
24 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
26 .PHONY: clean
27 clean:
28 rm -f $(obj) $(bin)
30 .PHONY: cleandep
31 cleandep:
32 rm -f $(dep)
34 .PHONY: install
35 install: $(bin)
36 mkdir -p $(PREFIX)/bin
37 cp $(bin) $(PREFIX)/bin/$(bin)
39 .PHONY: uninstall
40 uninstall:
41 rm -f $(PREFIX)/bin/$(bin)