Move library builds into /lib so they can be shared.
Also made the library build script more generic.
This commit is contained in:
1
platform-darwin/External/libjson-c
vendored
1
platform-darwin/External/libjson-c
vendored
Submodule platform-darwin/External/libjson-c deleted from 3e5ad38a83
1
platform-darwin/External/libsodium
vendored
1
platform-darwin/External/libsodium
vendored
Submodule platform-darwin/External/libsodium deleted from 4809639ae1
@@ -1789,7 +1789,7 @@
|
||||
DA0979151E9A81EE00F0BFE8 /* lib */,
|
||||
);
|
||||
name = "libsodium-ios";
|
||||
path = "libsodium/libsodium-ios";
|
||||
path = "../../lib/libsodium/build-ios~/out";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DA0978D91E9A81EE00F0BFE8 /* include */ = {
|
||||
@@ -2128,7 +2128,7 @@
|
||||
DAB7AE751F3D755B00C856B1 /* lib */,
|
||||
);
|
||||
name = "libjson-c-ios";
|
||||
path = "libjson-c/libjson-c-ios";
|
||||
path = "../../lib/libjson-c/build-ios~/out";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DAB7AE5F1F3D755B00C856B1 /* include */ = {
|
||||
@@ -3389,7 +3389,7 @@
|
||||
buildConfigurationList = DAB7AE411F3D464A00C856B1 /* Build configuration list for PBXLegacyTarget "libjson-c-ios" */;
|
||||
buildPhases = (
|
||||
);
|
||||
buildToolPath = "Scripts/build_libjson-c-ios";
|
||||
buildToolPath = "../lib/bin/build_libjson-c-ios";
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
);
|
||||
@@ -3403,7 +3403,8 @@
|
||||
buildConfigurationList = DAB7AE481F3D468300C856B1 /* Build configuration list for PBXLegacyTarget "libsodium-ios" */;
|
||||
buildPhases = (
|
||||
);
|
||||
buildToolPath = "Scripts/build_libsodium-ios";
|
||||
buildToolPath = "../lib/bin/build_libsodium-ios";
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
);
|
||||
name = "libsodium-ios";
|
||||
@@ -4360,8 +4361,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-ios/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -4685,8 +4686,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-ios/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -4724,8 +4725,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-ios/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
|
@@ -1203,14 +1203,14 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
DA0979181E9A824700F0BFE8 /* libsodium-osx */ = {
|
||||
DA0979181E9A824700F0BFE8 /* libsodium-macos */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DA0979191E9A824700F0BFE8 /* include */,
|
||||
DA0979551E9A824700F0BFE8 /* lib */,
|
||||
);
|
||||
name = "libsodium-osx";
|
||||
path = "libsodium/libsodium-osx";
|
||||
name = "libsodium-macos";
|
||||
path = "../../lib/libsodium/build-macos~/out";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DA0979191E9A824700F0BFE8 /* include */ = {
|
||||
@@ -1944,14 +1944,14 @@
|
||||
path = KCOrderedAccessorFix;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DAB7AE781F3D757B00C856B1 /* libjson-c-osx */ = {
|
||||
DAB7AE781F3D757B00C856B1 /* libjson-c-macos */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DAB7AE791F3D757B00C856B1 /* include */,
|
||||
DAB7AE8F1F3D757B00C856B1 /* lib */,
|
||||
);
|
||||
name = "libjson-c-osx";
|
||||
path = "libjson-c/libjson-c-osx";
|
||||
name = "libjson-c-macos";
|
||||
path = "../../lib/libjson-c/build-macos~/out";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DAB7AE791F3D757B00C856B1 /* include */ = {
|
||||
@@ -2011,8 +2011,8 @@
|
||||
DACA22121705DDC5002C6C22 /* External */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DAB7AE781F3D757B00C856B1 /* libjson-c-osx */,
|
||||
DA0979181E9A824700F0BFE8 /* libsodium-osx */,
|
||||
DAB7AE781F3D757B00C856B1 /* libjson-c-macos */,
|
||||
DA0979181E9A824700F0BFE8 /* libsodium-macos */,
|
||||
DACA29751705E2BD002C6C22 /* jrswizzle */,
|
||||
DAADCC6819FB007F00987B1D /* KCOrderedAccessorFix */,
|
||||
DA3B8449190FC5A900246EEA /* Mac */,
|
||||
@@ -2312,31 +2312,31 @@
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXLegacyTarget section */
|
||||
DA5B0B611F3D416500B663F0 /* libsodium-osx */ = {
|
||||
DA5B0B611F3D416500B663F0 /* libsodium-macos */ = {
|
||||
isa = PBXLegacyTarget;
|
||||
buildArgumentsString = "$(ACTION)";
|
||||
buildConfigurationList = DA5B0B621F3D416500B663F0 /* Build configuration list for PBXLegacyTarget "libsodium-osx" */;
|
||||
buildConfigurationList = DA5B0B621F3D416500B663F0 /* Build configuration list for PBXLegacyTarget "libsodium-macos" */;
|
||||
buildPhases = (
|
||||
);
|
||||
buildToolPath = "Scripts/build_libsodium-osx";
|
||||
buildToolPath = "../lib/bin/build_libsodium-macos";
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
);
|
||||
name = "libsodium-osx";
|
||||
name = "libsodium-macos";
|
||||
passBuildSettingsInEnvironment = 1;
|
||||
productName = "libsodium-osx";
|
||||
};
|
||||
DAB7AE421F3D466D00C856B1 /* libjson-c-osx */ = {
|
||||
DAB7AE421F3D466D00C856B1 /* libjson-c-macos */ = {
|
||||
isa = PBXLegacyTarget;
|
||||
buildArgumentsString = "$(ACTION)";
|
||||
buildConfigurationList = DAB7AE431F3D466D00C856B1 /* Build configuration list for PBXLegacyTarget "libjson-c-osx" */;
|
||||
buildConfigurationList = DAB7AE431F3D466D00C856B1 /* Build configuration list for PBXLegacyTarget "libjson-c-macos" */;
|
||||
buildPhases = (
|
||||
);
|
||||
buildToolPath = "Scripts/build_libjson-c-osx";
|
||||
buildToolPath = "../lib/bin/build_libjson-c-macos";
|
||||
buildWorkingDirectory = "";
|
||||
dependencies = (
|
||||
);
|
||||
name = "libjson-c-osx";
|
||||
name = "libjson-c-macos";
|
||||
passBuildSettingsInEnvironment = 1;
|
||||
productName = "libjson-c";
|
||||
};
|
||||
@@ -2553,8 +2553,8 @@
|
||||
DA67743A1A474A03004F356A /* mpw-test */,
|
||||
DA1C7AC61F1A8FD8009A3551 /* mpw-bench */,
|
||||
DA1C7AA61F1A8F24009A3551 /* mpw-cli */,
|
||||
DA5B0B611F3D416500B663F0 /* libsodium-osx */,
|
||||
DAB7AE421F3D466D00C856B1 /* libjson-c-osx */,
|
||||
DA5B0B611F3D416500B663F0 /* libsodium-macos */,
|
||||
DAB7AE421F3D466D00C856B1 /* libjson-c-macos */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
@@ -2843,32 +2843,32 @@
|
||||
/* Begin PBXTargetDependency section */
|
||||
DAB7AE351F3D423600C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-osx */;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-macos */;
|
||||
targetProxy = DAB7AE341F3D423600C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DAB7AE371F3D423D00C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-osx */;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-macos */;
|
||||
targetProxy = DAB7AE361F3D423D00C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DAB7AE391F3D424200C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-osx */;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-macos */;
|
||||
targetProxy = DAB7AE381F3D424200C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DAB7AE3B1F3D424700C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-osx */;
|
||||
target = DA5B0B611F3D416500B663F0 /* libsodium-macos */;
|
||||
targetProxy = DAB7AE3A1F3D424700C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DAB7AE521F3D649400C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DAB7AE421F3D466D00C856B1 /* libjson-c-osx */;
|
||||
target = DAB7AE421F3D466D00C856B1 /* libjson-c-macos */;
|
||||
targetProxy = DAB7AE511F3D649400C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DAB7AE581F3D64A600C856B1 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = DAB7AE421F3D466D00C856B1 /* libjson-c-osx */;
|
||||
target = DAB7AE421F3D466D00C856B1 /* libjson-c-macos */;
|
||||
targetProxy = DAB7AE571F3D64A600C856B1 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DABFA072176E3FDF00E83589 /* PBXTargetDependency */ = {
|
||||
@@ -3036,8 +3036,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3094,7 +3094,7 @@
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3109,8 +3109,8 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3128,8 +3128,8 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3147,8 +3147,8 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3166,7 +3166,7 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3182,7 +3182,7 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3198,7 +3198,7 @@
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3499,8 +3499,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3531,8 +3531,8 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
"$(PROJECT_DIR)/../lib/libjson-c/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3555,7 +3555,7 @@
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3575,7 +3575,7 @@
|
||||
);
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/External/libsodium/libsodium-osx/lib",
|
||||
"$(PROJECT_DIR)/../lib/libsodium/build-macos~/out/lib",
|
||||
);
|
||||
OTHER_CFLAGS = (
|
||||
"-DMPW_SODIUM=1",
|
||||
@@ -3734,7 +3734,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Test;
|
||||
};
|
||||
DA5B0B621F3D416500B663F0 /* Build configuration list for PBXLegacyTarget "libsodium-osx" */ = {
|
||||
DA5B0B621F3D416500B663F0 /* Build configuration list for PBXLegacyTarget "libsodium-macos" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DA5B0B631F3D416500B663F0 /* Debug */,
|
||||
@@ -3784,7 +3784,7 @@
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Test;
|
||||
};
|
||||
DAB7AE431F3D466D00C856B1 /* Build configuration list for PBXLegacyTarget "libjson-c-osx" */ = {
|
||||
DAB7AE431F3D466D00C856B1 /* Build configuration list for PBXLegacyTarget "libjson-c-macos" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DAB7AE441F3D466D00C856B1 /* Debug */,
|
||||
|
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
hash automake || { echo >&2 "Missing automake."; exit 1; }
|
||||
hash autoreconf || { echo >&2 "Missing autoconf."; exit 1; }
|
||||
hash libtool || hash glibtool || { echo >&2 "Missing libtool."; exit 1; }
|
||||
|
||||
cd "${BASH_SOURCE%/*}/../External/libjson-c"
|
||||
[[ $1 = clean ]] && { [[ ! -e Makefile ]] || make -s distclean; exit; }
|
||||
[[ -e "${prefix=$PWD/libjson-c-ios}/lib/libjson-c.a" ]] && exit
|
||||
|
||||
# Prepare
|
||||
autoreconf -Iautoconf-archive/m4 --verbose --install --symlink 2> >(sed 's/^\([^:]*\):[0-9]\{1,\}: /\1: /')
|
||||
rm -rf "${prefix=$PWD/libjson-c-ios}"
|
||||
mkdir -p "$prefix/lib" \
|
||||
"${prefix_i386=$prefix/tmp/i386}" \
|
||||
"${prefix_x86_64=$prefix/tmp/x86_64}" \
|
||||
"${prefix_armv7=$prefix/tmp/armv7}" \
|
||||
"${prefix_armv7s=$prefix/tmp/armv7s}" \
|
||||
"${prefix_arm64=$prefix/tmp/arm64}"
|
||||
|
||||
# Targets
|
||||
(
|
||||
## ARCH: i386
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphonesimulator)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphonesimulator)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch i386 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g $CFLAGS"
|
||||
export LDFLAGS="-arch i386 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --host=i686-apple --disable-shared --prefix="$prefix_i386"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: x86_64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphonesimulator)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphonesimulator)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch x86_64 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g $CFLAGS"
|
||||
export LDFLAGS="-arch x86_64 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --host=x86_64-apple --disable-shared --prefix="$prefix_x86_64"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: armv7
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch armv7 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch armv7 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --prefix="$prefix_armv7"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: armv7s
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch armv7s -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch armv7s -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --prefix="$prefix_armv7s"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: arm64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch arm64 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch arm64 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --prefix="$prefix_arm64"
|
||||
make -j3 install
|
||||
)
|
||||
|
||||
# Merge Binaries
|
||||
mv -f -- "$prefix_arm64/include" "$prefix/"
|
||||
lipo -create \
|
||||
"$prefix_i386/lib/libjson-c.a" \
|
||||
"$prefix_x86_64/lib/libjson-c.a" \
|
||||
"$prefix_armv7/lib/libjson-c.a" \
|
||||
"$prefix_armv7s/lib/libjson-c.a" \
|
||||
"$prefix_arm64/lib/libjson-c.a" \
|
||||
-output "$prefix/lib/libjson-c.a"
|
||||
|
||||
# Cleanup
|
||||
rm -rf -- "$prefix/tmp"
|
||||
make -s really-clean
|
@@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
hash automake || { echo >&2 "Missing automake."; exit 1; }
|
||||
hash autoreconf || { echo >&2 "Missing autoconf."; exit 1; }
|
||||
hash libtool || hash glibtool || { echo >&2 "Missing libtool."; exit 1; }
|
||||
|
||||
cd "${BASH_SOURCE%/*}/../External/libjson-c"
|
||||
[[ $1 = clean ]] && { [[ ! -e Makefile ]] || make -s distclean; exit; }
|
||||
[[ -e "${prefix=$PWD/libjson-c-osx}/lib/libjson-c.a" ]] && exit
|
||||
|
||||
# Prepare
|
||||
autoreconf -Iautoconf-archive/m4 --verbose --install --symlink 2> >(sed 's/^\([^:]*\):[0-9]\{1,\}: /\1: /')
|
||||
rm -rf "${prefix=$PWD/libjson-c-osx}"
|
||||
mkdir -p "$prefix"
|
||||
|
||||
# Targets
|
||||
(
|
||||
## ARCH: x86_64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk macosx)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk macosx)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch x86_64 -isysroot $SDKROOT -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET:-10.8} -O2 -g $CFLAGS" # -flto
|
||||
export LDFLAGS="-arch x86_64 -isysroot $SDKROOT -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET:-10.8} $LDFLAGS" # -flto
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s clean
|
||||
./configure --disable-shared --prefix="$prefix"
|
||||
make -j3 check
|
||||
make -j3 install
|
||||
)
|
||||
|
||||
# Cleanup
|
||||
make -s really-clean
|
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
hash automake || { echo >&2 "Missing automake."; exit 1; }
|
||||
hash autoreconf || { echo >&2 "Missing autoconf."; exit 1; }
|
||||
hash libtool || hash glibtool || { echo >&2 "Missing libtool."; exit 1; }
|
||||
|
||||
cd "${BASH_SOURCE%/*}/../External/libsodium"
|
||||
[[ $1 = clean ]] && { [[ ! -e Makefile ]] || make -s distclean; exit; }
|
||||
[[ -e "${prefix=$PWD/libsodium-ios}/lib/libsodium.a" ]] && exit
|
||||
|
||||
# Prepare
|
||||
autoreconf --verbose --install --symlink 2> >(sed 's/^\([^:]*\):[0-9]\{1,\}: /\1: /')
|
||||
rm -rf "${prefix=$PWD/libsodium-ios}"
|
||||
mkdir -p "$prefix/lib" \
|
||||
"${prefix_i386=$prefix/tmp/i386}" \
|
||||
"${prefix_x86_64=$prefix/tmp/x86_64}" \
|
||||
"${prefix_armv7=$prefix/tmp/armv7}" \
|
||||
"${prefix_armv7s=$prefix/tmp/armv7s}" \
|
||||
"${prefix_arm64=$prefix/tmp/arm64}"
|
||||
|
||||
# Targets
|
||||
(
|
||||
## ARCH: i386
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphonesimulator)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphonesimulator)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch i386 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-arch i386 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --host=i686-apple --disable-shared --enable-minimal --prefix="$prefix_i386"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: x86_64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphonesimulator)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphonesimulator)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch x86_64 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-arch x86_64 -isysroot $SDKROOT -mios-simulator-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --host=x86_64-apple --disable-shared --enable-minimal --prefix="$prefix_x86_64"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: armv7
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch armv7 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch armv7 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --enable-minimal --prefix="$prefix_armv7"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: armv7s
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch armv7s -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch armv7s -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --enable-minimal --prefix="$prefix_armv7s"
|
||||
make -j3 install
|
||||
)
|
||||
(
|
||||
## ARCH: arm64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk iphoneos)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk iphoneos)/usr/bin:$PATH"
|
||||
export CFLAGS="-mthumb -arch arm64 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-mthumb -arch arm64 -isysroot $SDKROOT -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET:-8.0} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --host=x86_64-apple --target=arm-apple --disable-shared --enable-minimal --prefix="$prefix_arm64"
|
||||
make -j3 install
|
||||
)
|
||||
|
||||
# Merge Binaries
|
||||
mv -f -- "$prefix_arm64/include" "$prefix/"
|
||||
lipo -create \
|
||||
"$prefix_i386/lib/libsodium.a" \
|
||||
"$prefix_x86_64/lib/libsodium.a" \
|
||||
"$prefix_armv7/lib/libsodium.a" \
|
||||
"$prefix_armv7s/lib/libsodium.a" \
|
||||
"$prefix_arm64/lib/libsodium.a" \
|
||||
-output "$prefix/lib/libsodium.a"
|
||||
|
||||
# Cleanup
|
||||
rm -rf -- "$prefix/tmp"
|
||||
make -s distclean
|
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
hash automake || { echo >&2 "Missing automake."; exit 1; }
|
||||
hash autoreconf || { echo >&2 "Missing autoconf."; exit 1; }
|
||||
hash libtool || hash glibtool || { echo >&2 "Missing libtool."; exit 1; }
|
||||
|
||||
cd "${BASH_SOURCE%/*}/../External/libsodium"
|
||||
[[ $1 = clean ]] && { [[ ! -e Makefile ]] || make -s distclean; exit; }
|
||||
[[ -e "${prefix=$PWD/libsodium-osx}/lib/libsodium.a" ]] && exit
|
||||
|
||||
# Inspired by libsodium/dist-build/osx.sh
|
||||
# Prepare
|
||||
autoreconf --verbose --install --symlink 2> >(sed 's/^\([^:]*\):[0-9]\{1,\}: /\1: /')
|
||||
rm -rf "${prefix=$PWD/libsodium-osx}"
|
||||
mkdir -p "$prefix"
|
||||
|
||||
# Targets
|
||||
(
|
||||
## ARCH: x86_64
|
||||
SDKROOT="$(xcrun --show-sdk-path --sdk macosx)"
|
||||
PATH="$(xcrun --show-sdk-platform-path --sdk macosx)/usr/bin:$PATH"
|
||||
export CFLAGS="-arch x86_64 -isysroot $SDKROOT -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET:-10.8} -O2 -g -flto $CFLAGS"
|
||||
export LDFLAGS="-arch x86_64 -isysroot $SDKROOT -mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET:-10.8} -flto $LDFLAGS"
|
||||
export CPPFLAGS="$CFLAGS $CPPFLAGS"
|
||||
[[ -e Makefile ]] && make -s distclean
|
||||
./configure --disable-shared --enable-minimal --prefix="$prefix"
|
||||
make -j3 check
|
||||
make -j3 install
|
||||
)
|
||||
|
||||
# Cleanup
|
||||
make -s distclean
|
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# This script should be in the 'Scripts' directory under the git repository's root.
|
||||
cd "${BASH_SOURCE%/*}/.."
|
||||
shopt -s extglob
|
||||
|
||||
|
||||
## Submodules that need to be checked out.
|
||||
dependencies=( External/{InAppSettingsKit,Pearl{,:External/jrswizzle,:External/uicolor-utilities},RHStatusItemView} )
|
||||
|
||||
## Custom migration.
|
||||
# None yet.
|
||||
|
||||
|
||||
################################################################################
|
||||
isCheckedOut() {
|
||||
local modulePath=$1
|
||||
! git submodule status | grep -q "^-[^ ]* $modulePath"
|
||||
}
|
||||
|
||||
# git submodule sync -- A bug causes this to init ALL external dependencies.
|
||||
git submodule sync $(git submodule status | awk '/^ / { print $2 }')
|
||||
|
||||
|
||||
# Check out our missing dependencies
|
||||
for dependency in "${dependencies[@]}"; do
|
||||
[[ $dependency = *:* ]] && root=${dependency%%:*} || root=.
|
||||
path=${dependency#*:}
|
||||
( cd "$root"; git submodule update --init "$path" )
|
||||
done
|
||||
|
||||
|
||||
# Update our modules
|
||||
git submodule update
|
||||
|
||||
|
||||
# Our modules may define a custom update script, if so, run it.
|
||||
find !(Scripts)/ -name "${BASH_SOURCE##*/}" -exec {} \;
|
||||
|
||||
|
||||
# Finally, for our modules that haven't got a custom update script, update them recursively.
|
||||
git submodule update --recursive --rebase
|
Reference in New Issue
Block a user