-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (33 loc) · 1 KB
/
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
37
38
39
40
41
42
43
CC = gcc
CFLGS = -std=c99 -g -Wall -pedantic -Wparentheses \
-Wextra -Wundef -Wfloat-equal -Wcast-qual \
-Wswitch-enum -Wunreachable-code -Wshadow #-fanalyzer
LLCD = -llcd
all:
mkdir -p bin
${CC} ${CFLGS} sysd/*.c ${LLCD} -o bin/sysd
# valgrind binary for checking memory leaks
VG = valgrind
# valgrind flags
VGFLGS = --leak-check=full --show-leak-kinds=all --track-origins=yes --tool=memcheck
check-mem:
${VG} ${VGFLGS} ./bin/sysd
clang-tidy:
clang-tidy sysd/*.c -extra-arg=-std=c99
cppcheck:
cppcheck --enable=all --suppress=missingIncludeSystem sysd/*.c
libfuzzer:
clang++ -g -fprofile-instr-generate -fcoverage-mapping -fsanitize=address,fuzzer sysd/config.c sysdfuzzer.cc -o fuzzsysd
osv:
osv-scanner -r .
install:
cp bin/sysd /usr/local/bin/
cp sysd.conf /etc/
cp sysd.service /etc/systemd/
# systemctl start /etc/systemd/sysd.service
uninstall:
rm /usr/local/bin/sysd
rm /etc/sysd.conf
rm /etc/systemd/sysd.service
clean:
rm -rf crash-* bin *.log *.plist *.out *.profraw fuzzsysd build