tavli
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/Makefile Sun Jun 21 06:30:39 2015 +0300 1.3 @@ -0,0 +1,31 @@ 1.4 +PREFIX ?= /usr/local 1.5 + 1.6 +src = $(wildcard src/*.cc) 1.7 +obj = $(src:.cc=.o) 1.8 + 1.9 +bin = tavli 1.10 + 1.11 +CXXFLAGS = -pedantic -Wall -g 1.12 +LDFLAGS = $(libgl) 1.13 + 1.14 +ifeq ($(shell uname -s), Darwin) 1.15 + libgl = -framework OpenGL -framework GLUT -lGLEW 1.16 +else 1.17 + libgl = -lGL -lGLU -lglut -lGLEW 1.18 +endif 1.19 + 1.20 +$(bin): $(obj) 1.21 + $(CXX) -o $@ $(obj) $(LDFLAGS) 1.22 + 1.23 +.PHONY: clean 1.24 +clean: 1.25 + rm -f $(obj) $(bin) 1.26 + 1.27 +.PHONY: install 1.28 +install: $(bin) 1.29 + mkdir -p $(PREFIX)/bin 1.30 + cp $(bin) $(PREFIX)/bin/$(bin) 1.31 + 1.32 +.PHONY: uninstall 1.33 +uninstall: 1.34 + rm -f $(PREFIX)/bin/$(bin)