summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-10-20 18:22:15 -0500
committer@syxhe <https://t.me/syxhe>2025-10-20 18:22:15 -0500
commit40bf034f6e5fdb261ebb9781fdde7a12ff402eda (patch)
tree6105c44219de41ea0e2805317558a4aa28aa3a39
parent33647dd2c4f4af7c7cb7d99c1a6dac7f1d059a67 (diff)
Make make work again
-rw-r--r--.gitignore3
-rw-r--r--src/Makefile15
-rwxr-xr-xsrc/main.c10
3 files changed, 19 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 9359566..1d93676 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,5 @@ bin
10docs 10docs
11GPATH 11GPATH
12GRTAGS 12GRTAGS
13GTAGS \ No newline at end of file 13GTAGS
14.timestamps \ No newline at end of file
diff --git a/src/Makefile b/src/Makefile
index 9293e55..e8c04f9 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -13,17 +13,26 @@ LDLIBS += $$(pkg-config --libs-only-l libsodium)
13LDFLAGS += $$(pkg-config --libs-only-L libsodium) 13LDFLAGS += $$(pkg-config --libs-only-L libsodium)
14 14
15SOURCES := $(wildcard *.c) 15SOURCES := $(wildcard *.c)
16TIMESTAMP_DIR := .timestamps
17TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES))
16 18
17.PHONY: all c clean val 19.PHONY: all c clean val
18.DELETE_ON_ERROR: 20.DELETE_ON_ERROR:
19.ONESHELL: 21.ONESHELL:
20 22
21all: main 23all: main
22main: 24
23 echo "Need to update makefile to work with unity build" 25$(TIMESTAMP_DIR):
26 mkdir -p $(TIMESTAMP_DIR)
27
28$(TIMESTAMPS): $(TIMESTAMP_DIR)/%.t: %.c | $(TIMESTAMP_DIR)
29 touch $@
30
31main: main.c $(TIMESTAMPS)
32 $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@
24 33
25c clean: 34c clean:
26 @-rm -rv main $(wildcard *.test*) $(wildcard *.enc) 35 -rm -rvf main $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc)
27 36
28val: 37val:
29 $(MAKE) all 38 $(MAKE) all
diff --git a/src/main.c b/src/main.c
index a95e8d1..b5b4a5f 100755
--- a/src/main.c
+++ b/src/main.c
@@ -4,14 +4,14 @@
4 * @brief Putting everything together 4 * @brief Putting everything together
5 * @version 0.1 5 * @version 0.1
6 * @date 2025-06-09 6 * @date 2025-06-09
7 * 7 *
8 * @copyright Copyright (c) 2025 8 * @copyright Copyright (c) 2025
9 * 9 *
10 */ 10 */
11 11
12#include "shared.h" 12#include "shared.c"
13#include "encryption.h" 13#include "encryption.c"
14#include "threadpool.h" 14#include "threadpool.c"
15 15
16#include <errno.h> 16#include <errno.h>
17#include <error.h> 17#include <error.h>