Options now work.

This commit is contained in:
Emil 2023-08-02 21:16:42 -06:00
parent 7880fd95fb
commit d808ef6bae

View File

@ -14,13 +14,16 @@ LDFLAGS='-lircclient -lsqlite3'
mkdir -p $PREFIX && echo "Made directory: $PREFIX"
if [ ! -z ${DEBUG} ]; then CFLAG="$CFLAGS -Og -g3";
else CPPFLAGS="$CPPFLAGS -DNDEBUG";
CFLAG="$CFLAGS -O2 -flto=auto -fomit-frame-pointer -s"; fi
# Bourne shell is evil
if [ ${DEBUG} -eq 1 ]
then
CFLAGS=`echo "${CFLAGS} -Og -g3"`
else
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
CFLAGS=`echo "${CFLAGS} -O2 -flto=auto -fomit-frame-pointer -s"`
fi
[ ! -z ${SAN} ] && CFLAG="$CFLAGS -fsanitize=$SAN"
[ ! -e $DIR/include/config.h ] && cp $DIR/include/config.mk.h $DIR/include/config.h
[ ! -z ${SAN} ] && CFLAGS=`echo "$CFLAGS -fsanitize=$SAN"`
echo "$CC $CFLAGS -pipe $DIR/src/unity.c -o $PREFIX/$PROGN $CPPFLAGS $LDFLAGS"
$CC $CFLAGS -pipe $DIR/src/unity.c -o $PREFIX/$PROGN $CPPFLAGS $LDFLAGS