nuclear@4: csrc = $(wildcard src/*.c) nuclear@4: ccsrc = $(wildcard src/*.cc) nuclear@4: obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) nuclear@4: bin = erebus nuclear@4: nuclear@34: export opt = -O3 -ffast-math nuclear@34: export dbg = -g nuclear@34: export warn = -Wall nuclear@33: nuclear@33: CFLAGS = -pedantic $(warn) $(opt) $(dbg) -Iliberebus/src nuclear@4: CXXFLAGS = -std=c++11 $(CFLAGS) nuclear@33: LDFLAGS = -Lliberebus $(rpath) $(libgl_$(sys)) -lm -lerebus -lvmath -limago -ldrawtext nuclear@4: nuclear@4: libgl_unix = -lGL -lGLU -lglut -lGLEW nuclear@4: libgl_mac = -framework OpenGL -framework GLUT -lGLEW nuclear@4: libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32 nuclear@4: nuclear@7: $(bin): $(obj) liberebus nuclear@4: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@4: nuclear@7: .PHONY: liberebus nuclear@7: liberebus: nuclear@7: $(MAKE) -C liberebus nuclear@7: nuclear@34: .PHONY: liberebus-clean nuclear@34: liberebus-clean: nuclear@34: $(MAKE) -C liberebus clean nuclear@34: nuclear@4: .PHONY: clean nuclear@4: clean: nuclear@4: rm -f $(obj) $(bin) nuclear@4: nuclear@34: .PHONY: cleanall nuclear@34: cleanall: clean liberebus-clean nuclear@34: nuclear@4: uname = $(shell uname -s) nuclear@4: ifeq ($(uname), Darwin) nuclear@4: sys = mac nuclear@33: warn += -Wno-deprecated-declarations nuclear@4: else ifeq ($(findstring MINGW, $(uname)), MINGW) nuclear@4: sys = win nuclear@4: else nuclear@4: sys = unix nuclear@33: rpath = -Wl,-rpath=liberebus nuclear@4: endif