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