forked from astral-sh/python-build-standalone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-sqlite.sh
executable file
·28 lines (19 loc) · 1 KB
/
build-sqlite.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
set -ex
ROOT=`pwd`
export PATH=${TOOLS_PATH}/${TOOLCHAIN}/bin:${TOOLS_PATH}/host/bin:$PATH
tar -xf sqlite-autoconf-${SQLITE_VERSION}.tar.gz
pushd sqlite-autoconf-${SQLITE_VERSION}
CONFIGURE_FLAGS="--build=${BUILD_TRIPLE} --host=${TARGET_TRIPLE}"
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --prefix /tools/deps --disable-shared"
if [ "${TARGET_TRIPLE}" = "aarch64-apple-ios" ]; then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no"
elif [ "${TARGET_TRIPLE}" = "x86_64-apple-ios" ]; then
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} ac_cv_search_system=no"
fi
CFLAGS="${EXTRA_TARGET_CFLAGS} -DSQLITE_ENABLE_DBSTAT_VTAB -fPIC" CPPFLAGS="${EXTRA_TARGET_CFLAGS} -fPIC" LDFLAGS="${EXTRA_TARGET_LDFLAGS}" ./configure ${CONFIGURE_FLAGS}
make -j ${NUM_CPUS}
make -j ${NUM_CPUS} install DESTDIR=${ROOT}/out