README 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. Intro
  2. =====
  3. This directory contains a few sets of files that are used for
  4. configuration in diverse ways:
  5. *.conf Target platform configurations, please read
  6. 'Configurations of OpenSSL target platforms' for more
  7. information.
  8. *.tmpl Build file templates, please read 'Build-file
  9. programming with the "unified" build system' as well
  10. as 'Build info files' for more information.
  11. *.pm Helper scripts / modules for the main `Configure`
  12. script. See 'Configure helper scripts for more
  13. information.
  14. Configurations of OpenSSL target platforms
  15. ==========================================
  16. Configuration targets are a collection of facts that we know about
  17. different platforms and their capabilities. We organise them in a
  18. hash table, where each entry represent a specific target.
  19. Note that configuration target names must be unique across all config
  20. files. The Configure script does check that a config file doesn't
  21. have config targets that shadow config targets from other files.
  22. In each table entry, the following keys are significant:
  23. inherit_from => Other targets to inherit values from.
  24. Explained further below. [1]
  25. template => Set to 1 if this isn't really a platform
  26. target. Instead, this target is a template
  27. upon which other targets can be built.
  28. Explained further below. [1]
  29. sys_id => System identity for systems where that
  30. is difficult to determine automatically.
  31. cc => The compiler command, usually one of "cc",
  32. "gcc" or "clang". This command is normally
  33. also used to link object files and
  34. libraries into the final program.
  35. cflags => Flags that are used at all times when
  36. compiling.
  37. defines => As an alternative, macro definitions may be
  38. present here instead of in `cflags'. If
  39. given here, they MUST be as an array of the
  40. string such as "MACRO=value", or just
  41. "MACRO" for definitions without value.
  42. shared_cflag => Extra compilation flags used when
  43. compiling for shared libraries, typically
  44. something like "-fPIC".
  45. (linking is a complex thing, see [3] below)
  46. ld => Linker command, usually not defined
  47. (meaning the compiler command is used
  48. instead).
  49. (NOTE: this is here for future use, it's
  50. not implemented yet)
  51. lflags => Flags that are used when linking apps.
  52. shared_ldflag => Flags that are used when linking shared
  53. or dynamic libraries.
  54. plib_lflags => Extra linking flags to appear just before
  55. the libraries on the command line.
  56. ex_libs => Extra libraries that are needed when
  57. linking.
  58. ar => The library archive command, the default is
  59. "ar".
  60. (NOTE: this is here for future use, it's
  61. not implemented yet)
  62. arflags => Flags to be used with the library archive
  63. command.
  64. ranlib => The library archive indexing command, the
  65. default is 'ranlib' it it exists.
  66. unistd => An alternative header to the typical
  67. '<unistd.h>'. This is very rarely needed.
  68. shared_extension => File name extension used for shared
  69. libraries.
  70. obj_extension => File name extension used for object files.
  71. On unix, this defaults to ".o" (NOTE: this
  72. is here for future use, it's not
  73. implemented yet)
  74. exe_extension => File name extension used for executable
  75. files. On unix, this defaults to "" (NOTE:
  76. this is here for future use, it's not
  77. implemented yet)
  78. shlib_variant => A "variant" identifier inserted between the base
  79. shared library name and the extension. On "unixy"
  80. platforms (BSD, Linux, Solaris, MacOS/X, ...) this
  81. supports installation of custom OpenSSL libraries
  82. that don't conflict with other builds of OpenSSL
  83. installed on the system. The variant identifier
  84. becomes part of the SONAME of the library and also
  85. any symbol versions (symbol versions are not used or
  86. needed with MacOS/X). For example, on a system
  87. where a default build would normally create the SSL
  88. shared library as 'libssl.so -> libssl.so.1.1' with
  89. the value of the symlink as the SONAME, a target
  90. definition that sets 'shlib_variant => "-abc"' will
  91. create 'libssl.so -> libssl-abc.so.1.1', again with
  92. an SONAME equal to the value of the symlink. The
  93. symbol versions associated with the variant library
  94. would then be 'OPENSSL_ABC_<version>' rather than
  95. the default 'OPENSSL_<version>'. The string inserted
  96. into symbol versions is obtained by mapping all
  97. letters in the "variant" identifier to upper case
  98. and all non-alphanumeric characters to '_'.
  99. thread_scheme => The type of threads is used on the
  100. configured platform. Currently known
  101. values are "(unknown)", "pthreads",
  102. "uithreads" (a.k.a solaris threads) and
  103. "winthreads". Except for "(unknown)", the
  104. actual value is currently ignored but may
  105. be used in the future. See further notes
  106. below [2].
  107. dso_scheme => The type of dynamic shared objects to build
  108. for. This mostly comes into play with
  109. engines, but can be used for other purposes
  110. as well. Valid values are "DLFCN"
  111. (dlopen() et al), "DLFCN_NO_H" (for systems
  112. that use dlopen() et al but do not have
  113. fcntl.h), "DL" (shl_load() et al), "WIN32"
  114. and "VMS".
  115. perlasm_scheme => The perlasm method used to created the
  116. assembler files used when compiling with
  117. assembler implementations.
  118. shared_target => The shared library building method used.
  119. This is a target found in Makefile.shared.
  120. build_scheme => The scheme used to build up a Makefile.
  121. In its simplest form, the value is a string
  122. with the name of the build scheme.
  123. The value may also take the form of a list
  124. of strings, if the build_scheme is to have
  125. some options. In this case, the first
  126. string in the list is the name of the build
  127. scheme.
  128. Currently recognised build scheme is "unified".
  129. For the "unified" build scheme, this item
  130. *must* be an array with the first being the
  131. word "unified" and the second being a word
  132. to identify the platform family.
  133. multilib => On systems that support having multiple
  134. implementations of a library (typically a
  135. 32-bit and a 64-bit variant), this is used
  136. to have the different variants in different
  137. directories.
  138. bn_ops => Building options (was just bignum options in
  139. the earlier history of this option, hence the
  140. name). This is a string of words that describe
  141. algorithms' implementation parameters that
  142. are optimal for the designated target platform,
  143. such as the type of integers used to build up
  144. the bignum, different ways to implement certain
  145. ciphers and so on. To fully comprehend the
  146. meaning, the best is to read the affected
  147. source.
  148. The valid words are:
  149. THIRTY_TWO_BIT bignum limbs are 32 bits,
  150. this is default if no
  151. option is specified, it
  152. works on any supported
  153. system [unless "wider"
  154. limb size is implied in
  155. assembly code];
  156. BN_LLONG bignum limbs are 32 bits,
  157. but 64-bit 'unsigned long
  158. long' is used internally
  159. in calculations;
  160. SIXTY_FOUR_BIT_LONG bignum limbs are 64 bits
  161. and sizeof(long) is 8;
  162. SIXTY_FOUR_BIT bignums limbs are 64 bits,
  163. but execution environment
  164. is ILP32;
  165. RC4_CHAR RC4 key schedule is made
  166. up of 'unsigned char's;
  167. RC4_INT RC4 key schedule is made
  168. up of 'unsigned int's;
  169. EXPORT_VAR_AS_FN for shared libraries,
  170. export vars as
  171. accessor functions.
  172. apps_extra_src => Extra source to build apps/openssl, as
  173. needed by the target.
  174. cpuid_asm_src => assembler implementation of cpuid code as
  175. well as OPENSSL_cleanse().
  176. Default to mem_clr.c
  177. bn_asm_src => Assembler implementation of core bignum
  178. functions.
  179. Defaults to bn_asm.c
  180. ec_asm_src => Assembler implementation of core EC
  181. functions.
  182. des_asm_src => Assembler implementation of core DES
  183. encryption functions.
  184. Defaults to 'des_enc.c fcrypt_b.c'
  185. aes_asm_src => Assembler implementation of core AES
  186. functions.
  187. Defaults to 'aes_core.c aes_cbc.c'
  188. bf_asm_src => Assembler implementation of core BlowFish
  189. functions.
  190. Defaults to 'bf_enc.c'
  191. md5_asm_src => Assembler implementation of core MD5
  192. functions.
  193. sha1_asm_src => Assembler implementation of core SHA1,
  194. functions, and also possibly SHA256 and
  195. SHA512 ones.
  196. cast_asm_src => Assembler implementation of core CAST
  197. functions.
  198. Defaults to 'c_enc.c'
  199. rc4_asm_src => Assembler implementation of core RC4
  200. functions.
  201. Defaults to 'rc4_enc.c rc4_skey.c'
  202. rmd160_asm_src => Assembler implementation of core RMD160
  203. functions.
  204. rc5_asm_src => Assembler implementation of core RC5
  205. functions.
  206. Defaults to 'rc5_enc.c'
  207. wp_asm_src => Assembler implementation of core WHIRLPOOL
  208. functions.
  209. cmll_asm_src => Assembler implementation of core CAMELLIA
  210. functions.
  211. Defaults to 'camellia.c cmll_misc.c cmll_cbc.c'
  212. modes_asm_src => Assembler implementation of cipher modes,
  213. currently the functions gcm_gmult_4bit and
  214. gcm_ghash_4bit.
  215. padlock_asm_src => Assembler implementation of core parts of
  216. the padlock engine. This is mandatory on
  217. any platform where the padlock engine might
  218. actually be built.
  219. [1] as part of the target configuration, one can have a key called
  220. 'inherit_from' that indicate what other configurations to inherit
  221. data from. These are resolved recursively.
  222. Inheritance works as a set of default values that can be overridden
  223. by corresponding key values in the inheriting configuration.
  224. Note 1: any configuration table can be used as a template.
  225. Note 2: pure templates have the attribute 'template => 1' and
  226. cannot be used as build targets.
  227. If several configurations are given in the 'inherit_from' array,
  228. the values of same attribute are concatenated with space
  229. separation. With this, it's possible to have several smaller
  230. templates for different configuration aspects that can be combined
  231. into a complete configuration.
  232. instead of a scalar value or an array, a value can be a code block
  233. of the form 'sub { /* your code here */ }'. This code block will
  234. be called with the list of inherited values for that key as
  235. arguments. In fact, the concatenation of strings is really done
  236. by using 'sub { join(" ",@_) }' on the list of inherited values.
  237. An example:
  238. "foo" => {
  239. template => 1,
  240. haha => "ha ha",
  241. hoho => "ho",
  242. ignored => "This should not appear in the end result",
  243. },
  244. "bar" => {
  245. template => 1,
  246. haha => "ah",
  247. hoho => "haho",
  248. hehe => "hehe"
  249. },
  250. "laughter" => {
  251. inherit_from => [ "foo", "bar" ],
  252. hehe => sub { join(" ",(@_,"!!!")) },
  253. ignored => "",
  254. }
  255. The entry for "laughter" will become as follows after processing:
  256. "laughter" => {
  257. haha => "ha ha ah",
  258. hoho => "ho haho",
  259. hehe => "hehe !!!",
  260. ignored => ""
  261. }
  262. [2] OpenSSL is built with threading capabilities unless the user
  263. specifies 'no-threads'. The value of the key 'thread_scheme' may
  264. be "(unknown)", in which case the user MUST give some compilation
  265. flags to Configure.
  266. [3] OpenSSL has three types of things to link from object files or
  267. static libraries:
  268. - shared libraries; that would be libcrypto and libssl.
  269. - shared objects (sometimes called dynamic libraries); that would
  270. be the engines.
  271. - applications; those are apps/openssl and all the test apps.
  272. Very roughly speaking, linking is done like this (words in braces
  273. represent the configuration settings documented at the beginning
  274. of this file):
  275. shared libraries:
  276. {ld} $(CFLAGS) {shared_ldflag} -shared -o libfoo.so \
  277. -Wl,--whole-archive libfoo.a -Wl,--no-whole-archive \
  278. {plib_lflags} -lcrypto {ex_libs}
  279. shared objects:
  280. {ld} $(CFLAGS) {shared_ldflag} -shared -o libeng.so \
  281. blah1.o blah2.o {plib_lflags} -lcrypto {ex_libs}
  282. applications:
  283. {ld} $(CFLAGS) {lflags} -o app \
  284. app1.o utils.o {plib_lflags} -lssl -lcrypto {ex_libs}
  285. Historically, the target configurations came in form of a string with
  286. values separated by colons. This use is deprecated. The string form
  287. looked like this:
  288. "target" => "{cc}:{cflags}:{unistd}:{thread_cflag}:{sys_id}:{lflags}:{bn_ops}:{cpuid_obj}:{bn_obj}:{ec_obj}:{des_obj}:{aes_obj}:{bf_obj}:{md5_obj}:{sha1_obj}:{cast_obj}:{rc4_obj}:{rmd160_obj}:{rc5_obj}:{wp_obj}:{cmll_obj}:{modes_obj}:{padlock_obj}:{perlasm_scheme}:{dso_scheme}:{shared_target}:{shared_cflag}:{shared_ldflag}:{shared_extension}:{ranlib}:{arflags}:{multilib}"
  289. Build info files
  290. ================
  291. The build.info files that are spread over the source tree contain the
  292. minimum information needed to build and distribute OpenSSL. It uses a
  293. simple and yet fairly powerful language to determine what needs to be
  294. built, from what sources, and other relationships between files.
  295. For every build.info file, all file references are relative to the
  296. directory of the build.info file for source files, and the
  297. corresponding build directory for built files if the build tree
  298. differs from the source tree.
  299. When processed, every line is processed with the perl module
  300. Text::Template, using the delimiters "{-" and "-}". The hashes
  301. %config and %target are passed to the perl fragments, along with
  302. $sourcedir and $builddir, which are the locations of the source
  303. directory for the current build.info file and the corresponding build
  304. directory, all relative to the top of the build tree.
  305. To begin with, things to be built are declared by setting specific
  306. variables:
  307. PROGRAMS=foo bar
  308. LIBS=libsomething
  309. ENGINES=libeng
  310. SCRIPTS=myhack
  311. EXTRA=file1 file2
  312. Note that the files mentioned for PROGRAMS, LIBS and ENGINES *must* be
  313. without extensions. The build file templates will figure them out.
  314. For each thing to be built, it is then possible to say what sources
  315. they are built from:
  316. PROGRAMS=foo bar
  317. SOURCE[foo]=foo.c common.c
  318. SOURCE[bar]=bar.c extra.c common.c
  319. It's also possible to tell some other dependencies:
  320. DEPEND[foo]=libsomething
  321. DEPEND[libbar]=libsomethingelse
  322. (it could be argued that 'libsomething' and 'libsomethingelse' are
  323. source as well. However, the files given through SOURCE are expected
  324. to be located in the source tree while files given through DEPEND are
  325. expected to be located in the build tree)
  326. For some libraries, we maintain files with public symbols and their
  327. slot in a transfer vector (important on some platforms). It can be
  328. declared like this:
  329. ORDINALS[libcrypto]=crypto
  330. The value is not the name of the file in question, but rather the
  331. argument to util/mkdef.pl that indicates which file to use.
  332. One some platforms, shared libraries come with a name that's different
  333. from their static counterpart. That's declared as follows:
  334. SHARED_NAME[libfoo]=cygfoo-{- $config{shlibver} -}
  335. The example is from Cygwin, which has a required naming convention.
  336. Sometimes, it makes sense to rename an output file, for example a
  337. library:
  338. RENAME[libfoo]=libbar
  339. That lines has "libfoo" get renamed to "libbar". While it makes no
  340. sense at all to just have a rename like that (why not just use
  341. "libbar" everywhere?), it does make sense when it can be used
  342. conditionally. See a little further below for an example.
  343. In some cases, it's desirable to include some source files in the
  344. shared form of a library only:
  345. SHARED_SOURCE[libfoo]=dllmain.c
  346. For any file to be built, it's also possible to tell what extra
  347. include paths the build of their source files should use:
  348. INCLUDE[foo]=include
  349. In some cases, one might want to generate some source files from
  350. others, that's done as follows:
  351. GENERATE[foo.s]=asm/something.pl $(CFLAGS)
  352. GENERATE[bar.s]=asm/bar.S
  353. The value of each GENERATE line is a command line or part of it.
  354. Configure places no rules on the command line, except the the first
  355. item muct be the generator file. It is, however, entirely up to the
  356. build file template to define exactly how those command lines should
  357. be handled, how the output is captured and so on.
  358. Sometimes, the generator file itself depends on other files, for
  359. example if it is a perl script that depends on other perl modules.
  360. This can be expressed using DEPEND like this:
  361. DEPEND[asm/something.pl]=../perlasm/Foo.pm
  362. There may also be cases where the exact file isn't easily specified,
  363. but an inclusion directory still needs to be specified. INCLUDE can
  364. be used in that case:
  365. INCLUDE[asm/something.pl]=../perlasm
  366. NOTE: GENERATE lines are limited to one command only per GENERATE.
  367. As a last resort, it's possible to have raw build file lines, between
  368. BEGINRAW and ENDRAW lines as follows:
  369. BEGINRAW[Makefile(unix)]
  370. haha.h: {- $builddir -}/Makefile
  371. echo "/* haha */" > haha.h
  372. ENDRAW[Makefile(unix)]
  373. The word within square brackets is the build_file configuration item
  374. or the build_file configuration item followed by the second word in the
  375. build_scheme configuration item for the configured target within
  376. parenthesis as shown above. For example, with the following relevant
  377. configuration items:
  378. build_file => "build.ninja"
  379. build_scheme => [ "unified", "unix" ]
  380. ... these lines will be considered:
  381. BEGINRAW[build.ninja]
  382. build haha.h: echo "/* haha */" > haha.h
  383. ENDRAW[build.ninja]
  384. BEGINRAW[build.ninja(unix)]
  385. build hoho.h: echo "/* hoho */" > hoho.h
  386. ENDRAW[build.ninja(unix)]
  387. Should it be needed because the recipes within a RAW section might
  388. clash with those generated by Configure, it's possible to tell it
  389. not to generate them with the use of OVERRIDES, for example:
  390. SOURCE[libfoo]=foo.c bar.c
  391. OVERRIDES=bar.o
  392. BEGINRAW[Makefile(unix)]
  393. bar.o: bar.c
  394. $(CC) $(CFLAGS) -DSPECIAL -c -o $@ $<
  395. ENDRAW[Makefile(unix)]
  396. See the documentation further up for more information on configuration
  397. items.
  398. Finally, you can have some simple conditional use of the build.info
  399. information, looking like this:
  400. IF[1]
  401. something
  402. ELSIF[2]
  403. something other
  404. ELSE
  405. something else
  406. ENDIF
  407. The expression in square brackets is interpreted as a string in perl,
  408. and will be seen as true if perl thinks it is, otherwise false. For
  409. example, the above would have "something" used, since 1 is true.
  410. Together with the use of Text::Template, this can be used as
  411. conditions based on something in the passed variables, for example:
  412. IF[{- $disabled{shared} -}]
  413. LIBS=libcrypto
  414. SOURCE[libcrypto]=...
  415. ELSE
  416. LIBS=libfoo
  417. SOURCE[libfoo]=...
  418. ENDIF
  419. or:
  420. # VMS has a cultural standard where all libraries are prefixed.
  421. # For OpenSSL, the choice is 'ossl_'
  422. IF[{- $config{target} =~ /^vms/ -}]
  423. RENAME[libcrypto]=ossl_libcrypto
  424. RENAME[libssl]=ossl_libssl
  425. ENDIF
  426. Build-file programming with the "unified" build system
  427. ======================================================
  428. "Build files" are called "Makefile" on Unix-like operating systems,
  429. "descrip.mms" for MMS on VMS, "makefile" for nmake on Windows, etc.
  430. To use the "unified" build system, the target configuration needs to
  431. set the three items 'build_scheme', 'build_file' and 'build_command'.
  432. In the rest of this section, we will assume that 'build_scheme' is set
  433. to "unified" (see the configurations documentation above for the
  434. details).
  435. For any name given by 'build_file', the "unified" system expects a
  436. template file in Configurations/ named like the build file, with
  437. ".tmpl" appended, or in case of possible ambiguity, a combination of
  438. the second 'build_scheme' list item and the 'build_file' name. For
  439. example, if 'build_file' is set to "Makefile", the template could be
  440. Configurations/Makefile.tmpl or Configurations/unix-Makefile.tmpl.
  441. In case both Configurations/unix-Makefile.tmpl and
  442. Configurations/Makefile.tmpl are present, the former takes
  443. precedence.
  444. The build-file template is processed with the perl module
  445. Text::Template, using "{-" and "-}" as delimiters that enclose the
  446. perl code fragments that generate configuration-dependent content.
  447. Those perl fragments have access to all the hash variables from
  448. configdata.pem.
  449. The build-file template is expected to define at least the following
  450. perl functions in a perl code fragment enclosed with "{-" and "-}".
  451. They are all expected to return a string with the lines they produce.
  452. generatesrc - function that produces build file lines to generate
  453. a source file from some input.
  454. It's called like this:
  455. generatesrc(src => "PATH/TO/tobegenerated",
  456. generator => [ "generatingfile", ... ]
  457. generator_incs => [ "INCL/PATH", ... ]
  458. generator_deps => [ "dep1", ... ]
  459. generator => [ "generatingfile", ... ]
  460. incs => [ "INCL/PATH", ... ],
  461. deps => [ "dep1", ... ],
  462. intent => one of "libs", "dso", "bin" );
  463. 'src' has the name of the file to be generated.
  464. 'generator' is the command or part of command to
  465. generate the file, of which the first item is
  466. expected to be the file to generate from.
  467. generatesrc() is expected to analyse and figure out
  468. exactly how to apply that file and how to capture
  469. the result. 'generator_incs' and 'generator_deps'
  470. are include directories and files that the generator
  471. file itself depends on. 'incs' and 'deps' are
  472. include directories and files that are used if $(CC)
  473. is used as an intermediary step when generating the
  474. end product (the file indicated by 'src'). 'intent'
  475. indicates what the generated file is going to be
  476. used for.
  477. src2obj - function that produces build file lines to build an
  478. object file from source files and associated data.
  479. It's called like this:
  480. src2obj(obj => "PATH/TO/objectfile",
  481. srcs => [ "PATH/TO/sourcefile", ... ],
  482. deps => [ "dep1", ... ],
  483. incs => [ "INCL/PATH", ... ]
  484. intent => one of "lib", "dso", "bin" );
  485. 'obj' has the intended object file *without*
  486. extension, src2obj() is expected to add that.
  487. 'srcs' has the list of source files to build the
  488. object file, with the first item being the source
  489. file that directly corresponds to the object file.
  490. 'deps' is a list of explicit dependencies. 'incs'
  491. is a list of include file directories. Finally,
  492. 'intent' indicates what this object file is going
  493. to be used for.
  494. obj2lib - function that produces build file lines to build a
  495. static library file ("libfoo.a" in Unix terms) from
  496. object files.
  497. called like this:
  498. obj2lib(lib => "PATH/TO/libfile",
  499. objs => [ "PATH/TO/objectfile", ... ]);
  500. 'lib' has the intended library file name *without*
  501. extension, obj2lib is expected to add that. 'objs'
  502. has the list of object files (also *without*
  503. extension) to build this library.
  504. libobj2shlib - function that produces build file lines to build a
  505. shareable object library file ("libfoo.so" in Unix
  506. terms) from the corresponding static library file
  507. or object files.
  508. called like this:
  509. libobj2shlib(shlib => "PATH/TO/shlibfile",
  510. lib => "PATH/TO/libfile",
  511. objs => [ "PATH/TO/objectfile", ... ],
  512. deps => [ "PATH/TO/otherlibfile", ... ],
  513. ordinals => [ "word", "/PATH/TO/ordfile" ]);
  514. 'lib' has the intended library file name *without*
  515. extension, libobj2shlib is expected to add that.
  516. 'shlib' has the corresponding shared library name
  517. *without* extension. 'deps' has the list of other
  518. libraries (also *without* extension) this library
  519. needs to be linked with. 'objs' has the list of
  520. object files (also *without* extension) to build
  521. this library. 'ordinals' MAY be present, and when
  522. it is, its value is an array where the word is
  523. "crypto" or "ssl" and the file is one of the ordinal
  524. files util/libeay.num or util/ssleay.num in the
  525. source directory.
  526. This function has a choice; it can use the
  527. corresponding static library as input to make the
  528. shared library, or the list of object files.
  529. obj2dso - function that produces build file lines to build a
  530. dynamic shared object file from object files.
  531. called like this:
  532. obj2dso(lib => "PATH/TO/libfile",
  533. objs => [ "PATH/TO/objectfile", ... ],
  534. deps => [ "PATH/TO/otherlibfile",
  535. ... ]);
  536. This is almost the same as libobj2shlib, but the
  537. intent is to build a shareable library that can be
  538. loaded in runtime (a "plugin"...). The differences
  539. are subtle, one of the most visible ones is that the
  540. resulting shareable library is produced from object
  541. files only.
  542. obj2bin - function that produces build file lines to build an
  543. executable file from object files.
  544. called like this:
  545. obj2bin(bin => "PATH/TO/binfile",
  546. objs => [ "PATH/TO/objectfile", ... ],
  547. deps => [ "PATH/TO/libfile", ... ]);
  548. 'bin' has the intended executable file name
  549. *without* extension, obj2bin is expected to add
  550. that. 'objs' has the list of object files (also
  551. *without* extension) to build this library. 'deps'
  552. has the list of library files (also *without*
  553. extension) that the programs needs to be linked
  554. with.
  555. in2script - function that produces build file lines to build a
  556. script file from some input.
  557. called like this:
  558. in2script(script => "PATH/TO/scriptfile",
  559. sources => [ "PATH/TO/infile", ... ]);
  560. 'script' has the intended script file name.
  561. 'sources' has the list of source files to build the
  562. resulting script from.
  563. In all cases, file file paths are relative to the build tree top, and
  564. the build file actions run with the build tree top as current working
  565. directory.
  566. Make sure to end the section with these functions with a string that
  567. you thing is appropriate for the resulting build file. If nothing
  568. else, end it like this:
  569. ""; # Make sure no lingering values end up in the Makefile
  570. -}
  571. Configure helper scripts
  572. ========================
  573. Configure uses helper scripts in this directory:
  574. Checker scripts
  575. ---------------
  576. These scripts are per platform family, to check the integrity of the
  577. tools used for configuration and building. The checker script used is
  578. either {build_platform}-{build_file}-checker.pm or
  579. {build_platform}-checker.pm, where {build_platform} is the second
  580. 'build_scheme' list element from the configuration target data, and
  581. {build_file} is 'build_file' from the same target data.
  582. If the check succeeds, the script is expected to end with a non-zero
  583. expression. If the check fails, the script can end with a zero, or
  584. with a `die`.