dbf-halloween2015

changeset 2:5ae5fd3626fa

macosx port works
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Nov 2015 00:51:36 +0200
parents c3f5c32cb210
children c37fe5d8a4ed
files Makefile src/main.cc
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Sun Nov 01 00:36:56 2015 +0200
     1.2 +++ b/Makefile	Sun Nov 01 00:51:36 2015 +0200
     1.3 @@ -19,18 +19,20 @@
     1.4  
     1.5  inc = -Isrc -Ilibs/libjpeg -Ilibs/zlib -Ilibs/libpng -Ilibs/imago \
     1.6  	  -Ilibs/ogg -Ilibs/vorbis
     1.7 +warn = -pedantic -Wall
     1.8  
     1.9 -CFLAGS = -pedantic -Wall -g $(opt) $(inc)
    1.10 -CXXFLAGS = -pedantic -Wall -g $(opt) $(inc)
    1.11 +CFLAGS = $(warn) -g $(opt) $(inc)
    1.12 +CXXFLAGS = $(warn) -g $(opt) $(inc)
    1.13  LDFLAGS = $(libgl) $(libal) -lm -ldl -lpthread
    1.14  
    1.15  sys = $(shell uname -s)
    1.16  ifeq ($(sys), Darwin)
    1.17 +	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.18 +	libal = -framework OpenAL
    1.19 +	warn += -Wno-deprecated-declarations
    1.20 +else
    1.21  	libgl = -lGL -lGLU -lglut -lGLEW
    1.22  	libal = -lopenal
    1.23 -else
    1.24 -	libgl = -framework OpenGL -framework GLUT -lGLEW
    1.25 -	libal = -framework OpenAL
    1.26  endif
    1.27  
    1.28  $(bin): $(obj) Makefile
     2.1 --- a/src/main.cc	Sun Nov 01 00:36:56 2015 +0200
     2.2 +++ b/src/main.cc	Sun Nov 01 00:51:36 2015 +0200
     2.3 @@ -3,7 +3,11 @@
     2.4  #include <assert.h>
     2.5  #include <vector>
     2.6  #include "opengl.h"
     2.7 +#ifdef __APPLE__
     2.8 +#include <GLUT/glut.h>
     2.9 +#else
    2.10  #include <GL/glut.h>
    2.11 +#endif
    2.12  #include "scene.h"
    2.13  #include "meshgen.h"
    2.14  #include "pnoise.h"