From c29f47851fd05c5be0e9f994d35968ed2ac51ba9 Mon Sep 17 00:00:00 2001 From: Noah Swerhun Date: Fri, 24 Dec 2021 10:25:28 -0600 Subject: [PATCH] wrote usage function and set sensible defaults --- cbuild.sh | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/cbuild.sh b/cbuild.sh index 8ab6802..0f3c870 100755 --- a/cbuild.sh +++ b/cbuild.sh @@ -6,10 +6,10 @@ # --- USER CONFIG --- CC="gcc" -CFLAGS="-Wall -Wpedantic -std=c99" +CFLAGS="-Wall -Wpedantic" LDFLAGS="" LDLIBS="" -TARGET="foo" +TARGET="a.out" SRCDIR="src" OBJDIR="obj" MAKEFILE=".makefile" @@ -24,6 +24,41 @@ OBJ="$(find ${SRCDIR} -name '*\.c' | srcnum="$(find ${SRCDIR} -name '*\.c' -exec printf %c {} + | wc -c)" +usage() { + cat <