nuclear@0: # -- options -- nuclear@0: PREFIX = /usr/local nuclear@4: opt = -O3 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) nuclear@4: nuclear@4: .PHONY: install nuclear@4: install: $(bin) nuclear@4: mkdir -p $(DESTDIR)$(PREFIX)/bin nuclear@4: cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) nuclear@4: nuclear@4: .PHONY: uninstall nuclear@4: uninstall: nuclear@4: rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)