nuclear@0: # -- options -- nuclear@0: PREFIX = /usr/local nuclear@0: opt = -O0 nuclear@0: dbg = -g nuclear@0: # ------------- nuclear@0: nuclear@0: src = $(wildcard src/*.cc) nuclear@0: obj = $(src:.cc=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@0: bin = cubemapper nuclear@0: nuclear@0: CXXFLAGS = -pedantic -Wall $(opt) $(dbg) $(inc) nuclear@0: LDFLAGS = $(libs) $(libgl_$(sys)) -lm nuclear@0: nuclear@0: sys = $(shell uname -s) nuclear@0: libgl_Linux = -lGL -lGLU -lglut -lGLEW nuclear@0: libgl_Darwin = -framework OpenGL -framework GLUT -lGLEW nuclear@0: nuclear@0: libs = -limago -lgmath nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@0: -include $(dep) nuclear@0: nuclear@0: %.d: %.c nuclear@0: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: %.d: %.cc nuclear@0: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) nuclear@0: nuclear@0: .PHONY: cleandep nuclear@0: cleandep: nuclear@0: rm -f $(dep)