nuclear@0: src = $(wildcard src/*.cc) nuclear@1: ovr_src = $(wildcard libovr/Src/*.cpp) \ nuclear@1: $(wildcard libovr/Src/Kernel/*.cpp) \ nuclear@1: $(wildcard libovr/Src/Util/*.cpp) nuclear@1: nuclear@1: obj = $(src:.cc=.o) $(ovr_src:.cpp=.o) $(ovr_sys_src:.cpp=.o) nuclear@0: bin = oculus1 nuclear@0: nuclear@1: nuclear@1: CXXFLAGS = -Wall -g -I/usr/local/include $(ovr_include) -DUSE_OVR nuclear@5: LDFLAGS = -L/usr/local/lib $(libgl) $(ovrlibs) -lvmath -lm nuclear@0: nuclear@0: ifeq ($(shell uname -s), Darwin) nuclear@0: libgl = -framework OpenGL -framework GLUT -lGLEW nuclear@1: ovrlibs = -framework CoreFoundation -framework ApplicationServices -framework IOKit nuclear@1: nuclear@2: ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/osx -Ilibovr/Src/Kernel nuclear@1: ovr_sys_src = $(wildcard libovr/Src/osx/*.cpp) nuclear@0: else nuclear@0: libgl = -lGL -lGLU -lglut -lGLEW nuclear@2: ovrlibs = -lX11 -lXinerama -ludev -lpthread nuclear@1: nuclear@2: ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/linux -Ilibovr/Src/Kernel nuclear@1: ovr_sys_src = $(wildcard libovr/Src/linux/*.cpp) nuclear@0: endif nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin)