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@2: inc = -Iinclude nuclear@2: nuclear@2: CFLAGS = -pedantic -Wall -g $(inc) `pkg-config --cflags sdl2` nuclear@4: CXXFLAGS = -std=c++11 $(CFLAGS) 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@2: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: -include $(dep) nuclear@1: nuclear@2: %.d: %.c nuclear@2: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@2: nuclear@1: %.d: %.cc nuclear@2: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin)