Skip to content

Commit

Permalink
Merge pull request #5035 from maron2000/sdl1_fix
Browse files Browse the repository at this point in the history
Fix SDL1 build error (Linux & MinGW)
  • Loading branch information
joncampbell123 authored Jun 5, 2024
2 parents 2ef882f + b819b65 commit 4510173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions build-mingw
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ sed -i 's/^#define ENABLE_IM_EVENT 1$/\/\/#define ENABLE_IM_EVENT 1/g' vs/sdl/in

# prefer to compile against our own copy of SDL 1.x
echo "Compiling our internal SDL 1.x"
cp vs/sdl/build-dosbox.sh vs/sdl/build-dosbox.bak
sed -i 's/^make -j3/sed -i '"'"'s\/\^CFLAGS\.\*\/CFLAGS = -g -O2 -Wno-error=incompatible-pointer-types\/g'"'"' \.\/Makefile\nmake -j3/g' vs/sdl/build-dosbox.sh
(cd vs/sdl && ./build-dosbox.sh) || exit 1

# prefer to compile against our own copy of SDLnet 1.x
Expand All @@ -39,9 +37,6 @@ echo "Compiling our internal SDLnet 1.x"

sed -i 's/^\/\/#define ENABLE_IM_EVENT 1$/#define ENABLE_IM_EVENT 1/g' vs/sdl/include/SDL_platform.h
(cd vs/sdl && ./build-dosbox.sh) || exit 1
rm vs/sdl/build-dosbox.sh
mv vs/sdl/build-dosbox.bak vs/sdl/build-dosbox.sh
chmod +x vs/sdl/build-dosbox.sh

# NTS: MinGW provides zlib for us
if false; then
Expand Down
3 changes: 3 additions & 0 deletions vs/sdl/build-dosbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ mkdir -p linux-build || exit 1
mkdir -p linux-build/build || exit 1
mkdir -p linux-build/include || exit 1

#Don't treat incompatible-pointer-types warnings as errors (gcc-14)
sed -i 's/^CFLAGS\(.*\)/CFLAGS\1 -Wno-error=incompatible-pointer-types/g' ./Makefile

make -j3 || exit 1
make install || exit 1 # will install into ./linux-host

Expand Down

0 comments on commit 4510173

Please sign in to comment.