Dan Albert | 65780b2 | 2016-10-19 14:17:19 -0700 | [diff] [blame] | 1 | #!/bin/bash -ex |
| 2 | |
| 3 | if [ -z "${OUT_DIR}" ]; then |
| 4 | echo Must set OUT_DIR |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | TOP=$(pwd) |
| 9 | |
Colin Cross | 9fe6ea8 | 2016-11-09 13:00:16 -0800 | [diff] [blame] | 10 | source build/envsetup.sh |
| 11 | PLATFORM_SDK_VERSION=$(get_build_var PLATFORM_SDK_VERSION) |
| 12 | |
Dan Albert | 65780b2 | 2016-10-19 14:17:19 -0700 | [diff] [blame] | 13 | SOONG_OUT=${OUT_DIR}/soong |
| 14 | SOONG_NDK_OUT=${OUT_DIR}/soong/ndk |
| 15 | rm -rf ${SOONG_OUT} |
| 16 | mkdir -p ${SOONG_OUT} |
| 17 | cat > ${SOONG_OUT}/soong.config << EOF |
| 18 | { |
Colin Cross | 9fe6ea8 | 2016-11-09 13:00:16 -0800 | [diff] [blame] | 19 | "Ndk_abis": true, |
| 20 | "Platform_sdk_version": ${PLATFORM_SDK_VERSION} |
Dan Albert | 65780b2 | 2016-10-19 14:17:19 -0700 | [diff] [blame] | 21 | } |
| 22 | EOF |
| 23 | BUILDDIR=${SOONG_OUT} ./bootstrap.bash |
| 24 | ${SOONG_OUT}/soong ${SOONG_OUT}/ndk.timestamp |
| 25 | |
| 26 | if [ -n "${DIST_DIR}" ]; then |
| 27 | mkdir -p ${DIST_DIR} || true |
| 28 | tar cjf ${DIST_DIR}/ndk_platform.tar.bz2 -C ${SOONG_OUT} ndk |
| 29 | fi |