aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..48c5dcc
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+DEBUG=""
+LIB=""
+
+[ ! -d "bin" ] && mkdir bin
+
+while getopts "d" opt; do
+ case "$opt" in
+ d) DEBUG="-Wall -fsanitize=address -g"
+ ;;
+ esac
+done
+
+shift $((OPTIND-1))
+[ "${1:-}" = "--" ] && shift
+
+printf "\n\nmaking project\n"
+clang -o bin/shell src/main.c $LIB -lm $DEBUG