diff options
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) |
