nuclear@1: src = $(wildcard src/*.cc) nuclear@1: obj = $(src:.cc=.o) nuclear@1: dep = $(obj:.o=.d) nuclear@1: bin = vrmodel nuclear@1: nuclear@1: CFLAGS = -pedantic -Wall -g `pkg-config --cflags sdl2` nuclear@1: LDFLAGS = $(libgl) `pkg-config --libs sdl2` nuclear@1: nuclear@1: ifeq ($(shell uname -s), Darwin) nuclear@1: libgl = -framework OpenGL -lGLEW nuclear@1: else nuclear@1: libgl = -lGL -lGLU -lGLEW nuclear@1: endif nuclear@1: nuclear@1: $(bin): $(obj) nuclear@1: $(CC) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: -include $(dep) nuclear@1: nuclear@1: %.d: %.cc nuclear@1: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin)