From d6cb30ce85ec534791307dc52501df54ba8c0cc5 Mon Sep 17 00:00:00 2001 From: xfnw Date: Mon, 29 Jan 2024 12:49:24 -0500 Subject: [PATCH] c: add -c flag adds argument to CFLAGS --- bin/c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/c b/bin/c index ce03f5a..93c5bcb 100755 --- a/bin/c +++ b/bin/c @@ -33,14 +33,15 @@ EOF expr= type= decompile= -debug= -while getopts 'e:i:tdg' opt; do +cflags= +while getopts 'c:e:i:tdg' opt; do case "${opt}" in + (c) cflags=$cflags$OPTARG;; (e) expr=$OPTARG;; (i) echo "#include <${OPTARG}>" >&3;; (t) type=1;; (d) decompile=1;; - (g) debug="-fsanitize=address -g";; + (g) cflags=$cflags" -fsanitize=address -g";; (?) exit 1;; esac done @@ -119,7 +120,7 @@ fi echo '}' >&3 cat >"${temp}/Makefile" <