Read Options.txt in iOS makefile build (fixes #323)
This commit is contained in:
@@ -45,40 +45,38 @@ debug_print:
|
|||||||
LIB_BASE := build/$(CONFIG)/ApplicationMain$(DEBUG)
|
LIB_BASE := build/$(CONFIG)/ApplicationMain$(DEBUG)
|
||||||
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
||||||
|
|
||||||
export HXCPP_COMPILE_THREADS := 2
|
|
||||||
|
|
||||||
build-haxe-i386:
|
build-haxe-i386:
|
||||||
@echo "Haxe simulator build: $(CONFIG)"
|
@echo "Haxe simulator build: $(CONFIG)"
|
||||||
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
|
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
|
||||||
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphonesim.a ../lib/i386$(LIB_DEST)
|
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphonesim.a ../lib/i386$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-x86_64:
|
build-haxe-x86_64:
|
||||||
@echo "Haxe simulator build: $(CONFIG)-64"
|
@echo "Haxe simulator build: $(CONFIG)-64"
|
||||||
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
||||||
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_M64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_M64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphonesim-64.a ../lib/x86_64$(LIB_DEST)
|
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphonesim-64.a ../lib/x86_64$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-armv6:
|
build-haxe-armv6:
|
||||||
@echo "Haxe device build: $(CONFIG)"
|
@echo "Haxe device build: $(CONFIG)"
|
||||||
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG)
|
||||||
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV6 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV6 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphoneos.a ../lib/armv6$(LIB_DEST)
|
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphoneos.a ../lib/armv6$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-armv7:
|
build-haxe-armv7:
|
||||||
@echo "Haxe device build: $(CONFIG)-v7"
|
@echo "Haxe device build: $(CONFIG)-v7"
|
||||||
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG)-v7 $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG)-v7 $(DEBUG)
|
||||||
cd build/$(CONFIG)-v7; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV7 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-v7; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV7 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-v7/ApplicationMain$(DEBUG).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
|
cp build/$(CONFIG)-v7/ApplicationMain$(DEBUG).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-arm64:
|
build-haxe-arm64:
|
||||||
@echo "Haxe device build: $(CONFIG)-64"
|
@echo "Haxe device build: $(CONFIG)-64"
|
||||||
haxe Build.hxml -D HXCPP_ARM64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARM64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
||||||
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARM64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARM64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphoneos-64.a ../lib/arm64$(LIB_DEST)
|
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphoneos-64.a ../lib/arm64$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
|
|||||||
@@ -225,31 +225,6 @@ class IOSPlatform extends PlatformTarget {
|
|||||||
context.CPP_BUILD_LIBRARY = project.config.getString ("cpp.buildLibrary", "hxcpp");
|
context.CPP_BUILD_LIBRARY = project.config.getString ("cpp.buildLibrary", "hxcpp");
|
||||||
context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat (project.config.getArrayString ("ios.linker-flags"));
|
context.IOS_LINKER_FLAGS = ["-stdlib=libc++"].concat (project.config.getArrayString ("ios.linker-flags"));
|
||||||
|
|
||||||
var compilerFlags = "";
|
|
||||||
|
|
||||||
for (key in project.haxedefs.keys ()) {
|
|
||||||
|
|
||||||
switch (key) {
|
|
||||||
|
|
||||||
case "no-compilation":
|
|
||||||
default:
|
|
||||||
|
|
||||||
var value = project.haxedefs.get (key);
|
|
||||||
|
|
||||||
if (value == null || value == "") {
|
|
||||||
|
|
||||||
value = "1";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
compilerFlags += " -D" + StringTools.replace (key, "-", "_") + "=\"" + value + "\"";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
context.CPP_BUILD_LIBRARY_FLAGS = compilerFlags;
|
|
||||||
|
|
||||||
switch (project.window.orientation) {
|
switch (project.window.orientation) {
|
||||||
|
|
||||||
case PORTRAIT:
|
case PORTRAIT:
|
||||||
|
|||||||
@@ -45,40 +45,38 @@ debug_print:
|
|||||||
LIB_BASE := build/$(CONFIG)/ApplicationMain$(DEBUG)
|
LIB_BASE := build/$(CONFIG)/ApplicationMain$(DEBUG)
|
||||||
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
LIB_DEST := $(DEBUG)/libApplicationMain.a
|
||||||
|
|
||||||
export HXCPP_COMPILE_THREADS := 2
|
|
||||||
|
|
||||||
build-haxe-i386:
|
build-haxe-i386:
|
||||||
@echo "Haxe simulator build: $(CONFIG)"
|
@echo "Haxe simulator build: $(CONFIG)"
|
||||||
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
|
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
|
||||||
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphonesim.a ../lib/i386$(LIB_DEST)
|
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphonesim.a ../lib/i386$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-x86_64:
|
build-haxe-x86_64:
|
||||||
@echo "Haxe simulator build: $(CONFIG)-64"
|
@echo "Haxe simulator build: $(CONFIG)-64"
|
||||||
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
||||||
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_M64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -Dsimulator -DHXCPP_M64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphonesim-64.a ../lib/x86_64$(LIB_DEST)
|
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphonesim-64.a ../lib/x86_64$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-armv6:
|
build-haxe-armv6:
|
||||||
@echo "Haxe device build: $(CONFIG)"
|
@echo "Haxe device build: $(CONFIG)"
|
||||||
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG)
|
||||||
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV6 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG); export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV6 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphoneos.a ../lib/armv6$(LIB_DEST)
|
cp build/$(CONFIG)/ApplicationMain$(DEBUG).iphoneos.a ../lib/armv6$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-armv7:
|
build-haxe-armv7:
|
||||||
@echo "Haxe device build: $(CONFIG)-v7"
|
@echo "Haxe device build: $(CONFIG)-v7"
|
||||||
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG)-v7 $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG)-v7 $(DEBUG)
|
||||||
cd build/$(CONFIG)-v7; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV7 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-v7; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARMV7 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-v7/ApplicationMain$(DEBUG).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
|
cp build/$(CONFIG)-v7/ApplicationMain$(DEBUG).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
build-haxe-arm64:
|
build-haxe-arm64:
|
||||||
@echo "Haxe device build: $(CONFIG)-64"
|
@echo "Haxe device build: $(CONFIG)-64"
|
||||||
haxe Build.hxml -D HXCPP_ARM64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
haxe Build.hxml -D HXCPP_ARM64 -cpp build/$(CONFIG)-64 $(DEBUG)
|
||||||
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARM64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) ::CPP_BUILD_LIBRARY_FLAGS::
|
cd build/$(CONFIG)-64; export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml -Dios -Diphone -DHXCPP_ARM64 -DHXCPP_CPP11 $(DEF_DEBUG) $(HXCPP_CLANG) `grep " -D" Options.txt`
|
||||||
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphoneos-64.a ../lib/arm64$(LIB_DEST)
|
cp build/$(CONFIG)-64/ApplicationMain$(DEBUG).iphoneos-64.a ../lib/arm64$(LIB_DEST)
|
||||||
touch ../Classes/Main.mm
|
touch ../Classes/Main.mm
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user