blob: f792941bdb68a2a67d583badb608561b95d92d5e (
plain) (
blame)
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
|
# Copyright (C) NGINX, Inc.
if [ -n "$NXT_FUZZ" ]; then
# Fuzz-Test object files list.
$echo "NXT_FUZZ_OBJS = \\" >> $NXT_MAKEFILE
for nxt_src in $NXT_FUZZ_SRCS
do
nxt_obj=${nxt_src%.c}.o
$echo " $NXT_BUILD_DIR/$nxt_obj \\" >> $NXT_MAKEFILE
done
# Fuzz-Test executables.
cat << END >> $NXT_MAKEFILE
.PHONY: fuzz
fuzz: $NXT_BUILD_DIR/fuzz_basic \\
$NXT_BUILD_DIR/fuzz_http_controller \\
$NXT_BUILD_DIR/fuzz_http_h1p \\
$NXT_BUILD_DIR/fuzz_http_h1p_peer \\
$NXT_BUILD_DIR/fuzz_json
$NXT_BUILD_DIR/fuzz_basic: \$(NXT_FUZZ_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_basic \\
\$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_basic_fuzz.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
$NXT_FUZZ
$NXT_BUILD_DIR/fuzz_http_controller: \$(NXT_FUZZ_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_controller \\
\$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_controller_fuzz.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
$NXT_FUZZ
$NXT_BUILD_DIR/fuzz_http_h1p: \$(NXT_FUZZ_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_h1p \\
\$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_h1p_fuzz.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
$NXT_FUZZ
$NXT_BUILD_DIR/fuzz_http_h1p_peer: \$(NXT_FUZZ_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_http_h1p_peer \\
\$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_http_h1p_peer_fuzz.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
$NXT_FUZZ
$NXT_BUILD_DIR/fuzz_json: \$(NXT_FUZZ_OBJS) \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC
\$(PP_LD) \$@
\$(v)\$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/fuzz_json \\
\$(CFLAGS) $NXT_BUILD_DIR/fuzzing/nxt_json_fuzz.o \\
$NXT_BUILD_DIR/lib/$NXT_LIB_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS \\
$NXT_FUZZ
END
fi
|