vrchess

annotate Makefile @ 12:778ed91cb7fd

fullscreen to rift now works in extended mode with freeglut
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 23 Aug 2014 12:03:29 +0300
parents 3c36bc28c6c2
children
rev   line source
nuclear@4 1 csrc = $(wildcard src/*.c) $(wildcard src/vr/*.c)
nuclear@1 2 ccsrc = $(wildcard src/*.cc)
nuclear@1 3 obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
nuclear@1 4 dep = $(obj:.o=.d)
nuclear@1 5 bin = vrchess
nuclear@1 6
nuclear@6 7 # comment out to disable LibOVR (oculus sdk)
nuclear@6 8 #ovr_cflags = -DUSE_LIBOVR
nuclear@6 9 #ovr_libs = -lovr
nuclear@10 10 # comment out to disable OpenHMD
nuclear@10 11 ohmd_cflags = -DUSE_OPENHMD
nuclear@10 12 ohmd_libs = -lopenhmd
nuclear@6 13
nuclear@6 14 CFLAGS = -pedantic -Wall -g $(ovr_cflags)
nuclear@1 15 CXXFLAGS = -std=c++11 $(CFLAGS)
nuclear@6 16 LDFLAGS = $(libgl_$(sys)) -lm -lvmath -limago $(ovr_libs)
nuclear@1 17
nuclear@1 18 libgl_unix = -lGL -lGLU -lglut -lGLEW
nuclear@1 19 libgl_mac = -framework OpenGL -framework GLUT -lGLEW
nuclear@1 20 libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
nuclear@1 21
nuclear@1 22 $(bin): $(obj)
nuclear@1 23 $(CXX) -o $@ $(obj) $(LDFLAGS)
nuclear@1 24
nuclear@1 25 -include $(dep)
nuclear@1 26
nuclear@1 27 %.d: %.c
nuclear@1 28 @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 29
nuclear@1 30 %.d: %.cc
nuclear@1 31 @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
nuclear@1 32
nuclear@1 33 .PHONY: clean
nuclear@1 34 clean:
nuclear@1 35 rm -f $(obj) $(bin)
nuclear@1 36
nuclear@1 37 # os detection
nuclear@1 38 uname = $(shell uname -s)
nuclear@1 39 ifeq ($(sys), Darwin)
nuclear@1 40 sys = mac
nuclear@1 41 else ifeq ($(findstring MINGW, $(sys)), MINGW)
nuclear@1 42 sys = win
nuclear@1 43 else
nuclear@1 44 sys = unix
nuclear@1 45 endif