forked from wsvn53/adb-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
android-tools/build | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
[submodule "android-tools"] | ||
path = android-tools | ||
url = https://github.com/nmeum/android-tools.git | ||
[submodule "ios-cmake"] | ||
path = ios-cmake | ||
url = https://github.com/leetal/ios-cmake.git | ||
[submodule "external/lz4"] | ||
path = external/lz4 | ||
url = https://android.googlesource.com/platform/external/lz4 |
Submodule lz4
added at
baf8b2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
iphone: lz4 | ||
@echo "|-> Making liblz4 ..." | ||
|
||
lz4: lz4/iphoneos/arm64 lz4/iphonesimulator/x86_64 | ||
|
||
lz4/%: | ||
@echo "|-> Making $@ ..." | ||
TARGET=$@ OUTPUT=../output bash ./scripts/make-lz4.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Common Supports: | ||
# - TARGET=lz4/iphoneos/arm64 | ||
# - OUTPUT=... | ||
|
||
[[ -z "$TARGET" ]] && echo "** ERROR: TARGET is REQUIRED." && exit 1; | ||
[[ -z "$OUTPUT" ]] && echo "** ERROR: OUTPUT is REQUIRED." && exit 1; | ||
|
||
LIB_NAME=$(echo "$TARGET" | cut -d/ -f1); | ||
SDK_NAME=$(echo "$TARGET" | cut -d/ -f2); | ||
ARCH_NAME=$(echo "$TARGET" | cut -d/ -f3); | ||
|
||
# Src root | ||
SOURCE_ROOT=$(cd $(dirname $0)/../.. && pwd); | ||
|
||
# Prepare output path | ||
FULL_OUTPUT=$(cd $OUTPUT && pwd)/$SDK_NAME/$ARCH_NAME; | ||
[[ ! -d $FULL_OUTPUT ]] && mkdir -p $FULL_OUTPUT; | ||
|
||
# For iphone, change to platform | ||
PLATFORM=$([[ $SDK_NAME == iphoneos ]] && echo "OS64" || echo "SIMULATOR64"); | ||
|
||
# Setup iphone deploy target | ||
DEPLOYMENT_TARGET=10.0; | ||
|
||
# Setup toolchains | ||
if [[ $SDK_NAME == *iphone* ]]; then | ||
CMAKE_TOOLCHAIN_FILE=$SOURCE_ROOT/ios-cmake/ios.toolchain.cmake; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
. $(dirname $0)/defines.sh; | ||
|
||
echo " - Lib Name: $LIB_NAME"; | ||
echo " - SDK Name: $SDK_NAME"; | ||
echo " - Arch Name: $ARCH_NAME"; | ||
echo " - CMake Toolchain: $CMAKE_TOOLCHAIN_FILE"; | ||
|
||
cmake_root=$SOURCE_ROOT/external/lz4/contrib/cmake_unofficial/out; | ||
|
||
# Clean built products | ||
[[ -d "$cmake_root" ]] && rm -rfv "$cmake_root"; | ||
mkdir -pv "$cmake_root"; | ||
|
||
cd "$cmake_root"; | ||
|
||
cmake .. -G Xcode -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DPLATFORM=$PLATFORM \ | ||
-DDEPLOYMENT_TARGET=$DEPLOYMENT_TARGET -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF; | ||
cmake --build . --config Release --target lz4_static; | ||
find . -name "*.a" -exec cp -av {} $FULL_OUTPUT \; |