mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-10 04:31:16 +00:00
engine: Haiku OS support (#478)
This commit is contained in:
parent
947a615707
commit
b7922368bd
@ -93,6 +93,8 @@ const char *Q_buildos( void )
|
|||||||
osname = "emscripten";
|
osname = "emscripten";
|
||||||
#elif XASH_DOS4GW
|
#elif XASH_DOS4GW
|
||||||
osname = "DOS4GW";
|
osname = "DOS4GW";
|
||||||
|
#elif XASH_HAIKU
|
||||||
|
osname = "haiku";
|
||||||
#else
|
#else
|
||||||
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,6 +62,10 @@ def configure(conf):
|
|||||||
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
conf.fatal('SDL2 not availiable! If you want to build dedicated server, specify --dedicated')
|
||||||
conf.define('XASH_SDL', 2)
|
conf.define('XASH_SDL', 2)
|
||||||
|
|
||||||
|
if conf.env.DEST_OS == 'haiku':
|
||||||
|
conf.env.LIB_HAIKU = ['network']
|
||||||
|
conf.env.LIBPATH_HAIKU = ['/boot/system/lib']
|
||||||
|
|
||||||
if conf.options.USE_SELECT == None:
|
if conf.options.USE_SELECT == None:
|
||||||
conf.options.USE_SELECT = conf.options.DEDICATED
|
conf.options.USE_SELECT = conf.options.DEDICATED
|
||||||
|
|
||||||
@ -112,6 +116,8 @@ def build(bld):
|
|||||||
source += bld.path.ant_glob(['platform/dos/*.c'])
|
source += bld.path.ant_glob(['platform/dos/*.c'])
|
||||||
source += bld.path.ant_glob(['platform/stub/s_stub.c'])
|
source += bld.path.ant_glob(['platform/stub/s_stub.c'])
|
||||||
|
|
||||||
|
if bld.env.DEST_OS == 'haiku':
|
||||||
|
libs.append('HAIKU')
|
||||||
|
|
||||||
if bld.get_define('XASH_CUSTOM_SWAP'):
|
if bld.get_define('XASH_CUSTOM_SWAP'):
|
||||||
source += bld.path.ant_glob(['platform/misc/kmalloc.c', 'platform/misc/sbrk.c'])
|
source += bld.path.ant_glob(['platform/misc/kmalloc.c', 'platform/misc/sbrk.c'])
|
||||||
|
@ -20,7 +20,7 @@ GNU General Public License for more details.
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__unix__)
|
#if defined(__APPLE__) || defined(__unix__) || defined(__HAIKU__)
|
||||||
#define XASHLIB "libxash." OS_LIB_EXT
|
#define XASHLIB "libxash." OS_LIB_EXT
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
#if !__MINGW32__ && _MSC_VER >= 1200
|
#if !__MINGW32__ && _MSC_VER >= 1200
|
||||||
|
@ -67,6 +67,7 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#undef XASH_MSVC
|
#undef XASH_MSVC
|
||||||
#undef XASH_NETBSD
|
#undef XASH_NETBSD
|
||||||
#undef XASH_OPENBSD
|
#undef XASH_OPENBSD
|
||||||
|
#undef XASH_HAIKU
|
||||||
#undef XASH_WIN32
|
#undef XASH_WIN32
|
||||||
#undef XASH_WIN64
|
#undef XASH_WIN64
|
||||||
#undef XASH_X86
|
#undef XASH_X86
|
||||||
@ -115,6 +116,9 @@ For more information, please refer to <http://unlicense.org/>
|
|||||||
#elif defined __WATCOMC__ && defined __DOS__
|
#elif defined __WATCOMC__ && defined __DOS__
|
||||||
#define XASH_DOS4GW 1
|
#define XASH_DOS4GW 1
|
||||||
#define XASH_LITTLE_ENDIAN
|
#define XASH_LITTLE_ENDIAN
|
||||||
|
#elif defined __HAIKU__
|
||||||
|
#define XASH_HAIKU 1
|
||||||
|
#define XASH_POSIX 1
|
||||||
#else
|
#else
|
||||||
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
#error "Place your operating system name here! If this is a mistake, try to fix conditions above and report a bug"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user