summaryrefslogtreecommitdiffstats
path: root/build.sh
blob: 0d6f4eb3a799081d59d560ed0700121427cf9db4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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