conworlds

changeset 1:cd7755e4663a

added makefile commented out ovr 0.3.1 header file until it actually works
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 25 Apr 2014 05:43:26 +0300
parents b326d53321f7
children 879194e4b1f0
files .hgignore Makefile src/game.cc
diffstat 3 files changed, 42 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/.hgignore	Fri Apr 25 05:20:53 2014 +0300
     1.2 +++ b/.hgignore	Fri Apr 25 05:43:26 2014 +0300
     1.3 @@ -1,4 +1,6 @@
     1.4  \.o$
     1.5 +\.d$
     1.6 +^vrchess$
     1.7  \.swp$
     1.8  \.sln$
     1.9  \.vcxproj$
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/Makefile	Fri Apr 25 05:43:26 2014 +0300
     2.3 @@ -0,0 +1,38 @@
     2.4 +csrc = $(wildcard src/*.c)
     2.5 +ccsrc = $(wildcard src/*.cc)
     2.6 +obj = $(csrc:.c=.o) $(ccsrc:.cc=.o)
     2.7 +dep = $(obj:.o=.d)
     2.8 +bin = vrchess
     2.9 +
    2.10 +CFLAGS = -pedantic -Wall -g
    2.11 +CXXFLAGS = -std=c++11 $(CFLAGS)
    2.12 +LDFLAGS = $(libgl_$(sys)) -lm -lvmath -limago
    2.13 +
    2.14 +libgl_unix = -lGL -lGLU -lglut -lGLEW
    2.15 +libgl_mac = -framework OpenGL -framework GLUT -lGLEW
    2.16 +libgl_win = -lopengl32 -lglu32 -lglut32 -lglew32
    2.17 +
    2.18 +$(bin): $(obj)
    2.19 +	$(CXX) -o $@ $(obj) $(LDFLAGS)
    2.20 +
    2.21 +-include $(dep)
    2.22 +
    2.23 +%.d: %.c
    2.24 +	@$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
    2.25 +
    2.26 +%.d: %.cc
    2.27 +	@$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
    2.28 +
    2.29 +.PHONY: clean
    2.30 +clean:
    2.31 +	rm -f $(obj) $(bin)
    2.32 +
    2.33 +# os detection
    2.34 +uname = $(shell uname -s)
    2.35 +ifeq ($(sys), Darwin)
    2.36 +	sys = mac
    2.37 +else ifeq ($(findstring MINGW, $(sys)), MINGW)
    2.38 +	sys = win
    2.39 +else
    2.40 +	sys = unix
    2.41 +endif
     3.1 --- a/src/game.cc	Fri Apr 25 05:20:53 2014 +0300
     3.2 +++ b/src/game.cc	Fri Apr 25 05:43:26 2014 +0300
     3.3 @@ -2,7 +2,7 @@
     3.4  #include "opengl.h"
     3.5  #include "camera.h"
     3.6  #include "texture.h"
     3.7 -#include "OVR_CAPI_GL.h"
     3.8 +//#include "OVR_CAPI_GL.h"
     3.9  
    3.10  static void draw_scene();
    3.11  
    3.12 @@ -177,4 +177,4 @@
    3.13  	glFrontFace(GL_CCW);
    3.14  
    3.15  	glPopMatrix();
    3.16 -}
    3.17 \ No newline at end of file
    3.18 +}