nuclear@4: csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c) nuclear@1: ccsrc = $(wildcard src/*.cc) nuclear@1: obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) nuclear@1: dep = $(obj:.o=.d) nuclear@13: bin = conworlds nuclear@1: nuclear@6: # comment out to disable LibOVR (oculus sdk) nuclear@6: #ovr_cflags = -DUSE_LIBOVR nuclear@6: #ovr_libs = -lovr nuclear@10: # comment out to disable OpenHMD nuclear@10: ohmd_cflags = -DUSE_OPENHMD nuclear@10: ohmd_libs = -lopenhmd nuclear@6: nuclear@17: CFLAGS = -pedantic -Wall -g $(ovr_cflags) `pkg-config --cflags sdl2` nuclear@1: CXXFLAGS = -std=c++11 $(CFLAGS) nuclear@17: LDFLAGS = $(libgl_$(sys)) -lm -lvmath -limago -lanim $(ovr_libs) `pkg-config --libs sdl2` nuclear@1: nuclear@17: libgl_unix = -lGL -lGLU -lGLEW nuclear@17: libgl_mac = -framework OpenGL -lGLEW nuclear@17: libgl_win = -lopengl32 -lglu32 -lglew32 nuclear@1: nuclear@1: $(bin): $(obj) nuclear@1: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@1: nuclear@1: -include $(dep) nuclear@1: nuclear@1: %.d: %.c nuclear@1: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@1: nuclear@1: %.d: %.cc nuclear@1: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@1: nuclear@1: .PHONY: clean nuclear@1: clean: nuclear@1: rm -f $(obj) $(bin) nuclear@1: nuclear@1: # os detection nuclear@1: uname = $(shell uname -s) nuclear@1: ifeq ($(sys), Darwin) nuclear@1: sys = mac nuclear@1: else ifeq ($(findstring MINGW, $(sys)), MINGW) nuclear@1: sys = win nuclear@1: else nuclear@1: sys = unix nuclear@1: endif