nuclear@0: src = $(wildcard src/*.cc) nuclear@0: obj = $(src:.cc=.o) nuclear@12: dep = $(obj:.o=.d) nuclear@0: bin = test nuclear@0: nuclear@45: opt = -O3 -ffast-math nuclear@45: dbg = -g nuclear@45: nuclear@0: CXX = g++ nuclear@45: CXXFLAGS = -pedantic -Wall $(dbg) $(opt) $(def) nuclear@13: LDFLAGS = $(libgl) $(libcl) -lpthread nuclear@8: nuclear@8: ifeq ($(shell uname -s), Darwin) nuclear@8: libgl = -framework OpenGL -framework GLUT nuclear@8: libcl = -framework OpenCL nuclear@8: else nuclear@45: libgl = -lGL -lGLU -lglut nuclear@8: libcl = -lOpenCL nuclear@40: def = -DCLGL_INTEROP nuclear@8: endif nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@12: -include $(dep) nuclear@12: nuclear@12: %.d: %.cc nuclear@12: @$(CPP) $(CXXFLAGS) -MM -MT $(@:.d=.o) $< >$@ nuclear@12: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@12: rm -f $(obj) $(bin) $(dep)