aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-02-24 02:10:58 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:40 +0200
commit11dc4b81935e3dfee997c421d8d6fa166edd7a05 (patch)
treeccb08be54209a4900c740c9ed58e8f9c2910811d /build.sh
Initial commit, Function declaration work somewhat
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..8307dfe
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+this_script_path=$(readlink -f "$0")
+this_script_dir=$(dirname "$this_script_path")
+source_files=$(readlink -f "$this_script_dir/src/"*)
+
+if [ -z "$CC" ]; then
+ CC=cc
+fi
+
+CFLAGS="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic"
+LIBS="-pthread"
+
+set -x
+time "$CC" $source_files $CFLAGS $LIBS -o amalgam