diff options
| 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 |
| commit | 40bf034f6e5fdb261ebb9781fdde7a12ff402eda (patch) | |
| tree | 6105c44219de41ea0e2805317558a4aa28aa3a39 | |
| parent | 33647dd2c4f4af7c7cb7d99c1a6dac7f1d059a67 (diff) | |
Make make work again
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | src/Makefile | 15 | ||||
| -rwxr-xr-x | src/main.c | 10 |
3 files changed, 19 insertions, 9 deletions
| @@ -10,4 +10,5 @@ bin | |||
| 10 | docs | 10 | docs |
| 11 | GPATH | 11 | GPATH |
| 12 | GRTAGS | 12 | GRTAGS |
| 13 | GTAGS \ No newline at end of file | 13 | GTAGS |
| 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) | |||
| 13 | LDFLAGS += $$(pkg-config --libs-only-L libsodium) | 13 | LDFLAGS += $$(pkg-config --libs-only-L libsodium) |
| 14 | 14 | ||
| 15 | SOURCES := $(wildcard *.c) | 15 | SOURCES := $(wildcard *.c) |
| 16 | TIMESTAMP_DIR := .timestamps | ||
| 17 | TIMESTAMPS := $(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 | ||
| 21 | all: main | 23 | all: main |
| 22 | main: | 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 | |||
| 31 | main: main.c $(TIMESTAMPS) | ||
| 32 | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ $(LOADLIBES) $(LDLIBS) -o $@ | ||
| 24 | 33 | ||
| 25 | c clean: | 34 | c clean: |
| 26 | @-rm -rv main $(wildcard *.test*) $(wildcard *.enc) | 35 | -rm -rvf main $(TIMESTAMP_DIR) $(wildcard *.test*) $(wildcard *.enc) |
| 27 | 36 | ||
| 28 | val: | 37 | val: |
| 29 | $(MAKE) all | 38 | $(MAKE) all |
| @@ -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> |
