summaryrefslogtreecommitdiff
path: root/src/navigation/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/navigation/build.sh')
-rwxr-xr-xsrc/navigation/build.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/navigation/build.sh b/src/navigation/build.sh
new file mode 100755
index 0000000..e91a68b
--- /dev/null
+++ b/src/navigation/build.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+clean=0
+
+while getopts c opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ \?)
+ echo "Usage:"
+ echo "$0 [-c ]"
+ echo "-c: Rebuild with clean"
+ exit 1
+ esac
+done
+
+if [ "$clean" = 1 ]
+then
+ echo 'clean up the build folder'
+ if [ -d "./build" ]
+ then
+ find ./build ! -name '*.cbp' -type f -exec rm -f {} +
+ fi
+fi
+
+mkdir -p build
+cd build
+mkdir -p navit
+cd navit
+echo 'build navit'
+if [ "$clean" = 1 ]
+then
+ cmake -DDISABLE_QT=1 -DSAMPLE_MAP=0 -Dvehicle/null=1 -Dgraphics/qt_qpainter=0 ../../navit/
+fi
+make
+cd ../
+echo 'build navigation'
+if [ "$clean" = 1 ]
+then
+ cmake ../
+fi
+make
+cd ..
+
+