Browse Source

Haiku: fix build

Kostadin Damyanov 10 years ago
parent
commit
c925fbce2d
3 changed files with 14 additions and 14 deletions
  1. 9 10
      platform/haiku/detect.py
  2. 3 2
      platform/haiku/haiku_direct_window.h
  3. 2 2
      platform/haiku/os_haiku.h

+ 9 - 10
platform/haiku/detect.py

@@ -10,10 +10,10 @@ def get_name():
 def can_build():
 	if (os.name != "posix"):
 		return False
-	
+
 	if (sys.platform == "darwin"):
 		return False
-	
+
 	return True
 
 def get_opts():
@@ -34,13 +34,12 @@ def configure(env):
 			env["bits"]="64"
 		else:
 			env["bits"]="32"
-	
+
 	env.Append(CPPPATH = ['#platform/haiku'])
-	
-	# TODO: add clang and try gcc2 too
-	env["CC"] = "gcc-x86"
-	env["CXX"] = "g++-x86"
-	
+
+	env["CC"] = "gcc"
+	env["CXX"] = "g++"
+
 	if (env["target"]=="release"):
 		if (env["debug_release"]=="yes"):
 			env.Append(CCFLAGS=['-g2'])
@@ -50,12 +49,12 @@ def configure(env):
 		env.Append(CCFLAGS=['-O2','-ffast-math','-DDEBUG_ENABLED'])
 	elif (env["target"]=="debug"):
 		env.Append(CCFLAGS=['-g2', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
-	
+
 	#env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
 	env.Append(CPPFLAGS = ['-DGLEW_ENABLED', '-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
 	env.Append(CPPFLAGS = ['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
 	env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL', 'GLEW'])
-	
+
 	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')})

+ 3 - 2
platform/haiku/haiku_direct_window.h

@@ -4,15 +4,16 @@
 #include <kernel/image.h> // needed for image_id
 #include <DirectWindow.h>
 
-#include "os/input.h"
 #include "core/os/os.h"
+#include "main/input_default.h"
+
 #include "haiku_gl_view.h"
 
 #define REDRAW_MSG 'rdrw'
 #define LOCKGL_MSG 'glck'
 #define UNLOCKGL_MSG 'ulck'
 
-class HaikuDirectWindow : public BDirectWindow 
+class HaikuDirectWindow : public BDirectWindow
 {
 private:
 	unsigned int event_id;

+ 2 - 2
platform/haiku/os_haiku.h

@@ -1,7 +1,6 @@
 #ifndef OS_HAIKU_H
 #define OS_HAIKU_H
 
-#include "os/input.h"
 #include "drivers/unix/os_unix.h"
 #include "servers/visual_server.h"
 #include "servers/visual/rasterizer.h"
@@ -11,6 +10,7 @@
 #include "servers/audio/sample_manager_sw.h"
 #include "servers/spatial_sound/spatial_sound_server_sw.h"
 #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
+#include "main/input_default.h"
 
 #include "audio_driver_media_kit.h"
 #include "context_gl_haiku.h"
@@ -46,7 +46,7 @@ private:
 
 protected:
 	virtual int get_video_driver_count() const;
-	virtual const char* get_video_driver_name(int p_driver) const;	
+	virtual const char* get_video_driver_name(int p_driver) const;
 	virtual VideoMode get_default_video_mode() const;
 
 	virtual void initialize(const VideoMode& p_desired, int p_video_driver, int p_audio_driver);