Skip to content

Instantly share code, notes, and snippets.

@fgsfdsfgs
Last active December 25, 2022 04:27
Show Gist options
  • Save fgsfdsfgs/dfb38bb86188e54f362c450353c8c448 to your computer and use it in GitHub Desktop.
Save fgsfdsfgs/dfb38bb86188e54f362c450353c8c448 to your computer and use it in GitHub Desktop.
# get libsndfile-1.0.31 and patch it with this patch https://gist.github.com/fgsfdsfgs/8011e922f078df64ba3d93d3870d30fd
# build sndfile (it will error out after successfully building libsndfile.a, that's ok)
$ mkdir build && cd build
$ aarch64-none-elf-cmake -G"Unix Makefiles" -DBUILD_SHARED_LIBS=OFF -DBUILD_PROGRAMS=OFF -DBUILD_EXAMPLES=OFF -DENABLE_CPACK=OFF -DENABLE_EXTERNAL_LIBS=OFF ..
$ make
$ cp libsndfile.a $DEVKITPRO/portlibs/switch/lib/
$ cp include/sndfile.h $DEVKITPRO/portlibs/switch/include/
# build alure
$ wget https://kcat.tomasu.net/alure-releases/alure-1.2.tar.gz
$ tar xvzf alure-1.2.tar.gz
$ cd alure-1.2/build
$ aarch64-none-elf-cmake -G"Unix Makefiles" \
-DDYNLOAD=OFF -DDUMB=OFF -DMODPLUG=OFF -DFLUIDSYNTH=OFF -DBUILD_SHARED=OFF -DBUILD_EXAMPLES=OFF -DOPENAL_FOUND=YES \
-DOPENAL_INCLUDE_DIRS="$DEVKITPRO/portlibs/switch/include" -DOPENAL_LIBRARY_DIRS="$DEVKITPRO/portlibs/switch/lib" \
..
$ make
$ cp libalure-static.a $DEVKITPRO/portlibs/switch/lib/libalure.a
$ cp ../include/AL/alure.h $DEVKITPRO/portlibs/switch/include/AL/
# build xmp
$ git clone https://github.com/libxmp/libxmp.git
$ cd libxmp
$ mkdir build && cd build
$ aarch64-none-elf-cmake -G"Unix Makefiles" -DBUILD_SHARED=OFF -DLIBXMP_PIC=ON -DLIBXMP_DISABLE_DEPACKERS=ON -DLIBXMP_DISABLE_PROWIZARD=ON ..
$ make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment