cubemapper

view Makefile @ 0:8fc9e1d3aad2

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 27 Jul 2017 20:36:12 +0300
parents
children 2bfafdced01a
line source
1 # -- options --
2 PREFIX = /usr/local
3 opt = -O0
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)