Commit 2a0c879a authored by nanahira's avatar nanahira

patch Makefile on macOS

parent cfd39304
...@@ -6,11 +6,23 @@ cd miniaudio ...@@ -6,11 +6,23 @@ cd miniaudio
external_built_dir="$PWD/external-built" external_built_dir="$PWD/external-built"
is_macos=false
if [ "$(uname)" = "Darwin" ]; then
is_macos=true
fi
maybe_patch_configure_output() {
if $is_macos; then
sed -i.bak 's/-force_cpusubtype_ALL//g' Makefile
fi
}
build_single_thing() { build_single_thing() {
lib_name="$1" lib_name="$1"
cd "external/$lib_name" cd "external/$lib_name"
shift shift
PKG_CONFIG_PATH="$external_built_dir/lib/pkgconfig" ./configure --prefix="$external_built_dir" --enable-static=yes --enable-shared=no "$@" PKG_CONFIG_PATH="$external_built_dir/lib/pkgconfig" ./configure --prefix="$external_built_dir" --enable-static=yes --enable-shared=no "$@"
maybe_patch_configure_output
make -j$(nproc) make -j$(nproc)
make install make install
cd ../.. cd ../..
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment