diff options
author | don bright <hugh.m.bright@gmail.com> | 2012-08-02 01:35:38 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2012-08-02 01:35:38 (GMT) |
commit | 2f3e11a797e368a7cdf9726231de7c707629751e (patch) | |
tree | f2939bcf66637504f5993fea8a74ddfff1e17df9 /scripts/setenv-mingw-xbuild.sh | |
parent | bac5e1130c3f2f2db3eec5d8d232ad25b60284c5 (diff) |
new script to set env variables for mingw cross build
Diffstat (limited to 'scripts/setenv-mingw-xbuild.sh')
-rwxr-xr-x | scripts/setenv-mingw-xbuild.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/scripts/setenv-mingw-xbuild.sh b/scripts/setenv-mingw-xbuild.sh new file mode 100755 index 0000000..c85f84e --- /dev/null +++ b/scripts/setenv-mingw-xbuild.sh @@ -0,0 +1,42 @@ +#!/bin/sh -e +# +# set environment variables for mingw/mxe cross-build +# +# Usage: source ./scripts/setenv-mingw-xbuild.sh +# +# Prerequisites: +# +# Please see http://mxe.cc/#requirements +# +# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X +# + +OPENSCADDIR=$PWD + +if [ ! $BASEDIR ]; then + BASEDIR=$HOME/openscad_deps +fi +DEPLOYDIR=$OPENSCADDIR/mingw32 +MXEDIR=$BASEDIR/mxe +PATH=$MXEDIR/usr/bin:$PATH + +echo MXEDIR: $MXEDIR +echo BASEDIR: $BASEDIR +echo DEPLOYDIR: $DEPLOYDIR +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 +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 +fi +echo NUMCPU: $NUMCPU +echo NUMJOBS: $NUMJOBS + |