... | ... |
@@ -24,11 +24,18 @@ fi |
24 | 24 |
|
25 | 25 |
mkdir -p bin |
26 | 26 |
CFLAGS="-std=c89 -Wall -Wno-unknown-pragmas" |
27 |
-if [ -n "${MSYSTEM}" ]; then |
|
27 |
+case "$(uname -s 2>/dev/null)" in |
|
28 |
+MSYS_NT*) # MSYS2 on Windows |
|
28 | 29 |
UXNEMU_LDFLAGS="-static $(sdl2-config --cflags --static-libs)" |
29 |
-else |
|
30 |
+ ;; |
|
31 |
+Darwin) # macOS |
|
32 |
+ CFLAGS="${CFLAGS} -Wno-typedef-redefinition" |
|
33 |
+ UXNEMU_LDFLAGS="/usr/local/lib/libSDL2.a $(sdl2-config --cflags --static-libs | sed -e 's/-lSDL2 //')" |
|
34 |
+ ;; |
|
35 |
+Linux|*) |
|
30 | 36 |
UXNEMU_LDFLAGS="-L/usr/local/lib $(sdl2-config --cflags --libs)" |
31 |
-fi |
|
37 |
+ ;; |
|
38 |
+esac |
|
32 | 39 |
|
33 | 40 |
if [ "${1}" = '--debug' ]; |
34 | 41 |
then |