oculus1

annotate Makefile @ 1:e2f9e4603129

added LibOVR and started a simple vr wrapper.
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 14 Sep 2013 16:14:59 +0300
parents c7b50cd7184c
children 59fc487ba58e
rev   line source
nuclear@0 1 src = $(wildcard src/*.cc)
nuclear@1 2 ovr_src = $(wildcard libovr/Src/*.cpp) \
nuclear@1 3 $(wildcard libovr/Src/Kernel/*.cpp) \
nuclear@1 4 $(wildcard libovr/Src/Util/*.cpp)
nuclear@1 5
nuclear@1 6 obj = $(src:.cc=.o) $(ovr_src:.cpp=.o) $(ovr_sys_src:.cpp=.o)
nuclear@0 7 bin = oculus1
nuclear@0 8
nuclear@1 9
nuclear@1 10 CXXFLAGS = -Wall -g -I/usr/local/include $(ovr_include) -DUSE_OVR
nuclear@0 11 LDFLAGS = -L/usr/local/lib $(libgl) $(ovrlibs) -lm
nuclear@0 12
nuclear@0 13 ifeq ($(shell uname -s), Darwin)
nuclear@0 14 libgl = -framework OpenGL -framework GLUT -lGLEW
nuclear@1 15 ovrlibs = -framework CoreFoundation -framework ApplicationServices -framework IOKit
nuclear@1 16
nuclear@1 17 ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/osx
nuclear@1 18 ovr_sys_src = $(wildcard libovr/Src/osx/*.cpp)
nuclear@0 19 else
nuclear@0 20 libgl = -lGL -lGLU -lglut -lGLEW
nuclear@1 21
nuclear@1 22 ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/linux
nuclear@1 23 ovr_sys_src = $(wildcard libovr/Src/linux/*.cpp)
nuclear@0 24 endif
nuclear@0 25
nuclear@0 26 $(bin): $(obj)
nuclear@0 27 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@0 28
nuclear@0 29 .PHONY: clean
nuclear@0 30 clean:
nuclear@0 31 rm -f $(obj) $(bin)