aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index ab43d20..240b2e9 100755
--- a/build.sh
+++ b/build.sh
@@ -12,11 +12,18 @@ fi
CFLAGS=""
LIBS=""
+
if [ ! -z "$SANITIZE_ADDRESS" ]; then
CFLAGS+="-fsanitize=address "
+elif [ ! -z "$SANITIZE_THREAD" ]; then
+ CFLAGS+="-fsanitize=thread "
+fi
+
+if [ ! -z "$PEDANTIC" ]; then
+ CFLAGS+="-DAMAL_PEDANTIC -pedantic "
fi
-CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -D_GNU_SOURCE"
+CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -D_GNU_SOURCE"
LIBS+="-pthread"
BUILD_ARGS="$source_files $CFLAGS $LIBS -shared -fpic -o libamalgam.so"