diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-13 08:59:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-13 08:59:34 +0300 |
| commit | 5628e43ae771cfe3bc057375966621b3bfb48846 (patch) | |
| tree | e2a3b3b9dde58ce7eefb5835db81fe657cc02069 /tests/Makefile | |
| parent | a04d9d3520404066100600cc90cb2274822ad2cb (diff) | |
q2: add host-side unit test harness
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..ef3efc6 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,32 @@ +CC ?= gcc +CFLAGS ?= -std=c11 -Wall -Wextra -Werror -pedantic -g + +TZ ?= UTC +export TZ + +ROOT := .. +UNITY_DIR := vendor/unity/src +SRC_DIR := $(ROOT)/src/c + +TARGET := test_fastforge + +SRCS := \ + $(UNITY_DIR)/unity.c \ + $(SRC_DIR)/fastforge_logic.c \ + $(SRC_DIR)/fastforge_csv.c \ + $(wildcard test_*.c) + +INCLUDES := -I. -I$(UNITY_DIR) -I$(SRC_DIR) + +.PHONY: all test clean + +all: test + +test: $(TARGET) + TZ=$(TZ) ./$(TARGET) + +$(TARGET): $(SRCS) + $(CC) $(CFLAGS) $(INCLUDES) $(SRCS) -o $@ + +clean: + rm -f $(TARGET) |
