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 QMAKE_CXXFLAGS *= -fno-strict-aliasing
} }
*lyoob* {
message("lyoobyoo")
}
*clang* { *clang* {
# disable enormous amount of warnings about CGAL # disable enormous amount of warnings about CGAL
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter

View File

@ -20,36 +20,17 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
exit 0 exit 0
fi fi
if [ $OPENSCAD_LIBRARIES ]; then . ./scripts/setenv-mingw-xbuild.sh
echo "OPENSCAD_LIBRARIES env variable is already set. Please re-run from a clean shell."
exit 0
fi
BASEDIR=$HOME/openscad_deps if [ ! -e $BASEDIR ]; then
MXEDIR=$BASEDIR/mxe
PATH=$MXEDIR/usr/bin:$PATH
mkdir -p $BASEDIR 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
fi fi
if [ ! $NUMJOBS ]; then if [ ! -e $DEPLOYDIR ]; then
echo "note: you can 'export NUMJOBS=x' for building multiple pkgs at once" mkdir -p $DEPLOYDIR
if [ $NUMCPU -gt 2 ]; then
NUMJOBS=$((NUMCPU/2))
else
NUMJOBS=1
fi fi
fi
echo NUMCPU: $NUMCPU
echo NUMJOBS: $NUMJOBS
cd $BASEDIR cd $BASEDIR
if [ ! -e mxe ]; then if [ ! -e mxe ]; then
echo "Downloading MXE into " $MXEDIR echo "Downloading MXE into " $MXEDIR
git clone git://github.com/mxe/mxe.git git clone git://github.com/mxe/mxe.git
@ -62,19 +43,21 @@ 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 "leaving" $MXEDIR
echo "entering $OPENSCADDIR" echo "entering $OPENSCADDIR"
cd $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 fi
echo "linking mingw-cross-env directory" echo "linking mxe to" $DEPLOYDIR/mingw-cross-env
ln -s $MXEDIR/usr/i686-pc-mingw32/ ./mingw-cross-env ln -s $MXEDIR/usr/i686-pc-mingw32/ $DEPLOYDIR/mingw-cross-env
echo echo
echo "now copy/paste the following to cross-build openscad" echo "now copy/paste the following to cross-build openscad"
echo echo
echo "export PATH=$MXEDIR/usr/bin:\$PATH" echo cd $DEPLOYDIR
echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env openscad.pro" echo "i686-pc-mingw32-qmake CONFIG+=mingw-cross-env ../openscad.pro"
#echo "make -j$NUMCPU" # causes parser_yacc.hpp errors #echo "make -j$NUMCPU" # causes parser_yacc.hpp errors
echo "make" echo "make"
echo echo