2017-06-26 11:09:17 +02:00
|
|
|
#!/bin/sh
|
2017-06-26 11:15:12 +02:00
|
|
|
cd $1
|
2017-06-26 11:09:17 +02:00
|
|
|
|
2017-06-26 11:15:12 +02:00
|
|
|
if [ "$BLD" = autotools ]; then
|
2017-06-26 11:25:37 +02:00
|
|
|
set -ex
|
2017-06-26 11:15:12 +02:00
|
|
|
autoreconf -vis
|
|
|
|
mkdir build-autotools
|
|
|
|
cd build-autotools
|
2017-06-26 11:21:28 +02:00
|
|
|
../configure --prefix=$HOME/.local CFLAGS="-I$HOME/.local/include" LDFLAGS="-L$HOME/.local/lib"
|
2017-06-26 11:15:12 +02:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
elif [ "$BLD" = cmake ]; then
|
2017-06-26 11:25:37 +02:00
|
|
|
set -ex
|
2017-06-26 11:15:12 +02:00
|
|
|
mkdir build-cmake
|
|
|
|
cd build-cmake
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
else
|
|
|
|
echo "Unsupported build system: '$BLD'" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|