Browse Source

Haiku: fix build, link with libGL and libGLEW

Kostadin Damyanov 10 years ago
parent
commit
db459fba1d
3 changed files with 9 additions and 3 deletions
  1. 7 2
      platform/haiku/detect.py
  2. 1 0
      platform/haiku/os_haiku.cpp
  3. 1 1
      platform/haiku/platform_config.h

+ 7 - 2
platform/haiku/detect.py

@@ -50,6 +50,11 @@ def configure(env):
 		env.Append(CCFLAGS=['-g2', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
 	
 	#env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
-	env.Append(CPPFLAGS = ['-DOPENGL_ENABLED', '-DGLEW_ENABLED'])
+	env.Append(CPPFLAGS = ['-DOPENGL_ENABLED'])
 	env.Append(CPPFLAGS = ['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
-	env.Append(LIBS = ['be', 'z', 'network', 'bnetapi'])
+	env.Append(LIBS = ['be', 'GL', 'GLEW', 'z', 'network', 'bnetapi'])
+	
+	import methods
+	env.Append(BUILDERS = {'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl')})
+	env.Append(BUILDERS = {'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl')})
+	env.Append(BUILDERS = {'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl')})

+ 1 - 0
platform/haiku/os_haiku.cpp

@@ -1,4 +1,5 @@
 #include "servers/visual/visual_server_raster.h"
+#include "servers/visual/visual_server_wrap_mt.h"
 #include "drivers/gles2/rasterizer_gles2.h"
 #include "os_haiku.h"
 

+ 1 - 1
platform/haiku/platform_config.h

@@ -3,4 +3,4 @@
 // for ifaddrs.h needed in drivers/unix/ip_unix.cpp
 #define _BSD_SOURCE 1
 
-#define GLES2_INCLUDE_H "gl_context/glew.h"
+#define GLES2_INCLUDE_H <GL/glew.h>