20 lines
469 B
Bash
Executable file
20 lines
469 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -xe
|
|
|
|
if ! [ -d build ]; then
|
|
meson setup build
|
|
fi
|
|
|
|
[ $# -lt 1 ] && exit 0
|
|
|
|
export CC=$CC
|
|
|
|
case "$1" in
|
|
release) meson configure --buildtype=release --strip -D b_lto=true -D b_pie=true -D b_ndebug=if-release build ;;
|
|
debug) meson configure --buildtype=debug --debug --optimization=g -D b_lto=false -D b_pie=false build ;;
|
|
clean) rm -rf ./build ;;
|
|
*) echo "Valid targets are release, debug and clean." ;;
|
|
esac
|
|
|
|
# vi:set ft=sh ts=4 sw=4 noet noai:
|