From 40bf034f6e5fdb261ebb9781fdde7a12ff402eda Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Mon, 20 Oct 2025 18:22:15 -0500 Subject: Make make work again --- .gitignore | 3 ++- src/Makefile | 15 ++++++++++++--- src/main.c | 10 +++++----- 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 docs GPATH GRTAGS -GTAGS \ No newline at end of file +GTAGS +.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) LDFLAGS += $$(pkg-config --libs-only-L libsodium) SOURCES := $(wildcard *.c) +TIMESTAMP_DIR := .timestamps +TIMESTAMPS := $(patsubst %.c,$(TIMESTAMP_DIR)/%.t,$(SOURCES)) .PHONY: all c clean val .DELETE_ON_ERROR: .ONESHELL: all: main -main: - echo "Need to update makefile to work with unity build" + +$(TIMESTAMP_DIR): + mkdir -p $(TIMESTAMP_DIR) + +$(TIMESTAMPS): $(TIMESTAMP_DIR)/%.t: %.c | $(TIMESTAMP_DIR) + touch $@ + +main: main.c $(TIMESTAMPS) + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ c clean: - @-rm -rv main $(wildcard *.test*) $(wildcard *.enc) + -rm -rvf main $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc) val: $(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 @@ * @brief Putting everything together * @version 0.1 * @date 2025-06-09 - * + * * @copyright Copyright (c) 2025 - * + * */ -#include "shared.h" -#include "encryption.h" -#include "threadpool.h" +#include "shared.c" +#include "encryption.c" +#include "threadpool.c" #include #include -- cgit v1.2.3