lzah: Improved some debug messages
[deark.git] / scripts / example-build-mingw.sh
blob072fe1caa91750d62f3ea7693bf5c756008e31d2
1 #!/bin/bash
3 # This is an example script to build Deark using Mingw-w64.
4 # Run this script from your main deark directory, to create mingwobj/deark.exe.
6 # I know that a shell script is not very Windows-y. It's expected to be run
7 # via Cygwin. Otherwise, you may have to translate it to suit your needs.
9 set -e
10 export DEARK_OBJDIR="mingwobj"
11 # For 32-built builds, change "x86_64" to "i686".
12 TOOLSPREFIX="x86_64-w64-mingw32-"
13 export CC=${TOOLSPREFIX}gcc.exe
14 export AR=${TOOLSPREFIX}ar.exe
15 export DEARK_WINDRES=${TOOLSPREFIX}windres.exe
16 export LDFLAGS="-Wall -municode"
18 if [ "$1" = "clean" ]
19 then
20 make clean
21 else
22 mkdir -p $DEARK_OBJDIR/src
23 mkdir -p $DEARK_OBJDIR/modules
24 make -j4 dep
25 make -j4