3 .PHONY
: all test clean install uninstall
6 CFLAGS
= -std
=c99
-O2
-Wall
-Wextra \
7 -Walloca
-Wcast-qual
-Wconversion
-Wformat
=2 -Wformat-security
-Wvla \
8 -Wnull-dereference
-Wstack-protector
-Warray-bounds \
9 -Warray-bounds-pointer-arithmetic
-Wassign-enum \
10 -Wbad-function-cast
-Wconditional-uninitialized
-Wconversion \
11 -Wfloat-equal
-Wformat-type-confusion
-Widiomatic-parentheses \
12 -Wimplicit-fallthrough
-Wloop-analysis
-Wpointer-arith \
13 -Wshift-sign-overflow
-Wshorten-64-to-32
-Wswitch-enum \
14 -Wtautological-constant-in-range-compare
-Wunreachable-code-aggressive \
15 -Wthread-safety
-Wthread-safety-beta
-Wcomma \
17 -fstack-protector-strong
-fsanitize
=safe-stack
-fPIE \
18 -fstack-clash-protection
19 # -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer \
20 # -fsanitize=undefined -fsanitize=float-divide-by-zero \
21 # -fsanitize=float-cast-overflow -fsanitize=integer
23 LDFLAGS
= -fsanitize
=safe-stack
-Wl
,-z
,relro
-Wl
,-z
,now
-Wl
,-z
,noexecstack \
35 $(CC
) $(LDFLAGS
) -o
$@
$(OBJS
) $(LDLIBS
)
46 mkdir
-p
$(DESTDIR
)$(PREFIX
)/bin
47 install -m
755 pp
$(DESTDIR
)$(PREFIX
)/bin
48 mkdir
-p
$(DESTDIR
)$(PREFIX
)/share
/man
/man1
49 gzip
< pp
.1 > $(DESTDIR
)$(PREFIX
)/share
/man
/man1
/pp
.1.gz
52 $(RM
) -f
$(DESTDIR
)$(PREFIX
)/bin
/pp
53 $(RM
) -f
$(DESTDIR
)$(PREFIX
)/share
/man
/man1
/pp
.1.gz