curvedraw
view Makefile @ 7:5ace6f6f4973
fixed the build on linux
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 18 Dec 2015 14:38:41 +0200 |
parents | 8e524989c904 |
children | 37ab3a4c02f8 |
line source
1 PREFIX = /usr/local
3 src = $(wildcard src/*.cc)
4 obj = $(src:.cc=.o)
5 dep = $(obj:.o=.d)
6 bin = curvedraw
8 CXXFLAGS = -pedantic -Wall -g
9 LDFLAGS = $(libgl) -lvmath -ldrawtext -lm
11 sys := $(shell uname -s | sed 's/MINGW.*/win32/')
13 ifeq ($(sys), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 else ifeq ($(sys), win32)
16 libgl = -lopengl32 -lglut32 -lglew32
17 else
18 libgl = -lGL -lglut -lGLEW
19 endif
21 $(bin): $(obj)
22 $(CXX) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.cc
27 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(bin)
34 .PHONY: cleandep
35 cleandep:
36 rm -f $(dep)
38 .PHONY: install
39 install: $(bin)
40 mkdir -p $(DESTDIR)$(PREFIX)/bin
41 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
43 .PHONY: uninstall
44 uninstall:
45 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)