summaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorNiklas2011-10-10 17:26:17 +0200
committerNiklas2011-10-10 17:26:17 +0200
commitc131ea55120adc0efe6d3b8f84f142a9e4cabf67 (patch)
tree5e1fb5f15b3e4bb41d6f514f53574a8694b05f31 /build.sh
parentnew veriosn of the fbgui src (same as in fbgui-ng) combined with my networkDi... (diff)
downloadfbgui-c131ea55120adc0efe6d3b8f84f142a9e4cabf67.tar.gz
fbgui-c131ea55120adc0efe6d3b8f84f142a9e4cabf67.tar.xz
fbgui-c131ea55120adc0efe6d3b8f84f142a9e4cabf67.zip
added new files
Diffstat (limited to 'build.sh')
-rwxr-xr-x[-rw-r--r--]build.sh32
1 files changed, 30 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 4ed283b..0d6f4eb 100644..100755
--- a/build.sh
+++ b/build.sh
@@ -1,2 +1,30 @@
-#!/bin/bash
-# TODO auto-compiler with cmake
+#!/bin/sh
+# fbsplash builder script for cmake
+DIR=$(pwd)
+BUILDDIR=build
+
+# if --clean, remove build dir
+if [ "$1" = "--clean" ]
+then
+ rm -rf $BUILDDIR
+ echo "$BUILDDIR removed."
+fi
+
+if [ ! -f CMakeLists.txt ]
+then
+ echo "No CMakeLists.txt found."
+ echo "Run this script from the folder containing CMakeLists.txt."
+ exit 1
+fi
+
+# make build dir if its not there
+[ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+
+cd $BUILDDIR
+# use cmake to create Makefile
+echo "Invoking cmake ..."
+cmake "$DIR"
+echo "Invoking make ..."
+make
+
+cd $DIR