mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-07 18:36:09 +08:00
Fix macos build script
This commit is contained in:
parent
694cc766a4
commit
bbfa0e7c34
13
build
13
build
@ -4,15 +4,14 @@
|
||||
if [ "$1" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC
|
||||
export CXX
|
||||
export CC CXX
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d "/usr/src/doslib" ]; then doslib="/usr/src/doslib"; fi
|
||||
doslib=""
|
||||
if [ -d /usr/src/doslib ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
@ -29,15 +28,15 @@ fi
|
||||
chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
chmod +x configure
|
||||
./configure --enable-debug --prefix=/usr "${@}" "${opt}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
@ -23,15 +23,15 @@ CXXFLAGS="${CXXFLAGS} -g3 -O0 -fno-inline -fno-omit-frame-pointer"
|
||||
export CFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo Compiling our internal SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo Compiling DOSBox-X
|
||||
echo "Compiling DOSBox-X"
|
||||
# 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 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
@ -24,19 +24,21 @@ 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
|
||||
x= # doesn't work well cross-compiling
|
||||
x="" # doesn't work well cross-compiling
|
||||
else
|
||||
x=$(which sdl2-config)
|
||||
fi
|
||||
if test -z "${x}" ; then
|
||||
echo Compiling our internal SDL 2.x
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
(cd vs/sdl2 && ./build-dosbox.sh) || exit 1
|
||||
fi
|
||||
|
||||
# prefer to compile against our own copy of SDLnet 1.x
|
||||
echo Compiling our internal SDLnet 1.x
|
||||
echo "Compiling our internal SDLnet 1.x"
|
||||
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1
|
||||
|
||||
# now compile ourself
|
||||
echo "Compiling DOSBox-X"
|
||||
# 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
|
||||
make -j3 || exit 1
|
||||
|
@ -30,9 +30,9 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
x="" # doesn't work well cross-compiling
|
||||
else
|
||||
x=$(which sdl2-config)
|
||||
x="$(which sdl2-config)"
|
||||
fi
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
@ -40,8 +40,8 @@ if test -z "${x}" ; then
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
||||
# now compile ourself
|
||||
echo "Compiling DOSBox-X"
|
||||
|
26
build-macos
26
build-macos
@ -86,8 +86,8 @@ for arch in ${architectures}; do
|
||||
# prefer to compile against our own copy of SDL 1.x
|
||||
echo "Compiling our internal SDL 1.x"
|
||||
(cd vs/sdl && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/sdl/linux-host/include"
|
||||
nld=" -L$top/vs/sdl/linux-host/lib"
|
||||
new="-I${top}/vs/sdl/linux-host/include "
|
||||
nld="-L${top}/vs/sdl/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
@ -101,8 +101,8 @@ for arch in ${architectures}; do
|
||||
# prefer to compile against our own zlib
|
||||
echo "Compiling our internal zlib"
|
||||
(cd vs/zlib && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/zlib/linux-host/include"
|
||||
nld=" -L$top/vs/zlib/linux-host/lib"
|
||||
new="-I${top}/vs/zlib/linux-host/include "
|
||||
nld="-L${top}/vs/zlib/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
@ -112,8 +112,8 @@ for arch in ${architectures}; do
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/libpng/linux-host/include"
|
||||
nld=" -L$top/vs/libpng/linux-host/lib"
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
@ -121,10 +121,10 @@ for arch in ${architectures}; do
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo Compiling our internal freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new=" -I$top/vs/freetype/linux-host/include/freetype2"
|
||||
nld=" -L$top/vs/freetype/linux-host/lib -lfreetype"
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
@ -137,13 +137,13 @@ for arch in ${architectures}; do
|
||||
# if Brew has installed packages, try to use those too
|
||||
if [ -n "${!brew_cmd}" ]; then
|
||||
echo "Brew is installed, I'm going to use it's libraries too"
|
||||
new=" -I$(${!brew_cmd} --prefix)/include"
|
||||
nld=" -L$(${!brew_cmd} --prefix)/lib"
|
||||
new="-I$(${!brew_cmd} --prefix)/include "
|
||||
nld="-L$(${!brew_cmd} --prefix)/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(${!brew_cmd} --prefix)/lib/pkgconfig"
|
||||
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(${!brew_cmd} --prefix)/lib/pkgconfig"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
@ -158,4 +158,4 @@ for arch in ${architectures}; do
|
||||
make -j3 || exit 1
|
||||
|
||||
cp src/dosbox-x "src/dosbox-x-${arch}"
|
||||
done
|
||||
done
|
||||
|
@ -87,7 +87,7 @@ for arch in ${architectures}; do
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own zlib
|
||||
echo "Compiling our internal zlib"
|
||||
@ -98,7 +98,7 @@ for arch in ${architectures}; do
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo "Compiling our internal libpng"
|
||||
@ -109,7 +109,7 @@ for arch in ${architectures}; do
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
|
||||
# prefer to compile against our own freetype
|
||||
echo "Compiling our internal freetype"
|
||||
@ -121,21 +121,21 @@ for arch in ${architectures}; do
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
INTERNAL_FREETYPE=1
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
|
||||
|
||||
opts=
|
||||
|
||||
# if Brew has installed packages, try to use those too
|
||||
if [ -n "${!brew_cmd}" ]; then
|
||||
echo "Brew is installed, I'm going to use it's libraries too"
|
||||
new=" -I$(${!brew_cmd} --prefix)/include"
|
||||
nld=" -L$(${!brew_cmd} --prefix)/lib"
|
||||
new="-I$(${!brew_cmd} --prefix)/include "
|
||||
nld="-L$(${!brew_cmd} --prefix)/lib "
|
||||
CFLAGS="${CFLAGS}${new}"
|
||||
LDFLAGS="${LDFLAGS}${nld}"
|
||||
CPPFLAGS="${CPPFLAGS}${new}"
|
||||
CXXFLAGS="${CXXFLAGS}${new}"
|
||||
PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(${!brew_cmd} --prefix)/lib/pkgconfig"
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
|
||||
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS PKG_CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "${universal}" = 1 ]; then
|
||||
@ -148,5 +148,5 @@ for arch in ${architectures}; do
|
||||
./configure --enable-debug=heavy --prefix=/usr --enable-sdl2 "${opts}" "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
cp src/dosbox-x "src/dosbox-x-{$arch}"
|
||||
done
|
||||
cp src/dosbox-x "src/dosbox-x-${arch}"
|
||||
done
|
||||
|
@ -70,4 +70,3 @@ chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --enable-d3d9 --enable-d3d-shaders --disable-libfluidsynth --prefix=/usr "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
@ -49,7 +49,7 @@ export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype"
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
|
@ -40,8 +40,8 @@ fi
|
||||
# prefer to compile against our own libpng (comment this out to disable)
|
||||
echo "Compiling our internal libpng"
|
||||
(cd vs/libpng && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/libpng/linux-host/include "
|
||||
nld="-L$top/vs/libpng/linux-host/lib "
|
||||
new="-I${top}/vs/libpng/linux-host/include "
|
||||
nld="-L${top}/vs/libpng/linux-host/lib "
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
@ -51,8 +51,8 @@ export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
|
||||
# prefer to compile against our own freetype
|
||||
echo "Compiling our internal freetype"
|
||||
(cd vs/freetype && ./build-dosbox.sh) || exit 1
|
||||
new="-I$top/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L$top/vs/freetype/linux-host/lib -lfreetype "
|
||||
new="-I${top}/vs/freetype/linux-host/include/freetype2 "
|
||||
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype"
|
||||
CFLAGS="${new}${CFLAGS}"
|
||||
LDFLAGS="${nld}${LDFLAGS}"
|
||||
CPPFLAGS="${new}${CPPFLAGS}"
|
||||
@ -66,4 +66,3 @@ chmod +x configure
|
||||
# FIXME: I would like MinGW builds to enable the debugger, eventually
|
||||
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr --enable-sdl2 "${@}" || exit 1
|
||||
make -j3 || exit 1
|
||||
|
||||
|
11
build-sdl2
11
build-sdl2
@ -4,16 +4,15 @@
|
||||
if [ "$1" == "32" ]; then
|
||||
CC="$(which gcc) -m32"
|
||||
CXX="$(which g++) -m32"
|
||||
export CC
|
||||
export CXX
|
||||
export CC CXX
|
||||
no_host_sdl2=1
|
||||
shift
|
||||
opt="--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
|
||||
fi
|
||||
|
||||
# Jonathan C dev hack: refer to LNKDOS16 in /usr/src/doslib
|
||||
doslib=
|
||||
if [ -d "/usr/src/doslib" ]; then doslib="/usr/src/doslib"; fi
|
||||
doslib=""
|
||||
if [ -d /usr/src/doslib ]; then doslib="/usr/src/doslib"; fi
|
||||
|
||||
if [ -n "${doslib}" ]; then
|
||||
if [ -x "${doslib}/tool/linker/linux-host/lnkdos16" ]; then
|
||||
@ -31,9 +30,9 @@ chmod +x vs/sdl/build-scripts/strip_fPIC.sh
|
||||
|
||||
# prefer to compile against our own copy of SDL 2.x IF the system does not provide one
|
||||
if [[ "$no_host_sdl2" ]]; then
|
||||
x= # doesn't work well cross-compiling
|
||||
x="" # doesn't work well cross-compiling
|
||||
else
|
||||
x=$(which sdl2-config)
|
||||
x="$(which sdl2-config)"
|
||||
fi
|
||||
if test -z "${x}" ; then
|
||||
echo "Compiling our internal SDL 2.x"
|
||||
|
Loading…
x
Reference in New Issue
Block a user