Add build bash scripts

This commit is contained in:
zorn 2023-12-10 01:34:32 +10:00
parent 392d40e6d0
commit 0cb0e048a6
2 changed files with 36 additions and 0 deletions

21
build-libretro-android.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
set -e
cd $(dirname $0)
[ -z "$NDK" ] && echo You must specify ndk path in env like "NDK=/path/to/android-ndk-r26b $0" && exit 1
ABI=arm64-v8a
MINSDKVERSION=21
mkdir -p build-android && cd build-android
cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=$ABI \
-DANDROID_PLATFORM=android-$MINSDKVERSION \
-DENABLE_TESTS=OFF -DENABLE_DEDICATED_ROOM=OFF \
-DENABLE_SDL2=OFF -DENABLE_QT=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_SCRIPTING=OFF \
-DENABLE_OPENAL=OFF -DENABLE_LIBUSB=OFF -DCITRA_ENABLE_BUNDLE_TARGET=OFF \
..
make -j$(nproc)
SO=citra_libretro.so
echo "Core file is here => $(readlink -f $SO)"
$NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip $SO

15
build-libretro.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
cd $(dirname $0)
mkdir -p build && cd build
cmake -DENABLE_TESTS=OFF -DENABLE_DEDICATED_ROOM=OFF \
-DENABLE_SDL2=OFF -DENABLE_QT=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_SCRIPTING=OFF \
-DENABLE_OPENAL=OFF -DENABLE_LIBUSB=OFF -DCITRA_ENABLE_BUNDLE_TARGET=OFF \
..
make -j$(nproc)
SO=citra_libretro.so
echo "Core file is here => $(readlink -f $SO)"
strip $SO