Debian Codegraph @

build-mingw-lowend-sdl2

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/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=$(pwdscip-shell system . . pwd.)
10 if testscip-shell system . . test. -z "${top}" ; then exit 1; fi
11
12 # fix
13 chmodscip-shell system . . chmod. +x vs/sdl/build-scripts/strip_fPIC.sh
14
15 # prefer to compile against our own copy of SDL 2.x IF the system does not provide one
16 x=$(whichscip-shell system . . which. sdl2-config)
17 if testscip-shell system . . test. -z "${x}" ; then
18 echoscip-shell system . . echo. "Compiling our internal SDL 2.x"
19 (cd vs/sdl2 && ./build-dosbox.sh) || exit 1
20 fi
21
22 # prefer to compile against our own copy of SDLnet 1.x
23 echoscip-shell system . . echo. "Compiling our internal SDLnet 1.x"
24 (cd vs/sdlnet && ./build-dosbox.sh) || exit 1
25
26 # NTS: MinGW provides zlib for us
27 if falsescip-shell system . . false.; then
28 # prefer to compile against our own zlib
29 echoscip-shell system . . echo. "Compiling our internal zlib"
30 (cd vs/zlib && ./build-dosbox.sh) || exit 1
31 new="-I${top}/vs/zlib/linux-host/include "
32 nld="-L${top}/vs/zlib/linux-host/lib "
33 CFLAGS="${new}${CFLAGS}"
34 LDFLAGS="${nld}${LDFLAGS}"
35 CPPFLAGS="${new}${CPPFLAGS}"
36 CXXFLAGS="${new}${CXXFLAGS}"
37 export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
38 fi
39
40 # prefer to compile against our own libpng (comment this out to disable)
41 echoscip-shell system . . echo. "Compiling our internal libpng"
42 (cd vs/libpng && ./build-dosbox.sh) || exit 1
43 new="-I${top}/vs/libpng/linux-host/include "
44 nld="-L${top}/vs/libpng/linux-host/lib "
45 CFLAGS="${new}${CFLAGS}"
46 LDFLAGS="${nld}${LDFLAGS}"
47 CPPFLAGS="${new}${CPPFLAGS}"
48 CXXFLAGS="${new}${CXXFLAGS}"
49 export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS
50
51 # prefer to compile against our own freetype
52 echoscip-shell system . . echo. "Compiling our internal freetype"
53 (cd vs/freetype && ./build-dosbox.sh) || exit 1
54 new="-I${top}/vs/freetype/linux-host/include/freetype2 "
55 nld="-L${top}/vs/freetype/linux-host/lib -lfreetype "
56 CFLAGS="${new}${CFLAGS}"
57 LDFLAGS="${nld}${LDFLAGS}"
58 CPPFLAGS="${new}${CPPFLAGS}"
59 CXXFLAGS="${new}${CXXFLAGS}"
60 INTERNAL_FREETYPE=1
61 export CFLAGS LDFLAGS CPPFLAGS CXXFLAGS INTERNAL_FREETYPE
62
63 # now compile ourself
64 echoscip-shell system . . echo. "Compiling DOSBox-X"
65 chmodscip-shell system . . chmod. +x configure
66 # FIXME: I would like MinGW builds to enable the debugger, eventually
67 ./configure --disable-libfluidsynth --disable-libslirp --enable-d3d9 --enable-d3d-shaders --prefix=/usr --enable-sdl2 "${@}" || exit 1
68 makescip-shell system . . make. -j3 || exit 1