aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xc_implementation/build_tree/ak_fs_build.sh6
-rwxr-xr-xc_implementation/build_tree/ak_log_build.sh6
-rwxr-xr-xc_implementation/build_tree/ak_logcatter_build.sh4
-rwxr-xr-xc_implementation/build_tree/ak_settings_build.sh6
-rwxr-xr-xc_implementation/build_tree/ak_utils_build.sh9
-rwxr-xr-xc_implementation/build_tree/libsodium_test_build.sh2
-rw-r--r--c_implementation/src/aklogcatter.c2
-rw-r--r--c_implementation/src/aksettings.c7
-rw-r--r--c_implementation/tests/test_aksettings.c4
9 files changed, 23 insertions, 23 deletions
diff --git a/c_implementation/build_tree/ak_fs_build.sh b/c_implementation/build_tree/ak_fs_build.sh
index a18b824..11b4fde 100755
--- a/c_implementation/build_tree/ak_fs_build.sh
+++ b/c_implementation/build_tree/ak_fs_build.sh
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
echo "Building lib/akfs.so" && \
-gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include akfs.c -o 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/akfs.so -o 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/akfs.so -o tests/test_akfs_mkdir && \
+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
index 713b915..76a4113 100755
--- a/c_implementation/build_tree/ak_log_build.sh
+++ b/c_implementation/build_tree/ak_log_build.sh
@@ -1,13 +1,13 @@
#!/usr/bin/env bash
echo "Building lib/aklog.so" && \
-gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklog.c -o 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/aklog.so -o 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/aklog.so -o tests/test_aklogwrite && \
+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
index 5038073..aa321cb 100755
--- a/c_implementation/build_tree/ak_logcatter_build.sh
+++ b/c_implementation/build_tree/ak_logcatter_build.sh
@@ -1,7 +1,7 @@
echo "Building lib/aklogcatter.so" && \
-gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklogcatter.c -o 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/aklog.so lib/aklogcatter.so -o 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
index 09009a8..f5137f9 100755
--- a/c_implementation/build_tree/ak_settings_build.sh
+++ b/c_implementation/build_tree/ak_settings_build.sh
@@ -1,11 +1,11 @@
echo "Building lib/aksettings.so" && \
-gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aksettings.c -o 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/aklog.so lib/aksettings.so -o 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/aklog.so lib/aksettings.so -o tests/test_aksettings_read && \
+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
index 4300307..178519a 100755
--- a/c_implementation/build_tree/ak_utils_build.sh
+++ b/c_implementation/build_tree/ak_utils_build.sh
@@ -1,2 +1,7 @@
-echo "Building lib/akutils.so" && gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include akutils.c -o lib/akutils.so && echo "Building tests/test_akutils" && gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akutils.c lib/akutils.so -o tests/test_akutils && echo "Running test_akutils" && time ./tests/test_akutils
-rm ./tests/test_akutils
+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
index 0897835..f427873 100755
--- a/c_implementation/build_tree/libsodium_test_build.sh
+++ b/c_implementation/build_tree/libsodium_test_build.sh
@@ -1 +1 @@
-gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include -lsodium tests/libsodium.c lib/aklog.so -o watah
+gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include -lsodium tests/libsodium.c lib/libaklog.so -o watah
diff --git a/c_implementation/src/aklogcatter.c b/c_implementation/src/aklogcatter.c
index 016c6d3..54b1f8c 100644
--- a/c_implementation/src/aklogcatter.c
+++ b/c_implementation/src/aklogcatter.c
@@ -1,4 +1,4 @@
-#include <aklogcatter.h>
+#include <libaklogcatter.h>
#include <stdio.h>
#include <libaklog.h>
#include <stdlib.h>
diff --git a/c_implementation/src/aksettings.c b/c_implementation/src/aksettings.c
index 1c8249c..470330f 100644
--- a/c_implementation/src/aksettings.c
+++ b/c_implementation/src/aksettings.c
@@ -1,4 +1,4 @@
-#include <aksettings.h>
+#include <libaksettings.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -6,11 +6,6 @@
#define MAX_SETTINGS 100
-typedef struct {
- char *key;
- char *value;
-} AKSetting;
-
AKSetting settings[MAX_SETTINGS];
int settings_count = 0;
diff --git a/c_implementation/tests/test_aksettings.c b/c_implementation/tests/test_aksettings.c
index c3bbe44..3a74444 100644
--- a/c_implementation/tests/test_aksettings.c
+++ b/c_implementation/tests/test_aksettings.c
@@ -1,5 +1,5 @@
-#include <aksettings.h>
-#include <aklog.h>
+#include <libaksettings.h>
+#include <libaklog.h>
#include <stdio.h>
int test_ak_settings_read_write_example()