cubemapper
view Makefile @ 4:2bfafdced01a
added README, COPYING, and copyright headers
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 30 Jul 2017 16:11:19 +0300 |
parents | 8fc9e1d3aad2 |
children |
line source
1 # -- options --
2 PREFIX = /usr/local
3 opt = -O3
4 dbg = -g
5 # -------------
7 src = $(wildcard src/*.cc)
8 obj = $(src:.cc=.o)
9 dep = $(obj:.o=.d)
10 bin = cubemapper
12 CXXFLAGS = -pedantic -Wall $(opt) $(dbg) $(inc)
13 LDFLAGS = $(libs) $(libgl_$(sys)) -lm
15 sys = $(shell uname -s)
16 libgl_Linux = -lGL -lGLU -lglut -lGLEW
17 libgl_Darwin = -framework OpenGL -framework GLUT -lGLEW
19 libs = -limago -lgmath
21 $(bin): $(obj)
22 $(CXX) -o $@ $(obj) $(LDFLAGS)
24 -include $(dep)
26 %.d: %.c
27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
29 %.d: %.cc
30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
32 .PHONY: clean
33 clean:
34 rm -f $(obj) $(bin)
36 .PHONY: cleandep
37 cleandep:
38 rm -f $(dep)
40 .PHONY: install
41 install: $(bin)
42 mkdir -p $(DESTDIR)$(PREFIX)/bin
43 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin)
45 .PHONY: uninstall
46 uninstall:
47 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)