conworlds

view Makefile @ 18:e4257df067a1

oh yeah, now the tracking is solid. Wasn't rendering the correct part of the texture before.
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 26 Aug 2014 12:59:15 +0300
parents e3f0ca1d008a
children c814f77d177e
line source
1 csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c)
2 ccsrc = $(wildcard src/*.cc)
3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
4 dep = $(obj:.o=.d)
5 bin = conworlds
7 # comment out to disable LibOVR (oculus sdk)
8 #ovr_cflags = -DUSE_LIBOVR
9 #ovr_libs = -lovr
10 # comment out to disable OpenHMD
11 ohmd_cflags = -DUSE_OPENHMD
12 ohmd_libs = -lopenhmd
14 CFLAGS = -pedantic -Wall -g $(ovr_cflags)
15 CXXFLAGS = -std=c++11 $(CFLAGS)
16 LDFLAGS = $(libgl_$(sys)) -lm -lvmath -limago -lanim $(ovr_libs)
18 libgl_unix = -lGL -lGLU -lglut -lGLEW
19 libgl_mac = -framework OpenGL -framework GLUT -lGLEW
20 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
22 $(bin): $(obj)
23 $(CXX) -o $@ $(obj) $(LDFLAGS)
25 -include $(dep)
27 %.d: %.c
28 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
30 %.d: %.cc
31 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
33 .PHONY: clean
34 clean:
35 rm -f $(obj) $(bin)
37 # os detection
38 uname = $(shell uname -s)
39 ifeq ($(sys), Darwin)
40 sys = mac
41 else ifeq ($(findstring MINGW, $(sys)), MINGW)
42 sys = win
43 else
44 sys = unix
45 endif