summaryrefslogtreecommitdiff
path: root/scripts/setenv-unibuild.sh
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-12-05 04:18:12 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-12-05 04:18:12 (GMT)
commit03ef1a27eab727c122512b904cf93bb5fbd5f71d (patch)
treebf09526bc486219671b19911a2d17d1f3479d297 /scripts/setenv-unibuild.sh
parentfcaa4811e20121c15d4d75ae1cc31ef93d44cf81 (diff)
unify build scripts. introduce 'version checker' script. simplify instructions
Diffstat (limited to 'scripts/setenv-unibuild.sh')
-rw-r--r--scripts/setenv-unibuild.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh
new file mode 100644
index 0000000..ba99235
--- /dev/null
+++ b/scripts/setenv-unibuild.sh
@@ -0,0 +1,64 @@
+# setup environment variables for building OpenSCAD against custom built
+# dependency libraries.
+#
+# run with 'source ./scripts/setenv-unibuild.sh'
+#
+# run it every time you re-login and want to build or run openscad
+# against custom libraries installed into BASEDIR.
+#
+# used in conjuction with uni-build-dependencies.sh
+
+setenv_common()
+{
+ if [ ! $BASEDIR ]; then
+ BASEDIR=$HOME/openscad_deps
+ fi
+ DEPLOYDIR=$BASEDIR
+
+ export PATH=$BASEDIR/bin:$PATH
+ export LD_LIBRARY_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64
+ export LD_RUN_PATH=$DEPLOYDIR/lib:$DEPLOYDIR/lib64
+ export OPENSCAD_LIBRARIES=$DEPLOYDIR
+ export GLEWDIR=$DEPLOYDIR
+
+ echo BASEDIR: $BASEDIR
+ echo DEPLOYDIR: $DEPLOYDIR
+ echo PATH modified
+ echo LD_LIBRARY_PATH modified
+ echo LD_RUN_PATH modified
+ echo OPENSCAD_LIBRARIES modified
+ echo GLEWDIR modified
+
+ if [ "`command -v qmake-qt4`" ]; then
+ echo "Please re-run qmake-qt4 and run 'make clean' if necessary"
+ else
+ echo "Please re-run qmake and run 'make clean' if necessary"
+ fi
+}
+
+setenv_freebsd()
+{
+ setenv_common
+ QMAKESPEC=freebsd-g++
+ QTDIR=/usr/local/share/qt4
+}
+
+setenv_linux_clang()
+{
+ export CC=clang
+ export CXX=clang++
+ export QMAKESPEC=unsupported/linux-clang
+
+ echo CC has been modified: $CC
+ echo CXX has been modified: $CXX
+ echo QMAKESPEC has been modified: $QMAKESPEC
+}
+
+if [ "`uname | grep -i 'linux\|debian'`" ]; then
+ setenv_common
+ if [ "`echo $* | grep clang`" ]; then
+ setenv_linux_clang
+ fi
+elif [ "`uname | grep -i freebsd`" ]; then
+ setenv_freebsd
+fi
contact: Jan Huwald // Impressum