xref: /freebsd/crypto/openssl/fuzz/build.info (revision 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
1{- use File::Spec::Functions;
2   our $ex_inc = $withargs{fuzzer_include} &&
3       (file_name_is_absolute($withargs{fuzzer_include}) ?
4        $withargs{fuzzer_include} : catdir(updir(), $withargs{fuzzer_include}));
5   our $ex_lib = $withargs{fuzzer_lib} &&
6       (file_name_is_absolute($withargs{fuzzer_lib}) ?
7        $withargs{fuzzer_lib} : catfile(updir(), $withargs{fuzzer_lib}));
8   ""
9-}
10
11IF[{- !$disabled{"fuzz-afl"} || !$disabled{"fuzz-libfuzzer"} -}]
12  PROGRAMS{noinst}=asn1 asn1parse bignum bndiv client conf crl server
13
14  IF[{- !$disabled{"cmp"} -}]
15    PROGRAMS{noinst}=cmp
16  ENDIF
17
18  IF[{- !$disabled{"cms"} -}]
19    PROGRAMS{noinst}=cms
20  ENDIF
21
22  IF[{- !$disabled{"ct"} -}]
23    PROGRAMS{noinst}=ct
24  ENDIF
25
26  IF[{- !$disabled{"ocsp"} -}]
27    PROGRAMS{noinst}=x509
28  ENDIF
29
30  SOURCE[asn1]=asn1.c driver.c fuzz_rand.c
31  INCLUDE[asn1]=../include {- $ex_inc -}
32  DEPEND[asn1]=../libcrypto ../libssl {- $ex_lib -}
33
34  SOURCE[asn1parse]=asn1parse.c driver.c
35  INCLUDE[asn1parse]=../include {- $ex_inc -}
36  DEPEND[asn1parse]=../libcrypto {- $ex_lib -}
37
38  SOURCE[bignum]=bignum.c driver.c
39  INCLUDE[bignum]=../include {- $ex_inc -}
40  DEPEND[bignum]=../libcrypto {- $ex_lib -}
41
42  SOURCE[bndiv]=bndiv.c driver.c
43  INCLUDE[bndiv]=../include {- $ex_inc -}
44  DEPEND[bndiv]=../libcrypto {- $ex_lib -}
45
46  SOURCE[client]=client.c driver.c fuzz_rand.c
47  INCLUDE[client]=../include {- $ex_inc -}
48  DEPEND[client]=../libcrypto ../libssl {- $ex_lib -}
49
50  SOURCE[cmp]=cmp.c driver.c fuzz_rand.c
51  INCLUDE[cmp]=../include {- $ex_inc -}
52  DEPEND[cmp]=../libcrypto {- $ex_lib -}
53
54  SOURCE[cms]=cms.c driver.c
55  INCLUDE[cms]=../include {- $ex_inc -}
56  DEPEND[cms]=../libcrypto {- $ex_lib -}
57
58  SOURCE[conf]=conf.c driver.c
59  INCLUDE[conf]=../include {- $ex_inc -}
60  DEPEND[conf]=../libcrypto {- $ex_lib -}
61
62  SOURCE[crl]=crl.c driver.c
63  INCLUDE[crl]=../include {- $ex_inc -}
64  DEPEND[crl]=../libcrypto {- $ex_lib -}
65
66  SOURCE[ct]=ct.c driver.c
67  INCLUDE[ct]=../include {- $ex_inc -}
68  DEPEND[ct]=../libcrypto {- $ex_lib -}
69
70  SOURCE[server]=server.c driver.c fuzz_rand.c
71  INCLUDE[server]=../include {- $ex_inc -}
72  DEPEND[server]=../libcrypto ../libssl {- $ex_lib -}
73
74  SOURCE[x509]=x509.c driver.c fuzz_rand.c
75  INCLUDE[x509]=../include {- $ex_inc -}
76  DEPEND[x509]=../libcrypto {- $ex_lib -}
77ENDIF
78
79IF[{- !$disabled{tests} -}]
80  PROGRAMS{noinst}=asn1-test asn1parse-test bignum-test bndiv-test client-test conf-test crl-test server-test
81
82  IF[{- !$disabled{"cmp"} -}]
83    PROGRAMS{noinst}=cmp-test
84  ENDIF
85
86  IF[{- !$disabled{"cms"} -}]
87    PROGRAMS{noinst}=cms-test
88  ENDIF
89
90  IF[{- !$disabled{"ct"} -}]
91    PROGRAMS{noinst}=ct-test
92  ENDIF
93
94  IF[{- !$disabled{"ocsp"} -}]
95    PROGRAMS{noinst}=x509-test
96  ENDIF
97
98  SOURCE[asn1-test]=asn1.c test-corpus.c fuzz_rand.c
99  INCLUDE[asn1-test]=../include
100  DEPEND[asn1-test]=../libcrypto ../libssl
101
102  SOURCE[asn1parse-test]=asn1parse.c test-corpus.c
103  INCLUDE[asn1parse-test]=../include
104  DEPEND[asn1parse-test]=../libcrypto
105
106  SOURCE[bignum-test]=bignum.c test-corpus.c
107  INCLUDE[bignum-test]=../include
108  DEPEND[bignum-test]=../libcrypto
109
110  SOURCE[bndiv-test]=bndiv.c test-corpus.c
111  INCLUDE[bndiv-test]=../include
112  DEPEND[bndiv-test]=../libcrypto
113
114  SOURCE[client-test]=client.c test-corpus.c fuzz_rand.c
115  INCLUDE[client-test]=../include
116  DEPEND[client-test]=../libcrypto ../libssl
117
118  SOURCE[cmp-test]=cmp.c test-corpus.c fuzz_rand.c
119  INCLUDE[cmp-test]=../include
120  DEPEND[cmp-test]=../libcrypto.a
121  # referring to static lib allows using non-exported functions
122
123  SOURCE[cms-test]=cms.c test-corpus.c
124  INCLUDE[cms-test]=../include
125  DEPEND[cms-test]=../libcrypto
126
127  SOURCE[conf-test]=conf.c test-corpus.c
128  INCLUDE[conf-test]=../include
129  DEPEND[conf-test]=../libcrypto
130
131  SOURCE[crl-test]=crl.c test-corpus.c
132  INCLUDE[crl-test]=../include
133  DEPEND[crl-test]=../libcrypto
134
135  SOURCE[ct-test]=ct.c test-corpus.c
136  INCLUDE[ct-test]=../include
137  DEPEND[ct-test]=../libcrypto
138
139  SOURCE[server-test]=server.c test-corpus.c fuzz_rand.c
140  INCLUDE[server-test]=../include
141  DEPEND[server-test]=../libcrypto ../libssl
142
143  SOURCE[x509-test]=x509.c test-corpus.c fuzz_rand.c
144  INCLUDE[x509-test]=../include
145  DEPEND[x509-test]=../libcrypto
146ENDIF
147