oculus1

view Makefile @ 9:b66b54a68dfd

tracking almost done
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 19 Sep 2013 06:36:48 +0300
parents 59fc487ba58e
children f3672317e5c2
line source
1 src = $(wildcard src/*.cc)
2 ovr_src = $(wildcard libovr/Src/*.cpp) \
3 $(wildcard libovr/Src/Kernel/*.cpp) \
4 $(wildcard libovr/Src/Util/*.cpp)
6 obj = $(src:.cc=.o) $(ovr_src:.cpp=.o) $(ovr_sys_src:.cpp=.o)
7 bin = oculus1
10 CXXFLAGS = -Wall -g -I/usr/local/include $(ovr_include) -DUSE_OVR
11 LDFLAGS = -L/usr/local/lib $(libgl) $(ovrlibs) -lvmath -lm
13 ifeq ($(shell uname -s), Darwin)
14 libgl = -framework OpenGL -framework GLUT -lGLEW
15 ovrlibs = -framework CoreFoundation -framework ApplicationServices -framework IOKit
17 ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/osx -Ilibovr/Src/Kernel
18 ovr_sys_src = $(wildcard libovr/Src/osx/*.cpp)
19 else
20 libgl = -lGL -lGLU -lglut -lGLEW
21 ovrlibs = -lX11 -lXinerama -ludev -lpthread
23 ovr_include = -Ilibovr/Include -Ilibovr/Src -Ilibovr/Src/linux -Ilibovr/Src/Kernel
24 ovr_sys_src = $(wildcard libovr/Src/linux/*.cpp)
25 endif
27 $(bin): $(obj)
28 $(CXX) -o $@ $(obj) $(LDFLAGS)
30 .PHONY: clean
31 clean:
32 rm -f $(obj) $(bin)