2023-05-23 23:36:06 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
. ./sdk.sh
|
|
|
|
OPENAL_VERSION=1.23.1
|
|
|
|
|
|
|
|
if [ ! -d openal-src ]; then
|
|
|
|
git clone -b $OPENAL_VERSION --depth 1 https://github.com/kcat/openal-soft openal-src
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd openal-src/build
|
|
|
|
|
|
|
|
cmake .. \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DLIBTYPE=STATIC \
|
|
|
|
-DALSOFT_EMBED_HRTF_DATA=ON \
|
|
|
|
-DALSOFT_UTILS=OFF \
|
|
|
|
-DALSOFT_EXAMPLES=OFF \
|
|
|
|
-DALSOFT_BACKEND_WAVE=OFF \
|
|
|
|
-DALSOFT_BACKEND_SNDIO=OFF \
|
|
|
|
-DCMAKE_C_FLAGS="$CFLAGS" \
|
|
|
|
-DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC"
|
|
|
|
|
2023-08-01 02:02:59 +03:00
|
|
|
cmake --build . -j${NPROC}
|
2023-05-23 23:36:06 +02:00
|
|
|
|
|
|
|
# update `include` folder
|
|
|
|
rm -rf ../../openal/include
|
|
|
|
mkdir -p ../../openal/include
|
|
|
|
cp -a ../include ../../openal
|
|
|
|
cp -a *.h ../../openal/include
|
|
|
|
# update lib
|
|
|
|
rm -rf ../../openal/lib
|
|
|
|
mkdir -p ../../openal/lib
|
|
|
|
cp libOpenAL32.a ../../openal/lib
|
|
|
|
|
|
|
|
echo "OpenAL-Soft build successful"
|