nuclear@3: csrc = $(wildcard src/*.c) nuclear@3: ccsrc = $(wildcard src/*.cc) nuclear@3: obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@0: bin = blobo nuclear@0: nuclear@2: opt = -O3 -ffast-math nuclear@2: dbg = -g nuclear@2: nuclear@3: CFLAGS = -pedantic -Wall $(opt) $(dbg) nuclear@2: CXXFLAGS = -ansi -pedantic -Wall $(opt) $(dbg) nuclear@1: LDFLAGS = $(libgl) -lvmath -limago nuclear@0: nuclear@0: ifeq ($(shell uname -s), Darwin) nuclear@0: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@0: else nuclear@0: libgl = -lGL -lGLU -lglut -lGLEW nuclear@0: endif nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@0: -include $(dep) nuclear@0: nuclear@3: %.d: %.c nuclear@3: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@3: nuclear@0: %.d: %.cc nuclear@3: @$(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)