aboutsummaryrefslogtreecommitdiff
path: root/c_implementation/build_tree/ak_fs_build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'c_implementation/build_tree/ak_fs_build.sh')
-rwxr-xr-xc_implementation/build_tree/ak_fs_build.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/c_implementation/build_tree/ak_fs_build.sh b/c_implementation/build_tree/ak_fs_build.sh
new file mode 100755
index 0000000..11b4fde
--- /dev/null
+++ b/c_implementation/build_tree/ak_fs_build.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+echo "Building lib/akfs.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include ./src/akfs.c -o lib/libakfs.so && \
+echo "Building tests/test_akfs" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs.c lib/libakfs.so -o tests/test_akfs && \
+echo "Running test_akfs" && \
+time ./tests/test_akfs && \
+rm ./tests/test_akfs
+
+echo "Building tests/test_akfs_mkdir.c" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs_mkdir.c lib/libakfs.so -o tests/test_akfs_mkdir && \
+echo "Running test_akfs_mkdir" && \
+time ./tests/test_akfs_mkdir && \
+rm ./tests/test_akfs_mkdir