cubemapper
annotate Makefile @ 0:8fc9e1d3aad2
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 27 Jul 2017 20:36:12 +0300 |
parents | |
children | 2bfafdced01a |
rev | line source |
---|---|
nuclear@0 | 1 # -- options -- |
nuclear@0 | 2 PREFIX = /usr/local |
nuclear@0 | 3 opt = -O0 |
nuclear@0 | 4 dbg = -g |
nuclear@0 | 5 # ------------- |
nuclear@0 | 6 |
nuclear@0 | 7 src = $(wildcard src/*.cc) |
nuclear@0 | 8 obj = $(src:.cc=.o) |
nuclear@0 | 9 dep = $(obj:.o=.d) |
nuclear@0 | 10 bin = cubemapper |
nuclear@0 | 11 |
nuclear@0 | 12 CXXFLAGS = -pedantic -Wall $(opt) $(dbg) $(inc) |
nuclear@0 | 13 LDFLAGS = $(libs) $(libgl_$(sys)) -lm |
nuclear@0 | 14 |
nuclear@0 | 15 sys = $(shell uname -s) |
nuclear@0 | 16 libgl_Linux = -lGL -lGLU -lglut -lGLEW |
nuclear@0 | 17 libgl_Darwin = -framework OpenGL -framework GLUT -lGLEW |
nuclear@0 | 18 |
nuclear@0 | 19 libs = -limago -lgmath |
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: %.c |
nuclear@0 | 27 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 28 |
nuclear@0 | 29 %.d: %.cc |
nuclear@0 | 30 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ |
nuclear@0 | 31 |
nuclear@0 | 32 .PHONY: clean |
nuclear@0 | 33 clean: |
nuclear@0 | 34 rm -f $(obj) $(bin) |
nuclear@0 | 35 |
nuclear@0 | 36 .PHONY: cleandep |
nuclear@0 | 37 cleandep: |
nuclear@0 | 38 rm -f $(dep) |