#!/bin/bash # # Copyright (C) 2025 KonstaKANG # # SPDX-License-Identifier: LGPL-2.1-or-later # if [ ! -d "$ANDROID_NDK_HOME" ]; then echo "ANDROID_NDK_HOME environment variable is not properly set!" exit 1 fi export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64 export TARGET=aarch64-linux-android export API=35 export CC="$TOOLCHAIN/bin/clang --target=$TARGET$API" export CXX="$TOOLCHAIN/bin/clang++ --target=$TARGET$API" export AR=$TOOLCHAIN/bin/llvm-ar export AS=$CC export LD=$TOOLCHAIN/bin/ld export RANLIB=$TOOLCHAIN/bin/llvm-ranlib export STRIP=$TOOLCHAIN/bin/llvm-strip echo "Running autoconf..." touch ltconfig libtoolize --force --copy --automake aclocal autoheader automake --foreign --copy --add-missing touch depcomp autoconf ALSA_CONFIG=" \ --disable-aload \ --host=aarch64-linux \ --with-configdir=/vendor/etc/alsa \ --with-plugindir=/vendor/etc/alsa/lib/alsa-lib \ --with-versioned=false" echo "Generating configuration..." echo "./configure $ALSA_CONFIG $TARGET" ./configure $ALSA_CONFIG $TARGET cat > include/version.h <