Debian Codegraph @

tests/Makefile

raw symbols SCIP
1
2 # specific unity, only append this variables
3 C_SOURCE= ./unity/unity.c
4 INC_DIRS= -Iunity
5
6 CFLAGS=-Wall -Wextra -pedantic -ggdb -O0 -fsanitize=address
7 LDFLAGS+= -fsanitize=address
8
9 INC_DIRS += -I../src -I ../src/resolver
10
11 C_TMP= $(wildcard ./test*.c)
12 OBJS_TEST= $(C_TMP:.c=.o)
13
14 TEST = tests_all
15
16 # include here source module to test
17 C_SOURCE += ../src/hashtable.c \
18 ../src/full_read.c \
19 ../src/resolver/queue.c \
20 ../src/str.c \
21 ../src/rate.c \
22 ../src/round.c \
23 ../src/human_readable.c \
24 ../src/vector.c \
25 ../src/timer.c \
26 ../src/m_error.c
27
28 OBJS_MODS = $(C_SOURCE:.c=.o)
29
30 .PHONY: all clean run
31
32 all: $(TEST) run clean
33
34 $(TEST): $(OBJS_TEST) $(OBJS_MODS)
35 $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
36
37 %.o : %.c
38 $(CC) $(CFLAGS) $(INC_DIRS) $(CPPFLAGS) -c $< -o $@
39
40 run:
41 - ./$(TEST)
42
43 clean:
44 @ find . -type f -name '*.o' -delete
45 # @ find . -executable -type f -delete