3 # we assuem this script is <ardour-src>/tools/x-win/compile.sh
4 pushd "`/usr/bin/dirname \"$0\"`" > /dev/null; this_script_dir="`pwd`"; popd > /dev/null
5 cd $this_script_dir/../..
6 test -f gtk2_ardour/wscript || exit 1
8 : ${XARCH=i686} # or x86_64
12 if test "$XARCH" = "x86_64" -o "$XARCH" = "amd64"; then
13 echo "Target: 64bit Windows (x86_64)"
14 XPREFIX=x86_64-w64-mingw32
16 DEBIANPKGS="mingw-w64"
18 echo "Target: 32 Windows (i686)"
19 XPREFIX=i686-w64-mingw32
21 DEBIANPKGS="gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools mingw32"
24 : ${PREFIX=${ROOT}/win-stack-$WARCH}
26 if test -z "${ARDOURCFG}"; then
27 ARDOURCFG="--with-dummy --windows-vst"
28 if test -f ${PREFIX}/include/pa_asio.h; then
29 ARDOURCFG="$ARDOURCFG --with-wavesbackend"
33 if [ "$(id -u)" = "0" ]; then
34 apt-get -y install build-essential \
36 git autoconf automake libtool pkg-config yasm python
38 #fixup mingw64 ccache for now
39 if test -d /usr/lib/ccache -a -f /usr/bin/ccache; then
40 export PATH="/usr/lib/ccache:${PATH}"
42 test -L ${XPREFIX}-gcc || ln -s ../../bin/ccache ${XPREFIX}-gcc
43 test -L ${XPREFIX}-g++ || ln -s ../../bin/ccache ${XPREFIX}-g++
48 ################################################################################
51 export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
53 export CC=${XPREFIX}-gcc
54 export CXX=${XPREFIX}-g++
55 export CPP=${XPREFIX}-cpp
56 export AR=${XPREFIX}-ar
57 export LD=${XPREFIX}-ld
58 export NM=${XPREFIX}-nm
59 export AS=${XPREFIX}-as
60 export STRIP=${XPREFIX}-strip
61 export WINRC=${XPREFIX}-windres
62 export RANLIB=${XPREFIX}-ranlib
63 export DLLTOOL=${XPREFIX}-dlltool
66 CFLAGS="-mstackrealign" \
67 CXXFLAGS="-mstackrealign" \
68 LDFLAGS="-L${PREFIX}/lib" ./waf configure \
70 --also-include=${PREFIX}/include \