cubemapper

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Jul 27 20:36:12 2017 +0300
     1.3 @@ -0,0 +1,38 @@
     1.4 +# -- options --
     1.5 +PREFIX = /usr/local
     1.6 +opt = -O0
     1.7 +dbg = -g
     1.8 +# -------------
     1.9 +
    1.10 +src = $(wildcard src/*.cc)
    1.11 +obj = $(src:.cc=.o)
    1.12 +dep = $(obj:.o=.d)
    1.13 +bin = cubemapper
    1.14 +
    1.15 +CXXFLAGS = -pedantic -Wall $(opt) $(dbg) $(inc)
    1.16 +LDFLAGS = $(libs) $(libgl_$(sys)) -lm
    1.17 +
    1.18 +sys = $(shell uname -s)
    1.19 +libgl_Linux = -lGL -lGLU -lglut -lGLEW
    1.20 +libgl_Darwin = -framework OpenGL -framework GLUT -lGLEW
    1.21 +
    1.22 +libs = -limago -lgmath
    1.23 +
    1.24 +$(bin): $(obj)
    1.25 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    1.26 +
    1.27 +-include $(dep)
    1.28 +
    1.29 +%.d: %.c
    1.30 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.31 +
    1.32 +%.d: %.cc
    1.33 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    1.34 +
    1.35 +.PHONY: clean
    1.36 +clean:
    1.37 +	rm -f $(obj) $(bin)
    1.38 +
    1.39 +.PHONY: cleandep
    1.40 +cleandep:
    1.41 +	rm -f $(dep)