build.info 13.0 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 \
22
          danetest heartbeat_test 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 \
A
Andy Polyakov 已提交
27
          bioprinttest sslapitest dtlstest 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[heartbeat_test]=heartbeat_test.c testutil.c
182
  INCLUDE[heartbeat_test]=.. ../include
M
Matt Caswell 已提交
183
  DEPEND[heartbeat_test]=../libcrypto ../libssl
184

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

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

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

M
Matt Caswell 已提交
197
  SOURCE[clienthellotest]=clienthellotest.c
198
  INCLUDE[clienthellotest]=../include
M
Matt Caswell 已提交
199
  DEPEND[clienthellotest]=../libcrypto ../libssl
200

201
  SOURCE[bad_dtls_test]=bad_dtls_test.c
202
  INCLUDE[bad_dtls_test]=../include
203 204
  DEPEND[bad_dtls_test]=../libcrypto ../libssl

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

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

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

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

M
Matt Caswell 已提交
221
  SOURCE[memleaktest]=memleaktest.c
222
  INCLUDE[memleaktest]=../include
M
Matt Caswell 已提交
223
  DEPEND[memleaktest]=../libcrypto
224

M
Matt Caswell 已提交
225
  SOURCE[dtlsv1listentest]=dtlsv1listentest.c
226
  INCLUDE[dtlsv1listentest]=.. ../include
M
Matt Caswell 已提交
227
  DEPEND[dtlsv1listentest]=../libssl
R
Rich Salz 已提交
228

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

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

M
Matt Caswell 已提交
237
  SOURCE[afalgtest]=afalgtest.c
238
  INCLUDE[afalgtest]=.. ../include
M
Matt Caswell 已提交
239
  DEPEND[afalgtest]=../libcrypto
C
clucey 已提交
240

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

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

M
Matt Caswell 已提交
249
  SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c testutil.c handshake_helper.c
250
  INCLUDE[ssl_test]=.. ../include
M
Matt Caswell 已提交
251
  DEPEND[ssl_test]=../libcrypto ../libssl
E
Emilia Kasper 已提交
252

E
Emilia Kasper 已提交
253
  SOURCE[cipherlist_test]=cipherlist_test.c testutil.c
254
  INCLUDE[cipherlist_test]=.. ../include
E
Emilia Kasper 已提交
255 256
  DEPEND[cipherlist_test]=../libcrypto ../libssl

M
Matt Caswell 已提交
257
  INCLUDE[testutil.o]=..
258 259 260
  INCLUDE[ssl_test_ctx.o]=../include
  INCLUDE[handshake_helper.o]=../include
  INCLUDE[ssltestlib.o]=../include
261 262

  SOURCE[x509aux]=x509aux.c
263
  INCLUDE[x509aux]=../include
264
  DEPEND[x509aux]=../libcrypto
M
Matt Caswell 已提交
265

M
Matt Caswell 已提交
266
  SOURCE[asynciotest]=asynciotest.c ssltestlib.c
267
  INCLUDE[asynciotest]=../include
M
Matt Caswell 已提交
268
  DEPEND[asynciotest]=../libcrypto ../libssl
269 270

  SOURCE[bioprinttest]=bioprinttest.c
271
  INCLUDE[bioprinttest]=../include
272
  DEPEND[bioprinttest]=../libcrypto
273 274 275 276

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

  SOURCE[dtlstest]=dtlstest.c ssltestlib.c testutil.c
  INCLUDE[dtlstest]=../include .
  DEPEND[dtlstest]=../libcrypto ../libssl
A
Andy Polyakov 已提交
281 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 302 303
    SOURCE[wpackettest]=wpackettest.c testutil.c
    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 311 312 313 314 315 316 317 318 319 320 321 322 323 324
  # Internal test programs.  These are essentially a collection of internal
  # test routines.  Because they sometimes 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 may be built on files directly picked from inside crypto/
  # or ssl/, to test using symbols that exist in those specific files.  These
  # programs will also be linked with libcrypto / libssl, so we don't pick
  # out more specific files than necessary.
  # This might mean we have multiply defined symbols, but since linking is
  # ordered with object files first and libraries after, the symbols from the
  # object files will be chosen before those in the libraries.  This is handled
  # properly by all linkers.
  # Note that when building with static libraries, none of those extra files
  # are needed, since all symbols are available anyway, regardless of what's
  # listed in util/*.num.
325
  PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test
326 327 328
  IF[{- !$disabled{mdc2} -}]
    PROGRAMS_NO_INST=mdc2_internal_test
  ENDIF
329 330 331 332 333 334 335
  IF[{- !$disabled{poly1305} -}]
    PROGRAMS_NO_INST=poly1305_internal_test
  ENDIF

  SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c
  IF[{- !$disabled{shared} -}]
    SOURCE[poly1305_internal_test]= ../crypto/poly1305/poly1305.c \
R
Richard Levitte 已提交
336 337
        {- rebase_files("../crypto/poly1305", $target{poly1305_asm_src}) -} \
        {- rebase_files("../crypto", $target{cpuid_asm_src}) -} \
338 339 340 341
        ../crypto/cryptlib.c
  ENDIF
  INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
  DEPEND[poly1305_internal_test]=../libcrypto
342 343 344 345 346 347 348 349 350 351 352

  SOURCE[asn1_internal_test]=asn1_internal_test.c testutil.c
  IF[{- !$disabled{shared} -}]
    SOURCE[asn1_internal_test]= ../crypto/asn1/a_strnid.c \
        ../crypto/rsa/rsa_ameth.c ../crypto/dsa/dsa_ameth.c \
        ../crypto/dh/dh_ameth.c ../crypto/ec/ec_ameth.c \
        ../crypto/hmac/hm_ameth.c ../crypto/cmac/cm_ameth.c \
        ../crypto/ec/ecx_meth.c ../crypto/ec/curve25519.c
  ENDIF
  INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
  DEPEND[asn1_internal_test]=../libcrypto
353 354 355

  SOURCE[modes_internal_test]=modes_internal_test.c testutil.c
  IF[{- !$disabled{shared} -}]
R
Richard Levitte 已提交
356 357
    SOURCE[modes_internal_test]= \
        {- rebase_files("../crypto", $target{cpuid_asm_src}); -} \
358 359 360 361
        ../crypto/cryptlib.c
  ENDIF
  INCLUDE[modes_internal_test]=.. ../include
  DEPEND[modes_internal_test]=../libcrypto
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383

  # The reason for the huge amount of directly included x509v3 files
  # is that a table that is checked by x509_internal_test refers to
  # structures that are spread all over those files.
  SOURCE[x509_internal_test]=x509_internal_test.c testutil.c
  IF[{- !$disabled{shared} -}]
    SOURCE[x509_internal_test]= ../crypto/x509v3/v3_bitst.c \
        ../crypto/x509v3/v3_ia5.c ../crypto/x509v3/v3_skey.c \
        ../crypto/x509v3/v3_pku.c ../crypto/x509v3/v3_alt.c \
        ../crypto/x509v3/v3_bcons.c ../crypto/x509v3/v3_int.c \
        ../crypto/x509v3/v3_cpols.c ../crypto/x509v3/v3_akey.c \
        ../crypto/x509v3/v3_crld.c ../crypto/x509v3/v3_utl.c \
        ../crypto/x509v3/v3_extku.c ../crypto/x509v3/v3_enum.c \
        ../crypto/x509v3/v3_sxnet.c ../crypto/x509v3/v3_info.c \
        ../crypto/x509v3/v3_addr.c ../crypto/x509v3/v3_asid.c \
        ../crypto/x509v3/v3_pcons.c ../crypto/x509v3/v3_pmaps.c \
        ../crypto/x509v3/v3_pci.c ../crypto/x509v3/v3_ncons.c \
        ../crypto/x509v3/v3_tlsf.c ../crypto/ocsp/v3_ocsp.c \
        ../crypto/ct/ct_x509v3.c ../crypto/asn1/a_strex.c
  ENDIF
  INCLUDE[x509_internal_test]=.. ../include
  DEPEND[x509_internal_test]=../libcrypto
384 385 386 387

  SOURCE[mdc2_internal_test]=mdc2_internal_test.c testutil.c
  INCLUDE[mdc2_internal_test]=.. ../include
  DEPEND[mdc2_internal_test]=../libcrypto
388 389 390
ENDIF

{-
391
   use File::Spec::Functions;
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406
   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 .= <<"_____";

407
  PROGRAMS_NO_INST=buildtest_$name
408 409
  GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
  SOURCE[buildtest_$name]=buildtest_$name.c
410
  INCLUDE[buildtest_$name]=../include
411 412 413
  DEPEND[buildtest_$name]=../libssl ../libcrypto
_____
   }
414
-}