-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (28 loc) · 845 Bytes
/
Makefile
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
33
34
35
36
CC = gcc
CFLAGS = -O3 --std=c17 -Wall -Wextra -pthread -lrt \
-lsystemd \
-lconfig \
-lm \
-lanl \
-D_GNU_SOURCE \
# -DDEBUG \
# -fsanitize=address
all: srd
srd: util.o srd.o actions.o printing.o Makefile
$(CC) $(CFLAGS) -o srd util.o srd.o actions.o printing.o
%.o : %.c Makefile
$(CC) -c $(CFLAGS) $< -o $@
valgrind: srd
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --show-reachable=yes --num-callers=50 --trace-children=yes ./srd
# This needs to have include-what-you-use installed
check_includes: util.c
include-what-you-use -D_GNU_SOURCE util.c
include-what-you-use -D_GNU_SOURCE srd.c
include-what-you-use -D_GNU_SOURCE actions.c
include-what-you-use -D_GNU_SOURCE printing.c
include-what-you-use -D_GNU_SOURCE perf_metric.h
clean:
rm -f *.o srd
.PHONY: all
.PHONY: clean
.PHONY: srd