diff options
| author | ruki <[email protected]> | 2023-02-01 23:35:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-02-01 23:35:23 +0800 |
| commit | 998b62a1d550b987c692c86f45773ec688787fce (patch) | |
| tree | 6fa168425da35bd47c4b962cfca88c437a272716 | |
| parent | fc7111cdefd10169ca6029dce4bab9acb9b1e8df (diff) | |
add haiku platform
| -rw-r--r-- | core/src/xmake/engine.c | 2 | ||||
| -rw-r--r-- | xmake/platforms/bsd/xmake.lua | 2 | ||||
| -rw-r--r-- | xmake/platforms/haiku/xmake.lua | 62 |
3 files changed, 65 insertions, 1 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index a0a019c33..aa58cc47c 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -877,6 +877,8 @@ static tb_void_t xm_engine_init_host(xm_engine_t* engine) syshost = "ios"; #elif defined(TB_CONFIG_OS_ANDROID) syshost = "android"; +#elif defined(TB_CONFIG_OS_HAIKU) + syshost = "haiku"; #endif lua_pushstring(engine->lua, syshost? syshost : "unknown"); lua_setglobal(engine->lua, "_HOST"); diff --git a/xmake/platforms/bsd/xmake.lua b/xmake/platforms/bsd/xmake.lua index 1790d558c..3150b051a 100644 --- a/xmake/platforms/bsd/xmake.lua +++ b/xmake/platforms/bsd/xmake.lua @@ -40,7 +40,7 @@ platform("bsd") set_installdir("/usr/local") -- set toolchains - set_toolchains("envs", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "dlang", "go", "rust", "gfortran", "zig") + set_toolchains("envs", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "go", "rust", "gfortran", "zig") -- set menu set_menu { diff --git a/xmake/platforms/haiku/xmake.lua b/xmake/platforms/haiku/xmake.lua new file mode 100644 index 000000000..168b7d414 --- /dev/null +++ b/xmake/platforms/haiku/xmake.lua @@ -0,0 +1,62 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file xmake.lua +-- + +-- define platform +platform("haiku") + + -- set os + set_os("haiku") + + -- set hosts + set_hosts("haiku") + + -- set archs + set_archs("i386", "x86_64") + + -- set formats + set_formats("static", "lib$(name).a") + set_formats("object", "$(name).o") + set_formats("shared", "lib$(name).so") + set_formats("symbol", "$(name).sym") + + -- set toolchains + set_toolchains("envs", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "go", "rust", "gfortran", "zig") + + -- set menu + set_menu { + config = + { + {category = "Cuda SDK Configuration" } + , {nil, "cuda", "kv", "auto", "The Cuda SDK Directory" } + , {category = "Qt SDK Configuration" } + , {nil, "qt", "kv", "auto", "The Qt SDK Directory" } + , {nil, "qt_sdkver", "kv", "auto", "The Qt SDK Version" } + } + + , global = + { + {category = "Cuda SDK Configuration" } + , {nil, "cuda", "kv", "auto", "The Cuda SDK Directory" } + , {category = "Qt SDK Configuration" } + , {nil, "qt", "kv", "auto", "The Qt SDK Directory" } + } + } + + |
