build.info 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. {-
  2. use File::Spec::Functions;
  3. sub rebase_files
  4. {
  5. my ($base, $files) = @_;
  6. return join(" ", map { "$base/$_" } split(/\s+/, $files));
  7. }
  8. ""
  9. -}
  10. IF[{- !$disabled{tests} -}]
  11. LIBS_NO_INST=libtestutil.a
  12. SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
  13. testutil/driver.c testutil/tests.c testutil/cb.c \
  14. {- rebase_files("../apps", $target{apps_aux_src}) -} \
  15. testutil/test_main.c testutil/main.c
  16. INCLUDE[libtestutil.a]=.. ../include
  17. DEPEND[libtestutil.a]=../libcrypto
  18. # Special hack for descrip.mms to include the MAIN object module
  19. # explicitely. This will only be done if there isn't a MAIN in the
  20. # program's object modules already.
  21. BEGINRAW[descrip.mms]
  22. INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=MAIN
  23. ENDRAW[descrip.mms]
  24. PROGRAMS_NO_INST=\
  25. aborttest test_test \
  26. sanitytest exdatatest bntest \
  27. ectest ecdsatest gmdifftest pbelutest ideatest \
  28. md2test \
  29. hmactest \
  30. rc2test rc4test rc5test \
  31. destest sha1test sha256t sha512t \
  32. mdc2test \
  33. randtest dhtest enginetest casttest \
  34. bftest ssltest_old dsatest exptest rsa_test \
  35. evp_test evp_extra_test igetest v3nametest v3ext \
  36. crltest danetest bad_dtls_test lhash_test \
  37. constant_time_test verify_extra_test clienthellotest \
  38. packettest asynctest secmemtest srptest memleaktest stack_test \
  39. dtlsv1listentest ct_test threadstest afalgtest d2i_test \
  40. ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
  41. bioprinttest sslapitest dtlstest sslcorrupttest bio_enc_test \
  42. pkey_meth_test uitest cipherbytes_test asn1_encode_test \
  43. x509_time_test x509_dup_cert_test recordlentest \
  44. time_offset_test
  45. SOURCE[aborttest]=aborttest.c
  46. INCLUDE[aborttest]=../include
  47. DEPEND[aborttest]=../libcrypto
  48. SOURCE[sanitytest]=sanitytest.c
  49. INCLUDE[sanitytest]=../include
  50. DEPEND[sanitytest]=../libcrypto libtestutil.a
  51. SOURCE[test_test]=test_test.c
  52. INCLUDE[test_test]=.. ../include
  53. DEPEND[test_test]=../libcrypto libtestutil.a
  54. SOURCE[exdatatest]=exdatatest.c
  55. INCLUDE[exdatatest]=../include
  56. DEPEND[exdatatest]=../libcrypto libtestutil.a
  57. SOURCE[bntest]=bntest.c
  58. INCLUDE[bntest]=.. ../crypto/include ../include
  59. DEPEND[bntest]=../libcrypto libtestutil.a
  60. SOURCE[ectest]=ectest.c
  61. INCLUDE[ectest]=.. ../include
  62. DEPEND[ectest]=../libcrypto
  63. SOURCE[ecdsatest]=ecdsatest.c
  64. INCLUDE[ecdsatest]=../include
  65. DEPEND[ecdsatest]=../libcrypto libtestutil.a
  66. SOURCE[gmdifftest]=gmdifftest.c
  67. INCLUDE[gmdifftest]=../include
  68. DEPEND[gmdifftest]=../libcrypto libtestutil.a
  69. SOURCE[pbelutest]=pbelutest.c
  70. INCLUDE[pbelutest]=../include
  71. DEPEND[pbelutest]=../libcrypto libtestutil.a
  72. SOURCE[ideatest]=ideatest.c
  73. INCLUDE[ideatest]=../include
  74. DEPEND[ideatest]=../libcrypto libtestutil.a
  75. SOURCE[md2test]=md2test.c
  76. INCLUDE[md2test]=../include
  77. DEPEND[md2test]=../libcrypto libtestutil.a
  78. SOURCE[hmactest]=hmactest.c
  79. INCLUDE[hmactest]=../include
  80. DEPEND[hmactest]=../libcrypto libtestutil.a
  81. SOURCE[rc2test]=rc2test.c
  82. INCLUDE[rc2test]=../include
  83. DEPEND[rc2test]=../libcrypto libtestutil.a
  84. SOURCE[rc4test]=rc4test.c
  85. INCLUDE[rc4test]=../include
  86. DEPEND[rc4test]=../libcrypto libtestutil.a
  87. SOURCE[rc5test]=rc5test.c
  88. INCLUDE[rc5test]=../include
  89. DEPEND[rc5test]=../libcrypto libtestutil.a
  90. SOURCE[destest]=destest.c
  91. INCLUDE[destest]=../include
  92. DEPEND[destest]=../libcrypto libtestutil.a
  93. SOURCE[sha1test]=sha1test.c
  94. INCLUDE[sha1test]=../include
  95. DEPEND[sha1test]=../libcrypto libtestutil.a
  96. SOURCE[sha256t]=sha256t.c
  97. INCLUDE[sha256t]=../include
  98. DEPEND[sha256t]=../libcrypto libtestutil.a
  99. SOURCE[sha512t]=sha512t.c
  100. INCLUDE[sha512t]=../include
  101. DEPEND[sha512t]=../libcrypto libtestutil.a
  102. SOURCE[mdc2test]=mdc2test.c
  103. INCLUDE[mdc2test]=../include
  104. DEPEND[mdc2test]=../libcrypto libtestutil.a
  105. SOURCE[randtest]=randtest.c
  106. INCLUDE[randtest]=../include
  107. DEPEND[randtest]=../libcrypto libtestutil.a
  108. SOURCE[dhtest]=dhtest.c
  109. INCLUDE[dhtest]=.. ../include
  110. DEPEND[dhtest]=../libcrypto libtestutil.a
  111. SOURCE[enginetest]=enginetest.c
  112. INCLUDE[enginetest]=../include
  113. DEPEND[enginetest]=../libcrypto libtestutil.a
  114. SOURCE[casttest]=casttest.c
  115. INCLUDE[casttest]=.. ../include
  116. DEPEND[casttest]=../libcrypto libtestutil.a
  117. SOURCE[bftest]=bftest.c
  118. INCLUDE[bftest]=../include
  119. DEPEND[bftest]=../libcrypto libtestutil.a
  120. SOURCE[ssltest_old]=ssltest_old.c
  121. INCLUDE[ssltest_old]=.. ../include
  122. DEPEND[ssltest_old]=../libcrypto ../libssl
  123. SOURCE[dsatest]=dsatest.c
  124. INCLUDE[dsatest]=.. ../include
  125. DEPEND[dsatest]=../libcrypto libtestutil.a
  126. SOURCE[exptest]=exptest.c
  127. INCLUDE[exptest]=../include
  128. DEPEND[exptest]=../libcrypto libtestutil.a
  129. SOURCE[rsa_test]=rsa_test.c
  130. INCLUDE[rsa_test]=.. ../include
  131. DEPEND[rsa_test]=../libcrypto libtestutil.a
  132. SOURCE[evp_test]=evp_test.c
  133. INCLUDE[evp_test]=../include
  134. DEPEND[evp_test]=../libcrypto
  135. SOURCE[evp_extra_test]=evp_extra_test.c
  136. INCLUDE[evp_extra_test]=../include
  137. DEPEND[evp_extra_test]=../libcrypto libtestutil.a
  138. SOURCE[igetest]=igetest.c
  139. INCLUDE[igetest]=.. ../include
  140. DEPEND[igetest]=../libcrypto libtestutil.a
  141. SOURCE[v3nametest]=v3nametest.c
  142. INCLUDE[v3nametest]=.. ../include
  143. DEPEND[v3nametest]=../libcrypto libtestutil.a
  144. SOURCE[crltest]=crltest.c
  145. INCLUDE[crltest]=../include
  146. DEPEND[crltest]=../libcrypto libtestutil.a
  147. SOURCE[v3ext]=v3ext.c
  148. INCLUDE[v3ext]=../include
  149. DEPEND[v3ext]=../libcrypto libtestutil.a
  150. SOURCE[danetest]=danetest.c
  151. INCLUDE[danetest]=.. ../include
  152. DEPEND[danetest]=../libcrypto ../libssl libtestutil.a
  153. SOURCE[constant_time_test]=constant_time_test.c
  154. INCLUDE[constant_time_test]=.. ../include
  155. DEPEND[constant_time_test]=../libcrypto libtestutil.a
  156. SOURCE[verify_extra_test]=verify_extra_test.c
  157. INCLUDE[verify_extra_test]=../include
  158. DEPEND[verify_extra_test]=../libcrypto libtestutil.a
  159. SOURCE[clienthellotest]=clienthellotest.c
  160. INCLUDE[clienthellotest]=../include
  161. DEPEND[clienthellotest]=../libcrypto ../libssl libtestutil.a
  162. SOURCE[bad_dtls_test]=bad_dtls_test.c
  163. INCLUDE[bad_dtls_test]=../include
  164. DEPEND[bad_dtls_test]=../libcrypto ../libssl libtestutil.a
  165. SOURCE[packettest]=packettest.c
  166. INCLUDE[packettest]=../include
  167. DEPEND[packettest]=../libcrypto libtestutil.a
  168. SOURCE[asynctest]=asynctest.c
  169. INCLUDE[asynctest]=.. ../include
  170. DEPEND[asynctest]=../libcrypto
  171. SOURCE[secmemtest]=secmemtest.c
  172. INCLUDE[secmemtest]=../include
  173. DEPEND[secmemtest]=../libcrypto libtestutil.a
  174. SOURCE[srptest]=srptest.c
  175. INCLUDE[srptest]=../include
  176. DEPEND[srptest]=../libcrypto libtestutil.a
  177. SOURCE[memleaktest]=memleaktest.c
  178. INCLUDE[memleaktest]=../include
  179. DEPEND[memleaktest]=../libcrypto libtestutil.a
  180. SOURCE[stack_test]=stack_test.c
  181. INCLUDE[stack_test]=.. ../include
  182. DEPEND[stack_test]=../libcrypto libtestutil.a
  183. SOURCE[lhash_test]=lhash_test.c
  184. INCLUDE[lhash_test]=.. ../include
  185. DEPEND[lhash_test]=../libcrypto libtestutil.a
  186. SOURCE[dtlsv1listentest]=dtlsv1listentest.c
  187. INCLUDE[dtlsv1listentest]=.. ../include
  188. DEPEND[dtlsv1listentest]=../libssl libtestutil.a
  189. SOURCE[ct_test]=ct_test.c
  190. INCLUDE[ct_test]=../crypto/include ../include
  191. DEPEND[ct_test]=../libcrypto libtestutil.a
  192. SOURCE[threadstest]=threadstest.c
  193. INCLUDE[threadstest]=.. ../include
  194. DEPEND[threadstest]=../libcrypto libtestutil.a
  195. SOURCE[afalgtest]=afalgtest.c
  196. INCLUDE[afalgtest]=.. ../include
  197. DEPEND[afalgtest]=../libcrypto libtestutil.a
  198. SOURCE[d2i_test]=d2i_test.c
  199. INCLUDE[d2i_test]=.. ../include
  200. DEPEND[d2i_test]=../libcrypto libtestutil.a
  201. SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c
  202. INCLUDE[ssl_test_ctx_test]=.. ../include
  203. DEPEND[ssl_test_ctx_test]=../libcrypto ../libssl libtestutil.a
  204. SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c handshake_helper.c
  205. INCLUDE[ssl_test]=.. ../include
  206. DEPEND[ssl_test]=../libcrypto ../libssl libtestutil.a
  207. SOURCE[cipherlist_test]=cipherlist_test.c
  208. INCLUDE[cipherlist_test]=.. ../include
  209. DEPEND[cipherlist_test]=../libcrypto ../libssl libtestutil.a
  210. INCLUDE[testutil.o]=..
  211. INCLUDE[ssl_test_ctx.o]=../include
  212. INCLUDE[handshake_helper.o]=../include
  213. INCLUDE[ssltestlib.o]=.. ../include
  214. SOURCE[x509aux]=x509aux.c
  215. INCLUDE[x509aux]=.. ../include
  216. DEPEND[x509aux]=../libcrypto libtestutil.a
  217. SOURCE[asynciotest]=asynciotest.c ssltestlib.c
  218. INCLUDE[asynciotest]=../include
  219. DEPEND[asynciotest]=../libcrypto ../libssl libtestutil.a
  220. SOURCE[bioprinttest]=bioprinttest.c
  221. INCLUDE[bioprinttest]=../ ../include
  222. DEPEND[bioprinttest]=../libcrypto libtestutil.a
  223. SOURCE[sslapitest]=sslapitest.c ssltestlib.c
  224. INCLUDE[sslapitest]=../include ..
  225. DEPEND[sslapitest]=../libcrypto ../libssl libtestutil.a
  226. SOURCE[dtlstest]=dtlstest.c ssltestlib.c
  227. INCLUDE[dtlstest]=../include .
  228. DEPEND[dtlstest]=../libcrypto ../libssl libtestutil.a
  229. SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c
  230. INCLUDE[sslcorrupttest]=../include .
  231. DEPEND[sslcorrupttest]=../libcrypto ../libssl libtestutil.a
  232. SOURCE[bio_enc_test]=bio_enc_test.c
  233. INCLUDE[bio_enc_test]=../include
  234. DEPEND[bio_enc_test]=../libcrypto libtestutil.a
  235. SOURCE[pkey_meth_test]=pkey_meth_test.c
  236. INCLUDE[pkey_meth_test]=../include
  237. DEPEND[pkey_meth_test]=../libcrypto libtestutil.a
  238. SOURCE[x509_time_test]=x509_time_test.c
  239. INCLUDE[x509_time_test]=.. ../include
  240. DEPEND[x509_time_test]=../libcrypto libtestutil.a
  241. SOURCE[recordlentest]=recordlentest.c ssltestlib.c
  242. INCLUDE[recordlentest]=../include .
  243. DEPEND[recordlentest]=../libcrypto ../libssl libtestutil.a
  244. SOURCE[x509_dup_cert_test]=x509_dup_cert_test.c
  245. INCLUDE[x509_dup_cert_test]=../include
  246. DEPEND[x509_dup_cert_test]=../libcrypto libtestutil.a
  247. IF[{- !$disabled{psk} -}]
  248. PROGRAMS_NO_INST=dtls_mtu_test
  249. SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
  250. INCLUDE[dtls_mtu_test]=.. ../include
  251. DEPEND[dtls_mtu_test]=../libcrypto ../libssl libtestutil.a
  252. ENDIF
  253. IF[{- !$disabled{shared} -}]
  254. PROGRAMS_NO_INST=shlibloadtest
  255. SOURCE[shlibloadtest]=shlibloadtest.c
  256. INCLUDE[shlibloadtest]=../include
  257. ENDIF
  258. IF[{- $disabled{shared} -}]
  259. PROGRAMS_NO_INST=cipher_overhead_test
  260. SOURCE[cipher_overhead_test]=cipher_overhead_test.c
  261. INCLUDE[cipher_overhead_test]=.. ../include
  262. DEPEND[cipher_overhead_test]=../libcrypto ../libssl libtestutil.a
  263. ENDIF
  264. SOURCE[uitest]=uitest.c ../apps/apps.c ../apps/opt.c
  265. INCLUDE[uitest]=.. ../include
  266. DEPEND[uitest]=../libcrypto ../libssl libtestutil.a
  267. SOURCE[cipherbytes_test]=cipherbytes_test.c
  268. INCLUDE[cipherbytes_test]=.. ../include
  269. DEPEND[cipherbytes_test]=../libcrypto ../libssl libtestutil.a
  270. SOURCE[asn1_encode_test]=asn1_encode_test.c
  271. INCLUDE[asn1_encode_test]=../include
  272. DEPEND[asn1_encode_test]=../libcrypto libtestutil.a
  273. SOURCE[time_offset_test]=time_offset_test.c
  274. INCLUDE[time_offset_test]=.. ../include
  275. DEPEND[time_offset_test]=../libcrypto libtestutil.a
  276. # Internal test programs. These are essentially a collection of internal
  277. # test routines. Some of them need to reach internal symbols that aren't
  278. # available through the shared library (at least on Linux, Solaris, Windows
  279. # and VMS, where the exported symbols are those listed in util/*.num), these
  280. # programs are forcibly linked with the static libraries, where all symbols
  281. # are always available. This excludes linking these programs natively on
  282. # Windows when building shared libraries, since the static libraries share
  283. # names with the DLL import libraries.
  284. IF[{- $disabled{shared} || $target{build_scheme}->[1] ne 'windows' -}]
  285. PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test \
  286. tls13encryptiontest wpackettest
  287. IF[{- !$disabled{poly1305} -}]
  288. PROGRAMS_NO_INST=poly1305_internal_test
  289. ENDIF
  290. IF[{- !$disabled{chacha} -}]
  291. PROGRAMS_NO_INST=chacha_internal_test
  292. ENDIF
  293. IF[{- !$disabled{siphash} -}]
  294. PROGRAMS_NO_INST=siphash_internal_test
  295. ENDIF
  296. SOURCE[poly1305_internal_test]=poly1305_internal_test.c
  297. INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
  298. DEPEND[poly1305_internal_test]=../libcrypto.a libtestutil.a
  299. SOURCE[chacha_internal_test]=chacha_internal_test.c
  300. INCLUDE[chacha_internal_test]=.. ../include ../crypto/include
  301. DEPEND[chacha_internal_test]=../libcrypto.a libtestutil.a
  302. SOURCE[asn1_internal_test]=asn1_internal_test.c
  303. INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
  304. DEPEND[asn1_internal_test]=../libcrypto.a libtestutil.a
  305. SOURCE[modes_internal_test]=modes_internal_test.c
  306. INCLUDE[modes_internal_test]=.. ../include
  307. DEPEND[modes_internal_test]=../libcrypto.a libtestutil.a
  308. SOURCE[x509_internal_test]=x509_internal_test.c
  309. INCLUDE[x509_internal_test]=.. ../include
  310. DEPEND[x509_internal_test]=../libcrypto.a libtestutil.a
  311. SOURCE[tls13encryptiontest]=tls13encryptiontest.c
  312. INCLUDE[tls13encryptiontest]=.. ../include
  313. DEPEND[tls13encryptiontest]=../libcrypto ../libssl.a libtestutil.a
  314. SOURCE[wpackettest]=wpackettest.c
  315. INCLUDE[wpackettest]=../include
  316. DEPEND[wpackettest]=../libcrypto ../libssl.a libtestutil.a
  317. SOURCE[siphash_internal_test]=siphash_internal_test.c
  318. INCLUDE[siphash_internal_test]=.. ../include ../crypto/include
  319. DEPEND[siphash_internal_test]=../libcrypto.a libtestutil.a
  320. ENDIF
  321. IF[{- !$disabled{mdc2} -}]
  322. PROGRAMS_NO_INST=mdc2_internal_test
  323. ENDIF
  324. SOURCE[mdc2_internal_test]=mdc2_internal_test.c
  325. INCLUDE[mdc2_internal_test]=.. ../include
  326. DEPEND[mdc2_internal_test]=../libcrypto libtestutil.a
  327. # We disable this test completely in a shared build because it deliberately
  328. # redefines some internal libssl symbols. This doesn't work in a non-shared
  329. # build
  330. IF[{- !$disabled{shared} -}]
  331. PROGRAMS_NO_INST=tls13secretstest
  332. SOURCE[tls13secretstest]=tls13secretstest.c
  333. SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
  334. INCLUDE[tls13secretstest]=.. ../include
  335. DEPEND[tls13secretstest]=../libcrypto ../libssl libtestutil.a
  336. ENDIF
  337. ENDIF
  338. {-
  339. use File::Spec::Functions;
  340. use File::Basename;
  341. use if $^O ne "VMS", 'File::Glob' => qw/glob/;
  342. my @nogo_headers = ( "asn1_mac.h",
  343. "__decc_include_prologue.h",
  344. "__decc_include_epilogue.h" );
  345. my @headerfiles = glob catfile($sourcedir,
  346. updir(), "include", "openssl", "*.h");
  347. foreach my $headerfile (@headerfiles) {
  348. my $name = basename($headerfile, ".h");
  349. next if $disabled{$name};
  350. next if grep { $_ eq lc("$name.h") } @nogo_headers;
  351. $OUT .= <<"_____";
  352. PROGRAMS_NO_INST=buildtest_$name
  353. GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
  354. SOURCE[buildtest_$name]=buildtest_$name.c
  355. INCLUDE[buildtest_$name]=../include
  356. DEPEND[buildtest_$name]=../libssl ../libcrypto
  357. _____
  358. }
  359. -}