summaryrefslogtreecommitdiff
path: root/tests/Makefile
blob: ef3efc625c650b8db30beda81758c1d401af9645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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)