-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
79 lines (62 loc) · 1.09 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
CFLAGS=-std=c99 -Wall -Wextra -Wwrite-strings -ggdb
OUT= \
bufpipe \
close_range \
coredump_filter \
cpuid \
dumpauxv \
fxsave \
getpid \
getpid32 \
get_ss \
lsholes \
memfd_secret \
mmapable \
parse_segm \
rdpid \
rdrand \
rdtsc \
readcmos \
readio \
seg2linear \
setcpuid \
set_no_new_privs \
set_ptracer \
set_tsc \
sgdt \
smsw \
speculation \
statvfs \
udpsend \
vmcall \
writeio \
x86_int \
xgetbv \
OUT_WIP = \
dumpvdso \
get_ldt \
hpet \
mem_cat \
DOC = $(OUT:=.1)
all: all-bin all-doc
all-bin: $(OUT)
all-doc: $(DOC)
wip-bin: $(OUT_WIP)
clean:
$(RM) $(OUT) $(OUT_WIP) $(DOC)
# Binaries needing special flags
bufpipe: CPPFLAGS=-D_GNU_SOURCE
coredump_filter: CPPFLAGS=-D_POSIX_C_SOURCE=2
getpid32: CFLAGS+=-m32
# Update README.md with documentation from all tools
README.md: README.fragment.md $(DOC)
cat $< >$@
for i in $(DOC); do \
printf '\n### %s\n\n' $${i%.1} >>$@ && \
pandoc -f man -t markdown --shift-heading-level-by=3 <$$i >>$@ ; \
done
# Custom rules
.scd.1:
scdoc <$< >$@
.SUFFIXES: .1 .scd
.PHONY: clean all all-bin all-doc wip-bin