Browse Source

Merge pull request #525 from bmx-ng/bcc_hk

Haiku initial support.
Brucey 5 years ago
parent
commit
b1028ae483
2 changed files with 11 additions and 1 deletions
  1. 5 0
      options.bmx
  2. 6 1
      parser.bmx

+ 5 - 0
options.bmx

@@ -62,6 +62,7 @@ Global opt_arch:String
 '    android
 '    raspberrypi
 '    nx
+'    haiku
 Global opt_platform:String
 ' framework
 Global opt_framework:String
@@ -306,6 +307,8 @@ Function DefaultOptions()
 	opt_platform = "android"
 ?raspberrypi
 	opt_platform = "raspberrypi"
+?haiku
+	opt_platform = "haiku"
 ?emscripten
 	opt_platform = "emscripten"
 ?
@@ -335,6 +338,8 @@ Function CheckConfig()
 		If tmp Then
 			osBmxPath = tmp
 		End If
+	?haiku
+		osBmxPath = config.GetString("BMXPATH_HAIKU")
 	?
 	'load default/generic path
 	If osBmxPath = "" Then osBmxPath = config.GetString("BMXPATH")

+ 6 - 1
parser.bmx

@@ -3190,7 +3190,7 @@ End Rem
 			Select opt_platform
 				Case "macos", "osx", "ios"
 					api = "macos"
-				Case "linux", "android", "raspberrypi"
+				Case "linux", "android", "raspberrypi", "haiku"
 					api = "linux"
 				Case "win32"
 					api = "win32"
@@ -4639,6 +4639,11 @@ Function EvalS$( source$,ty:TType )
 	env.InsertDecl New TConstDecl.Create( "raspberrypiARM",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="raspberrypi" And opt_arch="arm"),0 )
 	env.InsertDecl New TConstDecl.Create( "raspberrypiARM64",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="raspberrypi" And opt_arch="arm64"),0 )
 
+	' haiku
+	env.InsertDecl New TConstDecl.Create( "haiku",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="haiku" And (opt_arch="x86" Or opt_arch="x64")),0 )
+	env.InsertDecl New TConstDecl.Create( "haikux86",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="haiku" And opt_arch="x86"),0 )
+	env.InsertDecl New TConstDecl.Create( "haikux64",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="haiku" And opt_arch="x64"),0 )
+
 	' emscripten
 	env.InsertDecl New TConstDecl.Create( "emscripten",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="emscripten" ),0 )
 	env.InsertDecl New TConstDecl.Create( "emscriptenjs",New TIntType,New TConstExpr.Create( New TIntType,opt_platform="emscripten" And opt_arch="js"),0 )