aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-03-07 22:19:57 +0100
committerdec05eba <dec05eba@protonmail.com>2020-07-25 14:36:46 +0200
commit27718f093689dbd3decd7021eaa97327f578c8f3 (patch)
treec41ab4bb5727b22be35c1237279cfdfec0a27561 /build.sh
parent81b6004928015ced29b0b949e35753977aa17606 (diff)
Add hash map
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.sh b/build.sh
index b3dfc9f..5ca2ea6 100755
--- a/build.sh
+++ b/build.sh
@@ -21,4 +21,10 @@ CFLAGS+="-Wall -Wextra -Werror -g -O0 -DDEBUG -std=c89 -pedantic -D_GNU_SOURCE"
LIBS+="-pthread"
set -x
-time "$CC" $source_files $CFLAGS $LIBS -o amalgam
+time "$CC" $source_files $CFLAGS $LIBS -shared -fpic -o libamalgam.so
+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