nuclear@1: src = $(wildcard src/*.cc) nuclear@1: obj = $(src:.cc=.o) nuclear@1: bin = test nuclear@1: nuclear@1: gphroot = .. nuclear@1: nuclear@1: CXXFLAGS = -pedantic -Wall -g -I$(gphroot)/src nuclear@1: LDFLAGS = -L$(gphroot) -Wl,-rpath=$(gphroot) -lgraphene3d $(libgl) nuclear@1: nuclear@1: ifeq ($(shell uname -s), Darwin) nuclear@1: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@1: else nuclear@1: libgl = -lGL -lGLU -lglut -lGLEW nuclear@1: endif nuclear@1: nuclear@1: $(bin): $(obj) nuclear@1: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin)