tavli
view Makefile @ 0:52e0dd47753b
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 21 Jun 2015 06:30:39 +0300 |
parents | |
children | 3fcd7b4d631f |
line source
1 PREFIX ?= /usr/local
3 src = $(wildcard src/*.cc)
4 obj = $(src:.cc=.o)
6 bin = tavli
8 CXXFLAGS = -pedantic -Wall -g
9 LDFLAGS = $(libgl)
11 ifeq ($(shell uname -s), Darwin)
12 libgl = -framework OpenGL -framework GLUT -lGLEW
13 else
14 libgl = -lGL -lGLU -lglut -lGLEW
15 endif
17 $(bin): $(obj)
18 $(CXX) -o $@ $(obj) $(LDFLAGS)
20 .PHONY: clean
21 clean:
22 rm -f $(obj) $(bin)
24 .PHONY: install
25 install: $(bin)
26 mkdir -p $(PREFIX)/bin
27 cp $(bin) $(PREFIX)/bin/$(bin)
29 .PHONY: uninstall
30 uninstall:
31 rm -f $(PREFIX)/bin/$(bin)