2
0

README 33 KB

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