cubemapper
annotate 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 |
rev | line source |
---|---|
nuclear@0 | 1 # -- options -- |
nuclear@0 | 2 PREFIX = /usr/local |
nuclear@4 | 3 opt = -O3 |
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) |
nuclear@4 | 39 |
nuclear@4 | 40 .PHONY: install |
nuclear@4 | 41 install: $(bin) |
nuclear@4 | 42 mkdir -p $(DESTDIR)$(PREFIX)/bin |
nuclear@4 | 43 cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) |
nuclear@4 | 44 |
nuclear@4 | 45 .PHONY: uninstall |
nuclear@4 | 46 uninstall: |
nuclear@4 | 47 rm -f $(DESTDIR)$(PREFIX)/bin/$(bin) |