| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
# I'm sick and tired of all the churn the three versions of autoconf |
| 4 |
# are causing in this repo. Stop committing the configure scripts |
| 5 |
# and just autoregen. |
| 6 |
./autogen.sh || exit 1 |
| 7 |
|
| 8 |
# where are we? |
| 9 |
top=$(pwd) |
| 10 |
if test -z "${top}" ; then exit 1; fi |
| 11 |
|
| 12 |
# fix |
| 13 |
chmod +x vs/sdl/build-scripts/strip_fPIC.sh |
| 14 |
|
| 15 |
# prefer to compile against our own copy of SDL 1.x |
| 16 |
echo "Compiling our internal SDL 1.x" |
| 17 |
(cd vs/sdl && ./build-dosbox.sh) || exit 1 |
| 18 |
|
| 19 |
# prefer to compile against our own copy of SDLnet 1.x |
| 20 |
echo "Compiling our internal SDLnet 1.x" |
| 21 |
(cd vs/sdlnet && ./build-dosbox.sh) || exit 1 |
| 22 |
|
| 23 |
# NTS: MinGW provides zlib for us |
| 24 |
if false; then |
| 25 |
# prefer to compile against our own zlib |
| 26 |
echo "Compiling our internal zlib" |
| 27 |
(cd vs/zlib && ./build-dosbox.sh) || exit 1 |
| 28 |
new="-I${top}/vs/zlib/linux-host/include " |
| 29 |
nld="-L${top}/vs/zlib/linux-host/lib " |
| 30 |
CFLAGS="${new}${CFLAGS}" |
| 31 |
LDFLAGS="${nld}${LDFLAGS}" |
| 32 |
CPPFLAGS="${new}${CPPFLAGS}" |
| 33 |
CXXFLAGS="${new}${CXXFLAGS}" |
| 34 |
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS |
| 35 |
fi |
| 36 |
|
| 37 |
# prefer to compile against our own libpng (comment this out to disable) |
| 38 |
echo "Compiling our internal libpng" |
| 39 |
(cd vs/libpng && ./build-dosbox.sh) || exit 1 |
| 40 |
new="-I${top}/vs/libpng/linux-host/include " |
| 41 |
nld="-L${top}/vs/libpng/linux-host/lib " |
| 42 |
CFLAGS="${new}${CFLAGS}" |
| 43 |
LDFLAGS="${nld}${LDFLAGS}" |
| 44 |
CPPFLAGS="${new}${CPPFLAGS}" |
| 45 |
CXXFLAGS="${new}${CXXFLAGS}" |
| 46 |
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS |
| 47 |
|
| 48 |
# prefer to compile against our own freetype |
| 49 |
echo "Compiling our internal freetype" |
| 50 |
(cd vs/freetype && ./build-dosbox.sh) || exit 1 |
| 51 |
new="-I${top}/vs/freetype/linux-host/include/freetype2 " |
| 52 |
nld="-L${top}/vs/freetype/linux-host/lib -lfreetype " |
| 53 |
CFLAGS="${new}${CFLAGS}" |
| 54 |
LDFLAGS="${nld}${LDFLAGS}" |
| 55 |
CPPFLAGS="${new}${CPPFLAGS}" |
| 56 |
CXXFLAGS="${new}${CXXFLAGS}" |
| 57 |
INTERNAL_FREETYPE=1 |
| 58 |
export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE |
| 59 |
|
| 60 |
# now compile ourself |
| 61 |
echo "Compiling DOSBox-X" |
| 62 |
chmod +x configure |
| 63 |
# FIXME: I would like MinGW builds to enable the debugger, eventually |
| 64 |
./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr "${@}" || exit 1 |
| 65 |
make -j3 || exit 1 |