Merge pull request #1834 from gepatto/8.2.0-Dev
set correct paths for ndll for linxuarm and linuxarm64 (raspberrypi)
This commit is contained in:
@@ -235,9 +235,6 @@
|
||||
|
||||
<section if="rpi">
|
||||
|
||||
<compilerflag value="-I/opt/vc/include" />
|
||||
<compilerflag value="-I/opt/vc/include/interface/vcos/pthreads" />
|
||||
<compilerflag value="-I/opt/vc/include/interface/vmcs_host/linux" />
|
||||
<compilerflag value="-I/usr/include/libdrm" />
|
||||
<compilerflag value="-I/usr/include/dbus-1.0" />
|
||||
<compilerflag value="-I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include" unless="HXCPP_ARM64" />
|
||||
@@ -510,9 +507,6 @@
|
||||
<lib name="-lm" />
|
||||
<lib name="-lEGL" />
|
||||
<lib name="-lGLESv2" />
|
||||
<!-- For legacy Pi driver support -->
|
||||
<lib name="-lbcm_host" />
|
||||
<lib name="-L/opt/vc/lib" />
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -107,6 +107,14 @@ class HTML5Helper
|
||||
{
|
||||
suffix += "32";
|
||||
}
|
||||
else if( System.hostArchitecture == ARMV7)
|
||||
{
|
||||
suffix += "Arm";
|
||||
}
|
||||
else if( System.hostArchitecture == ARM64)
|
||||
{
|
||||
suffix += "Arm64";
|
||||
}
|
||||
else
|
||||
{
|
||||
suffix += "64";
|
||||
|
||||
@@ -496,16 +496,14 @@ class CommandLineTools
|
||||
|
||||
case LINUX:
|
||||
var arguments = Sys.args();
|
||||
var raspberryPi = false;
|
||||
|
||||
for (argument in arguments)
|
||||
if (System.hostArchitecture == ARMV7 )
|
||||
{
|
||||
if (argument == "-rpi") raspberryPi = true;
|
||||
untyped $loader.path = $array(path + "LinuxArm/", $loader.path);
|
||||
}
|
||||
|
||||
if (raspberryPi || System.hostArchitecture == ARMV6 || System.hostArchitecture == ARMV7)
|
||||
else if (System.hostArchitecture == ARM64)
|
||||
{
|
||||
untyped $loader.path = $array(path + "RPi/", $loader.path);
|
||||
untyped $loader.path = $array(path + "LinuxArm64/", $loader.path);
|
||||
}
|
||||
else if (System.hostArchitecture == X64)
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ class RunScript
|
||||
|
||||
if (!rebuildBinaries) return;
|
||||
|
||||
var platforms = ["Windows", "Mac", "Mac64", "MacArm64", "Linux", "Linux64"];
|
||||
var platforms = ["Windows", "Mac", "Mac64", "MacArm64", "Linux", "Linux64", "LinuxArm", "LinuxArm64"];
|
||||
|
||||
for (platform in platforms)
|
||||
{
|
||||
@@ -70,14 +70,14 @@ class RunScript
|
||||
System.runCommand(limeDirectory, "neko", args.concat(["mac", toolsDirectory]));
|
||||
}
|
||||
|
||||
case "Linux":
|
||||
if (System.hostPlatform == LINUX && System.hostArchitecture != X64)
|
||||
case "Linux", "LinuxArm":
|
||||
if (System.hostPlatform == LINUX && System.hostArchitecture != X64 && System.hostArchitecture != ARM64)
|
||||
{
|
||||
System.runCommand(limeDirectory, "neko", args.concat(["linux", "-32", toolsDirectory]));
|
||||
}
|
||||
|
||||
case "Linux64":
|
||||
if (System.hostPlatform == LINUX && System.hostArchitecture == X64)
|
||||
case "Linux64", "LinuxArm64":
|
||||
if (System.hostPlatform == LINUX && (System.hostArchitecture == X64 || System.hostArchitecture == ARM64))
|
||||
{
|
||||
System.runCommand(limeDirectory, "neko", args.concat(["linux", "-64", toolsDirectory]));
|
||||
}
|
||||
|
||||
@@ -78,16 +78,14 @@ class SVGExport
|
||||
|
||||
case LINUX:
|
||||
var arguments = Sys.args();
|
||||
var raspberryPi = false;
|
||||
|
||||
for (argument in arguments)
|
||||
if ( System.hostArchitecture == ARMV7 )
|
||||
{
|
||||
if (argument == "-rpi") raspberryPi = true;
|
||||
untyped $loader.path = $array(path + "LinuxArm/", $loader.path);
|
||||
}
|
||||
|
||||
if (raspberryPi)
|
||||
else if (System.hostArchitecture == ARM64)
|
||||
{
|
||||
untyped $loader.path = $array(path + "RPi/", $loader.path);
|
||||
untyped $loader.path = $array(path + "LinuxArm64/", $loader.path);
|
||||
}
|
||||
else if (System.hostArchitecture == X64)
|
||||
{
|
||||
|
||||
@@ -95,6 +95,8 @@ class LinuxPlatform extends PlatformTarget
|
||||
defaults.architectures = [ARMV6];
|
||||
case ARMV7:
|
||||
defaults.architectures = [ARMV7];
|
||||
case ARM64:
|
||||
defaults.architectures = [ARM64];
|
||||
case X86:
|
||||
defaults.architectures = [X86];
|
||||
case X64:
|
||||
@@ -120,24 +122,16 @@ class LinuxPlatform extends PlatformTarget
|
||||
|
||||
for (architecture in project.architectures)
|
||||
{
|
||||
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32") && architecture == Architecture.X64)
|
||||
if (!targetFlags.exists("32") && !targetFlags.exists("x86_32") && (architecture == Architecture.X64 || architecture == Architecture.ARM64))
|
||||
{
|
||||
is64 = true;
|
||||
}
|
||||
else if (architecture == Architecture.ARMV7)
|
||||
{
|
||||
// TODO: can we assume this is actually a Pi? probably not. -JT
|
||||
isRaspberryPi = true;
|
||||
is64 = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (project.targetFlags.exists("rpi"))
|
||||
{
|
||||
isRaspberryPi = true;
|
||||
is64 = targetFlags.exists("64");
|
||||
}
|
||||
|
||||
if (project.targetFlags.exists("neko"))
|
||||
{
|
||||
targetType = "neko";
|
||||
@@ -189,16 +183,9 @@ class LinuxPlatform extends PlatformTarget
|
||||
{
|
||||
ProjectHelper.copyLibrary(project, ndll, "Linux" + (is64 ? "64" : ""), "", ".hdll", applicationDirectory, project.debug, targetSuffix);
|
||||
}
|
||||
else if (isRaspberryPi)
|
||||
{
|
||||
ProjectHelper.copyLibrary(project, ndll, "RPi" + (is64 ? "64" : ""), "",
|
||||
(ndll.haxelib != null
|
||||
&& (ndll.haxelib.name == "hxcpp" || ndll.haxelib.name == "hxlibc")) ? ".dso" : ".ndll", applicationDirectory,
|
||||
project.debug, targetSuffix);
|
||||
}
|
||||
else
|
||||
{
|
||||
ProjectHelper.copyLibrary(project, ndll, "Linux" + (is64 ? "64" : ""), "",
|
||||
ProjectHelper.copyLibrary(project, ndll, "Linux" + (( System.hostArchitecture == ARMV7 || System.hostArchitecture == ARM64)?"Arm":"") + (is64 ? "64" : ""), "",
|
||||
(ndll.haxelib != null
|
||||
&& (ndll.haxelib.name == "hxcpp" || ndll.haxelib.name == "hxlibc")) ? ".dll" : ".ndll", applicationDirectory,
|
||||
project.debug, targetSuffix);
|
||||
@@ -212,16 +199,9 @@ class LinuxPlatform extends PlatformTarget
|
||||
|
||||
if (noOutput) return;
|
||||
|
||||
if (isRaspberryPi)
|
||||
{
|
||||
NekoHelper.createExecutable(project.templatePaths, "rpi", targetDirectory + "/obj/ApplicationMain.n", executablePath);
|
||||
NekoHelper.copyLibraries(project.templatePaths, "rpi", applicationDirectory);
|
||||
}
|
||||
else
|
||||
{
|
||||
NekoHelper.createExecutable(project.templatePaths, "linux" + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
|
||||
NekoHelper.copyLibraries(project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory);
|
||||
}
|
||||
NekoHelper.createExecutable(project.templatePaths, "linux" + (( System.hostArchitecture == ARMV7 || System.hostArchitecture == ARM64)?"Arm":"") + (is64 ? "64" : ""), targetDirectory + "/obj/ApplicationMain.n", executablePath);
|
||||
NekoHelper.copyLibraries(project.templatePaths, "linux" + (is64 ? "64" : ""), applicationDirectory);
|
||||
|
||||
}
|
||||
else if (targetType == "hl")
|
||||
{
|
||||
@@ -287,7 +267,7 @@ class LinuxPlatform extends PlatformTarget
|
||||
|
||||
if (is64)
|
||||
{
|
||||
if (isRaspberryPi)
|
||||
if (System.hostArchitecture == ARM64)
|
||||
{
|
||||
haxeArgs.push("-D");
|
||||
haxeArgs.push("HXCPP_ARM64");
|
||||
@@ -418,7 +398,7 @@ class LinuxPlatform extends PlatformTarget
|
||||
{
|
||||
// var project = project.clone ();
|
||||
|
||||
if (isRaspberryPi)
|
||||
if(targetFlags.exists('rpi'))
|
||||
{
|
||||
project.haxedefs.set("rpi", 1);
|
||||
}
|
||||
@@ -475,36 +455,33 @@ class LinuxPlatform extends PlatformTarget
|
||||
{
|
||||
var commands = [];
|
||||
|
||||
if (targetFlags.exists("rpi"))
|
||||
if (System.hostArchitecture == ARM64 )
|
||||
{
|
||||
if (is64)
|
||||
{
|
||||
commands.push([
|
||||
"-Dlinux",
|
||||
"-Drpi",
|
||||
"-Dtoolchain=linux",
|
||||
"-DBINDIR=RPi64",
|
||||
"-DHXCPP_ARM64",
|
||||
"-DCXX=aarch64-linux-gnu-g++",
|
||||
"-DHXCPP_STRIP=aarch64-linux-gnu-strip",
|
||||
"-DHXCPP_AR=aarch64-linux-gnu-ar",
|
||||
"-DHXCPP_RANLIB=aarch64-linux-gnu-ranlib"
|
||||
]);
|
||||
}
|
||||
else
|
||||
{
|
||||
commands.push([
|
||||
"-Dlinux",
|
||||
"-Drpi",
|
||||
"-Dtoolchain=linux",
|
||||
"-DBINDIR=RPi",
|
||||
"-DHXCPP_M32",
|
||||
"-DCXX=arm-linux-gnueabihf-g++",
|
||||
"-DHXCPP_STRIP=arm-linux-gnueabihf-strip",
|
||||
"-DHXCPP_AR=arm-linux-gnueabihf-ar",
|
||||
"-DHXCPP_RANLIB=arm-linux-gnueabihf-ranlib"
|
||||
]);
|
||||
}
|
||||
commands.push([
|
||||
"-Dlinux",
|
||||
"-Drpi",
|
||||
"-Dtoolchain=linux",
|
||||
"-DBINDIR=LinuxArm64",
|
||||
"-DHXCPP_ARM64",
|
||||
"-DCXX=aarch64-linux-gnu-g++",
|
||||
"-DHXCPP_STRIP=aarch64-linux-gnu-strip",
|
||||
"-DHXCPP_AR=aarch64-linux-gnu-ar",
|
||||
"-DHXCPP_RANLIB=aarch64-linux-gnu-ranlib"
|
||||
]);
|
||||
}
|
||||
else if (System.hostArchitecture == ARMV7)
|
||||
{
|
||||
commands.push([
|
||||
"-Dlinux",
|
||||
"-Drpi",
|
||||
"-Dtoolchain=linux",
|
||||
"-DBINDIR=LinuxArm",
|
||||
"-DHXCPP_M32",
|
||||
"-DCXX=arm-linux-gnueabihf-g++",
|
||||
"-DHXCPP_STRIP=arm-linux-gnueabihf-strip",
|
||||
"-DHXCPP_AR=arm-linux-gnueabihf-ar",
|
||||
"-DHXCPP_RANLIB=arm-linux-gnueabihf-ranlib"
|
||||
]);
|
||||
}
|
||||
else if (targetFlags.exists("hl") && System.hostArchitecture == X64)
|
||||
{
|
||||
@@ -590,14 +567,7 @@ class LinuxPlatform extends PlatformTarget
|
||||
|
||||
if (ndll.path == null || ndll.path == "")
|
||||
{
|
||||
if (isRaspberryPi)
|
||||
{
|
||||
context.ndlls[i].path = NDLL.getLibraryPath(ndll, "RPi" + (is64 ? "64" : ""), "lib", ".a", project.debug);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.ndlls[i].path = NDLL.getLibraryPath(ndll, "Linux" + (is64 ? "64" : ""), "lib", ".a", project.debug);
|
||||
}
|
||||
context.ndlls[i].path = NDLL.getLibraryPath(ndll, "Linux" + (( System.hostArchitecture == ARMV7 || System.hostArchitecture == ARM64) ? "Arm" : "") + (is64 ? "64" : ""), "lib", ".a", project.debug);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user