blob: 812ee650444da3b30e75085e41701ed167b84d13 (
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
33
34
35
36
37
38
|
CC := clang
CFLAGS := -Wall \
-Wextra \
-Wpedantic \
-Wconversion \
-Wsign-conversion \
-Wshadow \
-Wstrict-prototypes \
-Wmissing-prototypes \
-g \
-fno-omit-frame-pointer \
-fsanitize=address,undefined \
-std=c17
LDFLAGS := -fsanitize=address,undefined \
-lz
CPPCHECKFLAGS := --project=compile_commands.json \
--enable=warning,style,performance,portability \
--error-exitcode=1
TARGET := jafm
SRC := jafm.c
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $(SRC) -o $@ $(LDFLAGS)
check:
bear -- make clean all
cppcheck $(CPPCHECKFLAGS)
clean:
rm -rf $(TARGET) $(TARGET).dSYM
.PHONY: all check clean
|