Add option -f to build.sh (#1342)

This commit is contained in:
drmpjz
2023-05-04 20:18:17 +02:00
committed by GitHub
parent bda26d3984
commit b8344734d1

View File

@@ -24,8 +24,35 @@
# On MacOS, an attempt is made to find out whether Mac ports or brew
# are in place, and are assumed to have install the prerequisites.
usage()
{
echo "Build script for avrdude"
echo
echo "Syntax: build.sh -h -f <flags>"
echo "Options"
echo "-h Display this usage information and exit"
echo "-f <flags> Extra build flags to pass to cmake"
echo
}
ostype=$(uname | tr '[A-Z]' '[a-z]')
build_flags=""
while getopts :hf: OPT; do
case "$OPT" in
f)
build_flags="$OPTARG"
;;
h | *)
usage
exit
;;
esac
done
shift $((OPTIND-1)) # remove parsed options and args from $@ list
build_type=RelWithDebInfo
# build_type=Release # no debug info
@@ -35,8 +62,6 @@ build_type=RelWithDebInfo
#extra_enable="-D HAVE_PARPORT=1"
extra_enable=""
build_flags=""
case "${ostype}" in
linux)
# try to find out whether this is an Embedded Linux