aboutsummaryrefslogtreecommitdiff
path: root/c_implementation/build_tree
diff options
context:
space:
mode:
Diffstat (limited to 'c_implementation/build_tree')
-rwxr-xr-xc_implementation/build_tree/ak_fs_build.sh15
-rwxr-xr-xc_implementation/build_tree/ak_log_build.sh13
-rwxr-xr-xc_implementation/build_tree/ak_logcatter_build.sh7
-rwxr-xr-xc_implementation/build_tree/ak_settings_build.sh11
-rwxr-xr-xc_implementation/build_tree/ak_utils_build.sh7
-rwxr-xr-xc_implementation/build_tree/libsodium_test_build.sh1
6 files changed, 54 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
diff --git a/c_implementation/build_tree/ak_log_build.sh b/c_implementation/build_tree/ak_log_build.sh
new file mode 100755
index 0000000..76a4113
--- /dev/null
+++ b/c_implementation/build_tree/ak_log_build.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+echo "Building lib/aklog.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include src/aklog.c -o lib/libaklog.so && \
+echo "Building tests/test_aklog" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklog.c lib/libaklog.so -o tests/test_aklog && \
+echo "Running test_aklog" && \
+time ./tests/test_aklog # && \
+# rm ./tests/test_aklog
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogwrite.c lib/libaklog.so -o tests/test_aklogwrite && \
+echo "Running test_aklogwrite" && \
+time ./tests/test_aklogwrite && \
+rm ./tests/test_aklogwrite
diff --git a/c_implementation/build_tree/ak_logcatter_build.sh b/c_implementation/build_tree/ak_logcatter_build.sh
new file mode 100755
index 0000000..aa321cb
--- /dev/null
+++ b/c_implementation/build_tree/ak_logcatter_build.sh
@@ -0,0 +1,7 @@
+echo "Building lib/aklogcatter.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include src/aklogcatter.c -o lib/libaklogcatter.so && \
+echo "Building tests/test_aklogcatter" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogcatter.c lib/libaklog.so lib/libaklogcatter.so -o tests/test_aklogcatter && \
+echo "Running test_aklogcatter" && \
+time ./tests/test_aklogcatter && \
+rm ./tests/test_aklogcatter
diff --git a/c_implementation/build_tree/ak_settings_build.sh b/c_implementation/build_tree/ak_settings_build.sh
new file mode 100755
index 0000000..f5137f9
--- /dev/null
+++ b/c_implementation/build_tree/ak_settings_build.sh
@@ -0,0 +1,11 @@
+echo "Building lib/aksettings.so" && \
+gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include src/aksettings.c -o lib/libaksettings.so && \
+echo "Building tests/test_aksettings" && \
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings.c lib/libaklog.so lib/libaksettings.so -o tests/test_aksettings && \
+echo "Running test_aksettings" && \
+time ./tests/test_aksettings && \
+rm ./tests/test_aksettings
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings_read.c lib/libaklog.so lib/libaksettings.so -o tests/test_aksettings_read && \
+echo "Running test_aksettings_read" && \
+time ./tests/test_aksettings_read && \
+rm ./tests/test_aksettings_read
diff --git a/c_implementation/build_tree/ak_utils_build.sh b/c_implementation/build_tree/ak_utils_build.sh
new file mode 100755
index 0000000..178519a
--- /dev/null
+++ b/c_implementation/build_tree/ak_utils_build.sh
@@ -0,0 +1,7 @@
+echo "Building lib/akutils.so" && \
+ gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include src/akutils.c -o lib/libakutils.so && \
+ echo "Building tests/test_akutils" && \
+ gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akutils.c lib/libakutils.so -o tests/test_akutils && \
+ echo "Running test_akutils" && \
+ time ./tests/test_akutils && \
+ rm ./tests/test_akutils
diff --git a/c_implementation/build_tree/libsodium_test_build.sh b/c_implementation/build_tree/libsodium_test_build.sh
new file mode 100755
index 0000000..f427873
--- /dev/null
+++ b/c_implementation/build_tree/libsodium_test_build.sh
@@ -0,0 +1 @@
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include -lsodium tests/libsodium.c lib/libaklog.so -o watah