summaryrefslogtreecommitdiff
path: root/src/poi-service/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/poi-service/build.sh')
-rwxr-xr-xsrc/poi-service/build.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/poi-service/build.sh b/src/poi-service/build.sh
new file mode 100755
index 0000000..b6fe81c
--- /dev/null
+++ b/src/poi-service/build.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+debug="OFF"
+dbus="ON"
+clean=0
+
+while getopts cdh opt
+do
+ case $opt in
+ c)
+ clean=1
+ ;;
+ d)
+ debug="ON"
+ ;;
+ h)
+ echo "Usage:"
+ echo "$0 [-cd]"
+ echo "-c: Rebuild with clean"
+ echo "-d: Enable the debug messages"
+ exit 1
+ esac
+done
+set -e
+
+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
+
+echo 'build poi-server'
+if [ "$clean" = 1 ]
+then
+ cmake -DWITH_DEBUG=$debug ../
+fi
+make
+
+