summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/toolchain.lua
diff options
context:
space:
mode:
author Thomas Klausner <wiz@NetBSD.org>2015-07-14 21:52:52 +0200
committer Thomas Klausner <wiz@NetBSD.org>2015-07-14 21:52:52 +0200
commit910f0215e82c19cbd0c007f77ec007528e3eb3d0 (patch)
tree9a058f274776856f79cdbbf0410f2f8cad9f42b5 /scripts/toolchain.lua
parent24bfd3e8e85e5415ea9569ccc34ce81f89888fca (diff)
Add NetBSD support.
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Diffstat (limited to 'scripts/toolchain.lua')
-rw-r--r--scripts/toolchain.lua29
1 files changed, 28 insertions, 1 deletions
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 91d1f29884e..589db7bc6fa 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -24,6 +24,7 @@ newoption {
{ "mingw-clang", "MinGW (clang compiler)" },
{ "nacl", "Native Client" },
{ "nacl-arm", "Native Client - ARM" },
+ { "netbsd", "NetBSD" },
{ "osx", "OSX (GCC compiler)" },
{ "osx-clang", "OSX (Clang compiler)" },
{ "pnacl", "Native Client - PNaCl" },
@@ -147,6 +148,10 @@ function toolchain(_buildDir, _subDir)
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-freebsd")
end
+ if "netbsd" == _OPTIONS["gcc"] then
+ location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-netbsd")
+ end
+
if "ios-arm" == _OPTIONS["gcc"] then
premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
@@ -590,7 +595,29 @@ function toolchain(_buildDir, _subDir)
configuration { "freebsd", "x64", "Debug" }
targetdir (_buildDir .. "freebsd" .. "/bin/x64/Debug")
-
+
+ configuration { "netbsd", "x32" }
+ objdir (_buildDir .. "netbsd" .. "/obj")
+ buildoptions {
+ "-m32",
+ }
+ configuration { "netbsd", "x32", "Release" }
+ targetdir (_buildDir .. "netbsd" .. "/bin/x32/Release")
+
+ configuration { "netbsd", "x32", "Debug" }
+ targetdir (_buildDir .. "netbsd" .. "/bin/x32/Debug")
+
+ configuration { "netbsd", "x64" }
+ objdir (_buildDir .. "netbsd" .. "/obj")
+ buildoptions {
+ "-m64",
+ }
+ configuration { "netbsd", "x64", "Release" }
+ targetdir (_buildDir .. "netbsd" .. "/bin/x64/Release")
+
+ configuration { "netbsd", "x64", "Debug" }
+ targetdir (_buildDir .. "netbsd" .. "/bin/x64/Debug")
+
configuration { "android-*" }
includedirs {
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/include",