2016-10-19 23:17:19 +02:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
if [ -z "${OUT_DIR}" ]; then
|
|
|
|
echo Must set OUT_DIR
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
TOP=$(pwd)
|
|
|
|
|
2016-11-09 22:00:16 +01:00
|
|
|
source build/envsetup.sh
|
|
|
|
PLATFORM_SDK_VERSION=$(get_build_var PLATFORM_SDK_VERSION)
|
|
|
|
|
2016-10-19 23:17:19 +02:00
|
|
|
SOONG_OUT=${OUT_DIR}/soong
|
|
|
|
SOONG_NDK_OUT=${OUT_DIR}/soong/ndk
|
|
|
|
rm -rf ${SOONG_OUT}
|
|
|
|
mkdir -p ${SOONG_OUT}
|
|
|
|
cat > ${SOONG_OUT}/soong.config << EOF
|
|
|
|
{
|
2016-11-09 22:00:16 +01:00
|
|
|
"Ndk_abis": true,
|
|
|
|
"Platform_sdk_version": ${PLATFORM_SDK_VERSION}
|
2016-10-19 23:17:19 +02:00
|
|
|
}
|
|
|
|
EOF
|
|
|
|
BUILDDIR=${SOONG_OUT} ./bootstrap.bash
|
|
|
|
${SOONG_OUT}/soong ${SOONG_OUT}/ndk.timestamp
|
|
|
|
|
|
|
|
if [ -n "${DIST_DIR}" ]; then
|
|
|
|
mkdir -p ${DIST_DIR} || true
|
|
|
|
tar cjf ${DIST_DIR}/ndk_platform.tar.bz2 -C ${SOONG_OUT} ndk
|
|
|
|
fi
|