mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
Cleanup Bash scripts.
This makes them pass shellcheck. Except for a few unused export warnings. I also wonder if the majority of these files should be in the root of the project, or should be moved to "build-scripts" (or should still even exist). a few minor changes one more minor changes
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# allow 32-bit on 64-bit (x86) builds
|
||||
if [ "$1" == "32" ]; then
|
||||
export CC=`which gcc`" -m32"
|
||||
export CXX=`which g++`" -m32"
|
||||
if [ "${1}" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC CXX
|
||||
shift
|
||||
fi
|
||||
|
||||
@@ -17,16 +18,17 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
chmod +x configure
|
||||
|
||||
export CFLAGS="$CFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CXXFLAGS="$CXXFLAGS -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CFLAGS="${CFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
CXXFLAGS="${CXXFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
if [[ "${no_host_sdl2}" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
else
|
||||
x=`which sdl2-config`
|
||||
x=$(which sdl2-config)
|
||||
fi
|
||||
if test -z "$x" ; then
|
||||
if test -z "${x}" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
@@ -36,6 +38,6 @@ echo Compiling our internal SDLnet 1.x
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# NTS: --disable-dynamic-core is needed. the dynamic core doesn't work properly with the CFLAGS given above
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core --enable-sdl2 "$@" || exit 1
|
||||
./configure --enable-debug=heavy --prefix=/usr --disable-dynamic-core --enable-sdl2 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
Reference in New Issue
Block a user