curvedraw
annotate Makefile @ 11:099fd7adb900
curve parser works
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 19 Dec 2015 22:39:18 +0200 |
parents | 8e524989c904 |
children | 37ab3a4c02f8 |
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 dep = $(obj:.o=.d) |
nuclear@0 | 6 bin = curvedraw |
nuclear@0 | 7 |
nuclear@0 | 8 CXXFLAGS = -pedantic -Wall -g |
nuclear@0 | 9 LDFLAGS = $(libgl) -lvmath -ldrawtext -lm |
nuclear@0 | 10 |
nuclear@0 | 11 sys := $(shell uname -s | sed 's/MINGW.*/win32/') |
nuclear@0 | 12 |
nuclear@0 | 13 ifeq ($(sys), Darwin) |
nuclear@7 | 14 libgl = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 15 else ifeq ($(sys), win32) |
nuclear@7 | 16 libgl = -lopengl32 -lglut32 -lglew32 |
nuclear@0 | 17 else |
nuclear@7 | 18 libgl = -lGL -lglut -lGLEW |
nuclear@0 | 19 endif |
nuclear@0 | 20 |
nuclear@0 | 21 $(bin): $(obj) |
nuclear@0 | 22 $(CXX) -o $@ $(obj) $(LDFLAGS) |
nuclear@0 | 23 |
nuclear@0 | 24 -include $(dep) |
nuclear@0 | 25 |
nuclear@0 | 26 %.d: %.cc |
nuclear@0 | 27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 28 |
nuclear@0 | 29 |
nuclear@0 | 30 .PHONY: clean |
nuclear@0 | 31 clean: |
nuclear@0 | 32 rm -f $(obj) $(bin) |
nuclear@0 | 33 |
nuclear@0 | 34 .PHONY: cleandep |
nuclear@0 | 35 cleandep: |
nuclear@0 | 36 rm -f $(dep) |
nuclear@0 | 37 |
nuclear@0 | 38 .PHONY: install |
nuclear@0 | 39 install: $(bin) |
nuclear@0 | 40 mkdir -p $(DESTDIR)$(PREFIX)/bin |
nuclear@0 | 41 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@0 | 42 |
nuclear@0 | 43 .PHONY: uninstall |
nuclear@0 | 44 uninstall: |
nuclear@0 | 45 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |