-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathconfigure.meson
More file actions
executable file
·48 lines (41 loc) · 843 Bytes
/
configure.meson
File metadata and controls
executable file
·48 lines (41 loc) · 843 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
usage() {
echo "$0 [-b <build_dir>] [-c] [-d] [-- <meson_args>]"
echo -e "\t-c selects clang for build"
}
CROSS_F="toolchain.ini"
BLD="build"
while getopts "b:cdh" opt; do
case "$opt" in
b)
BLD="$OPTARG"
;;
c)
CROSS_F="toolchain-clang.ini"
;;
d)
DEBUG="1"
;;
h)
usage
exit 0
;;
\?)
exit 1
;;
esac
done
shift $(($OPTIND-1))
TOP=$(dirname "$0")
if [ "$DEBUG" != "1" ]; then
ARGS="--buildtype=debugoptimized -Db_lto=true"
else
ARGS="--buildtype=debug -Db_lto=false"
fi
meson setup \
--cross-file $TOP/fdpp/kernel/$CROSS_F $ARGS $* $BLD $TOP
[ "$?" = "0" ] || exit 1
echo
echo "Done configure"
echo "Now run \"meson compile --verbose -C $BLD\" to build"
echo "After that you can do \"meson install -C $BLD\" to install"