aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-14 21:24:44 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commitd4ca9de33906972fa06bd2b7e38cbc2b4d3574c2 (patch)
tree5e858b73db61a0f85ddfd02dd3076a8b3c8aa5af /build.sh
parentad54d804fef1e1eb646d8ea4bd7ce65363e94fa8 (diff)
Add ssa string
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/build.sh b/build.sh
index 5ca2ea6..5cdade0 100755
--- a/build.sh
+++ b/build.sh
@@ -20,11 +20,15 @@ fi
CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -D_GNU_SOURCE"
LIBS+="-pthread"
+BUILD_ARGS="$source_files $CFLAGS $LIBS -shared -fpic -o libamalgam.so"
set -x
-time "$CC" $source_files $CFLAGS $LIBS -shared -fpic -o libamalgam.so
+time "$CC" $BUILD_ARGS
+if [ ! -z "$SCAN_BUILD" ]; then
+ scan-build "$CC" $BUILD_ARGS
+fi
set +x
if [ -z "$NO_TEST" ]; then
source_files_tests=$(readlink -f $(find "$this_script_dir/tests" -name "*.c"))
set -x
time "$CC" $source_files_tests $CFLAGS $LIBS -o test "$this_script_dir/libamalgam.so"
-fi \ No newline at end of file
+fi