From 9aed17b97787d20113d6906138f9ef37b3109143 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Sun, 10 Oct 2021 20:07:40 +0100 Subject: [PATCH] Bundled SDL2 on macOS builds --- build.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index df35c33..f11b450 100755 --- a/build.sh +++ b/build.sh @@ -24,11 +24,18 @@ fi mkdir -p bin CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas" -if [ -n "${MSYSTEM}" ]; then +case "$(uname -s 2>/dev/null)" in +MSYS_NT*) # MSYS2 on Windows UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)" -else + ;; +Darwin) # macOS + CFLAGS="${CFLAGS} -Wno-typedef-redefinition" + UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')" + ;; +Linux|*) UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)" -fi + ;; +esac if [ "${1}" = '--debug' ]; then