jack2: bump to 1.9.21
[kiss-trunc88.git] / mgba / build
blob37df1e45d73587c0e84d11c79527939927a67889
1 #!/bin/sh -e
3 export DESTDIR="$1"
5 # declaration mismatch in include/mgba/core/thread.h
6 export CPPFLAGS="$CPPFLAGS -fno-strict-aliasing"
8 # Get rid of any bundled stuff we don't want
9 for pkg in discord-rpc libpng lzma sqlite3; do
10 rm -r "src/third-party/$pkg"
11 done
13 cmake -B build \
14 -DCMAKE_INSTALL_PREFIX=/usr \
15 -DCMAKE_INSTALL_LIBDIR=/usr/lib \
16 -DCMAKE_SKIP_RPATH=ON \
17 -DBUILD_GL=ON \
18 -DBUILD_PYTHON=OFF \
19 -DBUILD_QT=OFF \
20 -DBUILD_SDL=ON \
21 -DBUILD_SHARED=ON \
22 -DBUILD_TEST=OFF \
23 -DBUILD_SUITE=OFF \
24 -DM_CORE_GB=ON \
25 -DM_CORE_GBA=ON \
26 -DUSE_DEBUGGERS=OFF \
27 -DUSE_DISCORD_RPC=OFF \
28 -DUSE_EDITLINE=OFF \
29 -DUSE_ELF=OFF \
30 -DUSE_EPOXY=OFF \
31 -DUSE_FFMPEG=OFF \
32 -DUSE_GDB_STUB=OFF \
33 -DUSE_LIBZIP=OFF \
34 -DUSE_LZMA=OFF \
35 -DUSE_MINIZIP=OFF \
36 -DUSE_PNG=ON \
37 -DUSE_SQLITE3=OFF \
38 -DUSE_ZLIB=ON
40 cmake --build build
41 cmake --install build
43 # delete unused files
44 rm -rf "$1/usr/share/icons"
45 rm -rf "$1/usr/share/doc"
47 # delete config cruft
48 rm -f "$1/usr/include/mgba/flags.h"
49 rm -rf "$1/usr/include/mgba/internal/arm"
50 rm -rf "$1/usr/include/mgba/internal/debugger"
51 rm -rf "$1/usr/include/mgba/internal/sm83"