Skip to content

Commit

Permalink
Fix internal sdlnet build on macOS, enables nullmodem/modem support o…
Browse files Browse the repository at this point in the history
…n macOS
  • Loading branch information
badlogic committed Dec 21, 2022
1 parent bcbb3e9 commit 9e0d313
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 2 additions & 4 deletions build-debug-macos
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
echo Compiling our internal SDL 1.x
(cd vs/sdl && ./build-dosbox.sh) || exit 1

# FIXME: SDLnet will compile a static library that targets a foreign architecture,
# and then ld will complain about it????????
# prefer to compile against our own copy of SDLnet 1.x
#echo Compiling our internal SDLnet 1.x
#(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
echo Compiling our internal SDLnet 1.x
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1

# prefer to compile against our own zlib
echo Compiling our internal zlib
Expand Down
6 changes: 2 additions & 4 deletions build-macos
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ export LDFLAGS="$nld$LDFLAGS"
export CPPFLAGS="$new$CPPFLAGS"
export CXXFLAGS="$new$CXXFLAGS"

# FIXME: SDLnet will compile a static library that targets a foreign architecture,
# and then ld will complain about it????????
# prefer to compile against our own copy of SDLnet 1.x
#echo Compiling our internal SDLnet 1.x
#(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
echo Compiling our internal SDLnet 1.x
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1

# prefer to compile against our own zlib
echo Compiling our internal zlib
Expand Down
4 changes: 4 additions & 0 deletions vs/sdlnet/build-dosbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ if [ "$1" == "hx-dos" ]; then
cp SDLnet.c.default SDLnet.c || exit 1
fi

# Delete libSDLmain.a and libSDL.a from archive file
# otherwise linking will fail on macOS
ar dv linux-host/lib/libSDL_net.a libSDLmain.a || true
ar dv linux-host/lib/libSDL_net.a libSDL.a || true

0 comments on commit 9e0d313

Please sign in to comment.