Last active
November 2, 2021 10:13
-
-
Save EarlOfEgo/6881748 to your computer and use it in GitHub Desktop.
Shell script to build libxml2 for Android with the NDK.
The NDK is stored in /home/USER/Tools/android-ndk-r9/ this has to be adjusted.
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
export CROSS_COMPILE="arm-linux-androideabi" | |
export CC="${CROSS_COMPILE}-gcc" | |
export CXX="${CROSS_COMPILE}-g++" | |
export NDK="${HOME}/Tools/android-ndk-r9" | |
export SYSROOT="$NDK/platforms/android-14/arch-arm" | |
export PATH="$PATH:$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin" | |
export CPPFLAGS="--sysroot=${SYSROOT}" | |
export CFLAGS="--sysroot=${SYSROOT} -I." | |
$CC -c -I${SYSROOT}/usr/include/ -I. glob.c | |
chmod +x glob.o | |
export LIBS="${PWD}/glob.o" | |
export LDFLAGS="-L/usr/lib/" | |
./configure --build=X86_64-unknown-linux-gnu --host=${CROSS_COMPILE} --target=${CROSS_COMPILE} --without-python --enable-static --disable-shared | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where is the glob.c?