build.info 11.6 KB
Newer Older
R
Richard Levitte 已提交
1 2 3 4 5 6 7 8
{-
     use File::Spec::Functions;
     sub rebase_files
     {
         my ($base, $files) = @_;
         return join(" ", map { "$base/$_" } split(/\s+/, $files));
     }
-}
M
Matt Caswell 已提交
9
IF[{- !$disabled{tests} -}]
10
  PROGRAMS_NO_INST=\
M
Matt Caswell 已提交
11
          aborttest \
R
Rich Salz 已提交
12
          sanitytest bntest \
M
Matt Caswell 已提交
13 14 15 16 17 18 19 20
          ectest ecdsatest ecdhtest gmdifftest pbelutest ideatest \
          md2test md4test md5test \
          hmactest wp_test \
          rc2test rc4test rc5test \
          destest sha1test sha256t sha512t \
          mdc2test rmdtest \
          randtest dhtest enginetest casttest \
          bftest ssltest_old dsatest exptest rsa_test \
R
Rich Salz 已提交
21
          evp_test evp_extra_test igetest v3nametest v3ext \
R
Richard Levitte 已提交
22
          danetest p5_crpt2_test bad_dtls_test \
M
Matt Caswell 已提交
23 24 25
          constant_time_test verify_extra_test clienthellotest \
          packettest asynctest secmemtest srptest memleaktest \
          dtlsv1listentest ct_test threadstest afalgtest d2i_test \
26
          ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
27
          bioprinttest sslapitest dtlstest sslcorrupttest bio_enc_test
M
Matt Caswell 已提交
28 29

  SOURCE[aborttest]=aborttest.c
30
  INCLUDE[aborttest]=../include
M
Matt Caswell 已提交
31 32
  DEPEND[aborttest]=../libcrypto

R
Rich Salz 已提交
33 34 35
  SOURCE[sanitytest]=sanitytest.c
  INCLUDE[sanitytest]=../include
  DEPEND[sanitytest]=../libcrypto
M
Matt Caswell 已提交
36 37

  SOURCE[bntest]=bntest.c
38
  INCLUDE[bntest]=.. ../crypto/include ../include
M
Matt Caswell 已提交
39 40 41
  DEPEND[bntest]=../libcrypto

  SOURCE[ectest]=ectest.c
42
  INCLUDE[ectest]=../include
M
Matt Caswell 已提交
43 44 45
  DEPEND[ectest]=../libcrypto

  SOURCE[ecdsatest]=ecdsatest.c
46
  INCLUDE[ecdsatest]=../include
M
Matt Caswell 已提交
47 48 49
  DEPEND[ecdsatest]=../libcrypto

  SOURCE[ecdhtest]=ecdhtest.c
50
  INCLUDE[ecdhtest]=../include
M
Matt Caswell 已提交
51 52 53
  DEPEND[ecdhtest]=../libcrypto

  SOURCE[gmdifftest]=gmdifftest.c
54
  INCLUDE[gmdifftest]=../include
M
Matt Caswell 已提交
55 56 57
  DEPEND[gmdifftest]=../libcrypto

  SOURCE[pbelutest]=pbelutest.c
58
  INCLUDE[pbelutest]=../include
M
Matt Caswell 已提交
59 60 61
  DEPEND[pbelutest]=../libcrypto

  SOURCE[ideatest]=ideatest.c
62
  INCLUDE[ideatest]=../include
M
Matt Caswell 已提交
63 64 65
  DEPEND[ideatest]=../libcrypto

  SOURCE[md2test]=md2test.c
66
  INCLUDE[md2test]=../include
M
Matt Caswell 已提交
67 68 69
  DEPEND[md2test]=../libcrypto

  SOURCE[md4test]=md4test.c
70
  INCLUDE[md4test]=../include
M
Matt Caswell 已提交
71 72 73
  DEPEND[md4test]=../libcrypto

  SOURCE[md5test]=md5test.c
74
  INCLUDE[md5test]=../include
M
Matt Caswell 已提交
75 76 77
  DEPEND[md5test]=../libcrypto

  SOURCE[hmactest]=hmactest.c
78
  INCLUDE[hmactest]=../include
M
Matt Caswell 已提交
79 80 81
  DEPEND[hmactest]=../libcrypto

  SOURCE[wp_test]=wp_test.c
82
  INCLUDE[wp_test]=../include
M
Matt Caswell 已提交
83 84 85
  DEPEND[wp_test]=../libcrypto

  SOURCE[rc2test]=rc2test.c
86
  INCLUDE[rc2test]=../include
M
Matt Caswell 已提交
87 88 89
  DEPEND[rc2test]=../libcrypto

  SOURCE[rc4test]=rc4test.c
90
  INCLUDE[rc4test]=../include
M
Matt Caswell 已提交
91 92 93
  DEPEND[rc4test]=../libcrypto

  SOURCE[rc5test]=rc5test.c
94
  INCLUDE[rc5test]=../include
M
Matt Caswell 已提交
95 96 97
  DEPEND[rc5test]=../libcrypto

  SOURCE[destest]=destest.c
98
  INCLUDE[destest]=../include
M
Matt Caswell 已提交
99 100 101
  DEPEND[destest]=../libcrypto

  SOURCE[sha1test]=sha1test.c
102
  INCLUDE[sha1test]=../include
M
Matt Caswell 已提交
103 104 105
  DEPEND[sha1test]=../libcrypto

  SOURCE[sha256t]=sha256t.c
106
  INCLUDE[sha256t]=../include
M
Matt Caswell 已提交
107 108 109
  DEPEND[sha256t]=../libcrypto

  SOURCE[sha512t]=sha512t.c
110
  INCLUDE[sha512t]=../include
M
Matt Caswell 已提交
111 112 113
  DEPEND[sha512t]=../libcrypto

  SOURCE[mdc2test]=mdc2test.c
114
  INCLUDE[mdc2test]=../include
M
Matt Caswell 已提交
115 116 117
  DEPEND[mdc2test]=../libcrypto

  SOURCE[rmdtest]=rmdtest.c
118
  INCLUDE[rmdtest]=../include
M
Matt Caswell 已提交
119 120 121
  DEPEND[rmdtest]=../libcrypto

  SOURCE[randtest]=randtest.c
122
  INCLUDE[randtest]=../include
M
Matt Caswell 已提交
123
  DEPEND[randtest]=../libcrypto
124

M
Matt Caswell 已提交
125
  SOURCE[dhtest]=dhtest.c
126
  INCLUDE[dhtest]=../include
M
Matt Caswell 已提交
127
  DEPEND[dhtest]=../libcrypto
128

M
Matt Caswell 已提交
129
  SOURCE[enginetest]=enginetest.c
130
  INCLUDE[enginetest]=../include
M
Matt Caswell 已提交
131
  DEPEND[enginetest]=../libcrypto
132

M
Matt Caswell 已提交
133
  SOURCE[casttest]=casttest.c
134
  INCLUDE[casttest]=../include
M
Matt Caswell 已提交
135
  DEPEND[casttest]=../libcrypto
136

M
Matt Caswell 已提交
137
  SOURCE[bftest]=bftest.c
138
  INCLUDE[bftest]=../include
M
Matt Caswell 已提交
139
  DEPEND[bftest]=../libcrypto
140

M
Matt Caswell 已提交
141
  SOURCE[ssltest_old]=ssltest_old.c
142
  INCLUDE[ssltest_old]=.. ../include
M
Matt Caswell 已提交
143
  DEPEND[ssltest_old]=../libcrypto ../libssl
144

M
Matt Caswell 已提交
145
  SOURCE[dsatest]=dsatest.c
146
  INCLUDE[dsatest]=../include
M
Matt Caswell 已提交
147
  DEPEND[dsatest]=../libcrypto
148

M
Matt Caswell 已提交
149
  SOURCE[exptest]=exptest.c
150
  INCLUDE[exptest]=../include
M
Matt Caswell 已提交
151
  DEPEND[exptest]=../libcrypto
152

M
Matt Caswell 已提交
153
  SOURCE[rsa_test]=rsa_test.c
154
  INCLUDE[rsa_test]=.. ../include
M
Matt Caswell 已提交
155
  DEPEND[rsa_test]=../libcrypto
156

M
Matt Caswell 已提交
157
  SOURCE[evp_test]=evp_test.c
158
  INCLUDE[evp_test]=../include
M
Matt Caswell 已提交
159
  DEPEND[evp_test]=../libcrypto
160

M
Matt Caswell 已提交
161
  SOURCE[evp_extra_test]=evp_extra_test.c
162
  INCLUDE[evp_extra_test]=../include
M
Matt Caswell 已提交
163
  DEPEND[evp_extra_test]=../libcrypto
164

M
Matt Caswell 已提交
165
  SOURCE[igetest]=igetest.c
166
  INCLUDE[igetest]=.. ../include
M
Matt Caswell 已提交
167
  DEPEND[igetest]=../libcrypto
168

M
Matt Caswell 已提交
169
  SOURCE[v3nametest]=v3nametest.c
170
  INCLUDE[v3nametest]=../include
M
Matt Caswell 已提交
171
  DEPEND[v3nametest]=../libcrypto
172

R
Rich Salz 已提交
173
  SOURCE[v3ext]=v3ext.c
174
  INCLUDE[v3ext]=../include
R
Rich Salz 已提交
175 176
  DEPEND[v3ext]=../libcrypto

M
Matt Caswell 已提交
177
  SOURCE[danetest]=danetest.c
178
  INCLUDE[danetest]=../include
M
Matt Caswell 已提交
179
  DEPEND[danetest]=../libcrypto ../libssl
180

M
Matt Caswell 已提交
181
  SOURCE[p5_crpt2_test]=p5_crpt2_test.c
182
  INCLUDE[p5_crpt2_test]=../include
M
Matt Caswell 已提交
183
  DEPEND[p5_crpt2_test]=../libcrypto
184

M
Matt Caswell 已提交
185
  SOURCE[constant_time_test]=constant_time_test.c
186
  INCLUDE[constant_time_test]=.. ../include
M
Matt Caswell 已提交
187
  DEPEND[constant_time_test]=../libcrypto
188

M
Matt Caswell 已提交
189
  SOURCE[verify_extra_test]=verify_extra_test.c
190
  INCLUDE[verify_extra_test]=../include
M
Matt Caswell 已提交
191
  DEPEND[verify_extra_test]=../libcrypto
192

M
Matt Caswell 已提交
193
  SOURCE[clienthellotest]=clienthellotest.c
194
  INCLUDE[clienthellotest]=../include
M
Matt Caswell 已提交
195
  DEPEND[clienthellotest]=../libcrypto ../libssl
196

197
  SOURCE[bad_dtls_test]=bad_dtls_test.c
198
  INCLUDE[bad_dtls_test]=../include
199 200
  DEPEND[bad_dtls_test]=../libcrypto ../libssl

M
Matt Caswell 已提交
201
  SOURCE[packettest]=packettest.c
202
  INCLUDE[packettest]=../include
M
Matt Caswell 已提交
203
  DEPEND[packettest]=../libcrypto
204

M
Matt Caswell 已提交
205
  SOURCE[asynctest]=asynctest.c
206
  INCLUDE[asynctest]=.. ../include
M
Matt Caswell 已提交
207
  DEPEND[asynctest]=../libcrypto
208

M
Matt Caswell 已提交
209
  SOURCE[secmemtest]=secmemtest.c
210
  INCLUDE[secmemtest]=../include
M
Matt Caswell 已提交
211
  DEPEND[secmemtest]=../libcrypto
212

M
Matt Caswell 已提交
213
  SOURCE[srptest]=srptest.c
214
  INCLUDE[srptest]=../include
M
Matt Caswell 已提交
215
  DEPEND[srptest]=../libcrypto
216

M
Matt Caswell 已提交
217
  SOURCE[memleaktest]=memleaktest.c
218
  INCLUDE[memleaktest]=../include
M
Matt Caswell 已提交
219
  DEPEND[memleaktest]=../libcrypto
220

M
Matt Caswell 已提交
221
  SOURCE[dtlsv1listentest]=dtlsv1listentest.c
222
  INCLUDE[dtlsv1listentest]=.. ../include
M
Matt Caswell 已提交
223
  DEPEND[dtlsv1listentest]=../libssl
R
Rich Salz 已提交
224

225
  SOURCE[ct_test]=ct_test.c testutil.c test_main_custom.c
226
  INCLUDE[ct_test]=../crypto/include ../include
M
Matt Caswell 已提交
227
  DEPEND[ct_test]=../libcrypto
228

M
Matt Caswell 已提交
229
  SOURCE[threadstest]=threadstest.c
230
  INCLUDE[threadstest]=.. ../include
M
Matt Caswell 已提交
231
  DEPEND[threadstest]=../libcrypto
232

M
Matt Caswell 已提交
233
  SOURCE[afalgtest]=afalgtest.c
234
  INCLUDE[afalgtest]=.. ../include
M
Matt Caswell 已提交
235
  DEPEND[afalgtest]=../libcrypto
C
clucey 已提交
236

237
  SOURCE[d2i_test]=d2i_test.c testutil.c test_main_custom.c
238
  INCLUDE[d2i_test]=.. ../include
M
Matt Caswell 已提交
239
  DEPEND[d2i_test]=../libcrypto
E
Emilia Kasper 已提交
240

241
  SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c testutil.c test_main_custom.c
242
  INCLUDE[ssl_test_ctx_test]=.. ../include
M
Matt Caswell 已提交
243
  DEPEND[ssl_test_ctx_test]=../libcrypto
E
Emilia Kasper 已提交
244

245
  SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c testutil.c handshake_helper.c test_main_custom.c
246
  INCLUDE[ssl_test]=.. ../include
M
Matt Caswell 已提交
247
  DEPEND[ssl_test]=../libcrypto ../libssl
E
Emilia Kasper 已提交
248

249
  SOURCE[cipherlist_test]=cipherlist_test.c testutil.c test_main.c
250
  INCLUDE[cipherlist_test]=.. ../include
E
Emilia Kasper 已提交
251 252
  DEPEND[cipherlist_test]=../libcrypto ../libssl

M
Matt Caswell 已提交
253
  INCLUDE[testutil.o]=..
254 255 256
  INCLUDE[ssl_test_ctx.o]=../include
  INCLUDE[handshake_helper.o]=../include
  INCLUDE[ssltestlib.o]=../include
257 258

  SOURCE[x509aux]=x509aux.c
259
  INCLUDE[x509aux]=../include
260
  DEPEND[x509aux]=../libcrypto
M
Matt Caswell 已提交
261

M
Matt Caswell 已提交
262
  SOURCE[asynciotest]=asynciotest.c ssltestlib.c
263
  INCLUDE[asynciotest]=../include
M
Matt Caswell 已提交
264
  DEPEND[asynciotest]=../libcrypto ../libssl
265 266

  SOURCE[bioprinttest]=bioprinttest.c
267
  INCLUDE[bioprinttest]=../include
268
  DEPEND[bioprinttest]=../libcrypto
269

270
  SOURCE[sslapitest]=sslapitest.c ssltestlib.c testutil.c test_main_custom.c
271 272
  INCLUDE[sslapitest]=../include
  DEPEND[sslapitest]=../libcrypto ../libssl
273

274
  SOURCE[dtlstest]=dtlstest.c ssltestlib.c testutil.c test_main_custom.c
275 276
  INCLUDE[dtlstest]=../include .
  DEPEND[dtlstest]=../libcrypto ../libssl
A
Andy Polyakov 已提交
277

278 279 280 281
  SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c testutil.c
  INCLUDE[sslcorrupttest]=../include .
  DEPEND[sslcorrupttest]=../libcrypto ../libssl

A
Andy Polyakov 已提交
282 283 284
  SOURCE[bio_enc_test]=bio_enc_test.c
  INCLUDE[bio_enc_test]=../include
  DEPEND[bio_enc_test]=../libcrypto
285

286 287 288 289 290 291 292
  IF[{- !$disabled{psk} -}]
    PROGRAMS_NO_INST=dtls_mtu_test
    SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
    INCLUDE[dtls_mtu_test]=.. ../include
    DEPEND[dtls_mtu_test]=../libcrypto ../libssl
  ENDIF

R
Richard Levitte 已提交
293
  IF[{- !$disabled{shared} -}]
294 295 296 297 298
    PROGRAMS_NO_INST=shlibloadtest
    SOURCE[shlibloadtest]=shlibloadtest.c
    INCLUDE[shlibloadtest]=../include
  ENDIF

299
  IF[{- $disabled{shared} -}]
300
    PROGRAMS_NO_INST=wpackettest cipher_overhead_test
301
    SOURCE[wpackettest]=wpackettest.c testutil.c test_main_custom.c
302 303
    INCLUDE[wpackettest]=../include
    DEPEND[wpackettest]=../libcrypto ../libssl
304 305 306 307

    SOURCE[cipher_overhead_test]=cipher_overhead_test.c
    INCLUDE[cipher_overhead_test]=.. ../include
    DEPEND[cipher_overhead_test]=../libcrypto ../libssl
308
  ENDIF
309

310
  # Internal test programs.  These are essentially a collection of internal
311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
  # test routines.  Some of them need to reach internal symbols that aren't
  # available through the shared library (at least on Linux, Solaris, Windows
  # and VMS, where the exported symbols are those listed in util/*.num), these
  # programs are forcebly linked with the static libraries, where all symbols
  # are always available.  This excludes linking these programs natively on
  # Windows when building shared libraries, since the static libraries share
  # names with the DLL import libraries.
  IF[{- $disabled{shared} || $target{build_scheme}->[1] ne 'windows' -}]
    PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test
    IF[{- !$disabled{poly1305} -}]
      PROGRAMS_NO_INST=poly1305_internal_test
    ENDIF

    SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c test_main_custom.c
    INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
    DEPEND[poly1305_internal_test]=../libcrypto.a

    SOURCE[asn1_internal_test]=asn1_internal_test.c testutil.c test_main.c
    INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
    DEPEND[asn1_internal_test]=../libcrypto.a

    SOURCE[modes_internal_test]=modes_internal_test.c testutil.c test_main_custom.c
    INCLUDE[modes_internal_test]=.. ../include
    DEPEND[modes_internal_test]=../libcrypto.a

    SOURCE[x509_internal_test]=x509_internal_test.c testutil.c test_main.c
    INCLUDE[x509_internal_test]=.. ../include
    DEPEND[x509_internal_test]=../libcrypto.a
339
  ENDIF
340

341 342
  IF[{- !$disabled{mdc2} -}]
    PROGRAMS_NO_INST=mdc2_internal_test
343
  ENDIF
344

345
  SOURCE[mdc2_internal_test]=mdc2_internal_test.c testutil.c test_main.c
346 347
  INCLUDE[mdc2_internal_test]=.. ../include
  DEPEND[mdc2_internal_test]=../libcrypto
348 349 350 351 352 353 354 355 356 357 358

  # We disable this test completely in a shared build because it deliberately
  # redefines some internal libssl symbols. This doesn't work in a non-shared
  # build
  IF[{- !$disabled{shared} -}]
    PROGRAMS_NO_INST=tls13secretstest
    SOURCE[tls13secretstest]=tls13secretstest.c testutil.c
    SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
    INCLUDE[tls13secretstest]=.. ../include
    DEPEND[tls13secretstest]=../libcrypto ../libssl
  ENDIF
359 360 361
ENDIF

{-
362
   use File::Spec::Functions;
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
   use File::Basename;
   use if $^O ne "VMS", 'File::Glob' => qw/glob/;

   my @nogo_headers = ( "asn1_mac.h",
                        "__decc_include_prologue.h",
                        "__decc_include_epilogue.h" );
   my @headerfiles = glob catfile($sourcedir,
                                  updir(), "include", "openssl", "*.h");

   foreach my $headerfile (@headerfiles) {
       my $name = basename($headerfile, ".h");
       next if $disabled{$name};
       next if grep { $_ eq lc("$name.h") } @nogo_headers;
       $OUT .= <<"_____";

378
  PROGRAMS_NO_INST=buildtest_$name
379 380
  GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
  SOURCE[buildtest_$name]=buildtest_$name.c
381
  INCLUDE[buildtest_$name]=../include
382 383 384
  DEPEND[buildtest_$name]=../libssl ../libcrypto
_____
   }
385
-}