Haiku: fix build

This commit is contained in:
Kostadin Damyanov 2015-10-17 15:41:01 +03:00
parent 29caf2bb5b
commit c925fbce2d
3 changed files with 14 additions and 14 deletions

View File

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

View File

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

View File

@ -1,7 +1,6 @@
#ifndef OS_HAIKU_H #ifndef OS_HAIKU_H
#define OS_HAIKU_H #define OS_HAIKU_H
#include "os/input.h"
#include "drivers/unix/os_unix.h" #include "drivers/unix/os_unix.h"
#include "servers/visual_server.h" #include "servers/visual_server.h"
#include "servers/visual/rasterizer.h" #include "servers/visual/rasterizer.h"
@ -11,6 +10,7 @@
#include "servers/audio/sample_manager_sw.h" #include "servers/audio/sample_manager_sw.h"
#include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound/spatial_sound_server_sw.h"
#include "servers/spatial_sound_2d/spatial_sound_2d_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 "audio_driver_media_kit.h"
#include "context_gl_haiku.h" #include "context_gl_haiku.h"
@ -46,7 +46,7 @@ private:
protected: protected:
virtual int get_video_driver_count() const; 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 VideoMode get_default_video_mode() const;
virtual void initialize(const VideoMode& p_desired, int p_video_driver, int p_audio_driver); virtual void initialize(const VideoMode& p_desired, int p_video_driver, int p_audio_driver);