rework mingw to be more like other builds (setenv-mingw-xbuild.sh)

felipesanches-svg
don bright 2012-08-01 20:35:12 -05:00
parent 57173bbe7a
commit bac5e1130c
2 changed files with 19 additions and 32 deletions

View File

@ -103,6 +103,10 @@ netbsd* {
QMAKE_CXXFLAGS *= -fno-strict-aliasing
}
*lyoob* {
message("lyoobyoo")
}
*clang* {
# disable enormous amount of warnings about CGAL
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter

View File

@ -20,36 +20,17 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
exit 0
fi
if [ $OPENSCAD_LIBRARIES ]; then
echo "OPENSCAD_LIBRARIES env variable is already set. Please re-run from a clean shell."
exit 0
fi
. ./scripts/setenv-mingw-xbuild.sh
BASEDIR=$HOME/openscad_deps
MXEDIR=$BASEDIR/mxe
PATH=$MXEDIR/usr/bin:$PATH
mkdir -p $BASEDIR
echo MXEDIR: $MXEDIR
echo BASEDIR: $BASEDIR
echo OPENSCADDIR: $OPENSCADDIR
echo PATH modified with $MXEDIR/usr/bin
if [ ! $NUMCPU ]; then
echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)";
NUMCPU=1
if [ ! -e $BASEDIR ]; then
mkdir -p $BASEDIR
fi
if [ ! $NUMJOBS ]; then
echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once"
if [ $NUMCPU -gt 2 ]; then
NUMJOBS=$((NUMCPU/2))
else
NUMJOBS=1
fi
if [ ! -e $DEPLOYDIR ]; then
mkdir -p $DEPLOYDIR
fi
echo NUMCPU: $NUMCPU
echo NUMJOBS: $NUMJOBS
cd $BASEDIR
if [ ! -e mxe ]; then
echo "Downloading MXE into " $MXEDIR
git clone git://github.com/mxe/mxe.git
@ -59,22 +40,24 @@ echo "entering" $MXEDIR
cd $MXEDIR
echo "make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS"
make mpfr eigen opencsg cgal qt -j $NUMCPU JOBS=$NUMJOBS
#make mpfr -j$NUMCPU JOBS=$NUMJOBS # for testing
#make mpfr -j $NUMCPU JOBS=$NUMJOBS # for testing
echo "leaving" $MXEDIR
echo "entering $OPENSCADDIR"
cd $OPENSCADDIR
if [ -e mingw-cross-env ]; then
rm ./mingw-cross-env
if [ -e $DEPLOYDIR/mingw-cross-env ]; then
rm $DEPLOYDIR/mingw-cross-env
fi
echo "linking mingw-cross-env directory"
ln -s $MXEDIR/usr/i686-pc-mingw32/ ./mingw-cross-env
echo "linking mxe to" $DEPLOYDIR/mingw-cross-env
ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env
echo
echo "now copy/paste the following to cross-build openscad"
echo
echo "export PATH=$MXEDIR/usr/bin:\$PATH"
echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env openscad.pro"
echo cd $DEPLOYDIR
echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro"
#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors
echo "make"
echo