blob: 89fc65ca21da9dc949e6baf9de4d61ba45d0b137 [file] [log] [blame]
Richard Levitte9e0724a2015-05-18 02:54:28 +02001Configurations of OpenSSL target platforms
Richard Levitteddf18472016-01-30 00:57:33 +01002==========================================
Richard Levitte9e0724a2015-05-18 02:54:28 +02003
4Target configurations are a collection of facts that we know about
5different platforms and their capabilities. We organise them in a
6hash table, where each entry represent a specific target.
7
8In each table entry, the following keys are significant:
9
10 inherit_from => Other targets to inherit values from.
11 Explained further below. [1]
12 template => Set to 1 if this isn't really a platform
13 target. Instead, this target is a template
14 upon which other targets can be built.
15 Explained further below. [1]
16
17 sys_id => System identity for systems where that
18 is difficult to determine automatically.
19
20 cc => The compiler command, usually one of "cc",
21 "gcc" or "clang". This command is normally
22 also used to link object files and
23 libraries into the final program.
24 cflags => Flags that are used at all times when
25 compiling.
Richard Levittebcb19772016-01-30 02:17:05 +010026 defines => As an alternative, macro definitions may be
27 present here instead of in `cflags'. If
28 given here, they MUST be as an array of the
29 string such as "MACRO=value", or just
30 "MACRO" for definitions without value.
Richard Levitte9e0724a2015-05-18 02:54:28 +020031 debug_cflags => Extra compilation flags used when making a
32 debug build (when Configure receives the
33 --debug option). Typically something like
34 "-g -O0".
Richard Levittebcb19772016-01-30 02:17:05 +010035 debug_defines => Similarly to `debug_cflags', this gets
36 combined with `defines' during a debug
37 build. The value here MUST also be an
38 array of the same form as for `defines'.
Richard Levitte9e0724a2015-05-18 02:54:28 +020039 release_cflags => Extra compilation flags used when making a
40 release build (when Configure receives the
41 --release option, or doesn't receive the
42 --debug option). Typically something like
43 "-O" or "-O3".
Richard Levittebcb19772016-01-30 02:17:05 +010044 release_defines => Similarly to `release_cflags', this gets
45 combined with `defines' during a release
46 build. The value here MUST also be an
47 array of the same form as for `defines'.
Richard Levitte9e0724a2015-05-18 02:54:28 +020048 thread_cflags => Extra compilation flags used when
49 compiling with threading enabled.
50 Explained further below. [2]
Richard Levittebcb19772016-01-30 02:17:05 +010051 thread_defines => Similarly to `thread_cflags', this gets
52 combined with `defines' when threading is
53 enabled. The value here MUST also be an
54 array of the same form as for `defines'.
Richard Levitte9e0724a2015-05-18 02:54:28 +020055 shared_cflag => Extra compilation flags used when
56 compiling for shared libraries, typically
57 something like "-fPIC".
58
Richard Levittec86ddbe2016-02-05 11:47:14 +010059 (linking is a complex thing, see [3] below)
60 ld => Linker command, usually not defined
Richard Levitte9e0724a2015-05-18 02:54:28 +020061 (meaning the compiler command is used
62 instead).
63 (NOTE: this is here for future use, it's
64 not implemented yet)
Richard Levittec86ddbe2016-02-05 11:47:14 +010065 lflags => Flags that are used when linking apps.
66 shared_ldflag => Flags that are used when linking shared
67 or dynamic libraries.
68 plib_lflags => Extra linking flags to appear just before
69 the libraries on the command line.
70 ex_libs => Extra libraries that are needed when
71 linking.
Richard Levitte9e0724a2015-05-18 02:54:28 +020072
73 debug_lflags => Like debug_cflags, but used when linking.
74 release_lflags => Like release_cflags, but used when linking.
Richard Levitte9e0724a2015-05-18 02:54:28 +020075
76 ar => The library archive command, the default is
77 "ar".
78 (NOTE: this is here for future use, it's
79 not implemented yet)
80 arflags => Flags to be used with the library archive
81 command.
82
83 ranlib => The library archive indexing command, the
84 default is 'ranlib' it it exists.
85
86 unistd => An alternative header to the typical
87 '<unistd.h>'. This is very rarely needed.
88
89 shared_extension => File name extension used for shared
90 libraries.
91 obj_extension => File name extension used for object files.
92 On unix, this defaults to ".o" (NOTE: this
93 is here for future use, it's not
94 implemented yet)
95 exe_extension => File name extension used for executable
96 files. On unix, this defaults to "" (NOTE:
97 this is here for future use, it's not
98 implemented yet)
99
100 dso_scheme => The type of dynamic shared objects to build
101 for. This mostly comes into play with
102 engines, but can be used for other purposes
103 as well. Valid values are "DLFCN"
104 (dlopen() et al), "DLFCN_NO_H" (for systems
105 that use dlopen() et al but do not have
106 fcntl.h), "DL" (shl_load() et al), "WIN32"
107 and "VMS".
108 perlasm_scheme => The perlasm method used to created the
109 assembler files used when compiling with
110 assembler implementations.
111 shared_target => The shared library building method used.
112 This is a target found in Makefile.shared.
113 build_scheme => The scheme used to build up a Makefile.
Richard Levitte88087412015-05-18 14:31:49 +0200114 In its simplest form, the value is a string
115 with the name of the build scheme.
116 The value may also take the form of a list
117 of strings, if the build_scheme is to have
118 some options. In this case, the first
119 string in the list is the name of the build
120 scheme.
121 Currently recognised build schemes are
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100122 "mk1mf" and "unixmake" and "unified".
123 For the "unified" build scheme, this item
124 *must* be an array with the first being the
125 word "unified" and the second being a word
126 to identify the platform family.
Richard Levitte9e0724a2015-05-18 02:54:28 +0200127
128 multilib => On systems that support having multiple
129 implementations of a library (typically a
130 32-bit and a 64-bit variant), this is used
131 to have the different variants in different
132 directories.
133
134 bn_ops => Building options (was just bignum options
135 in the earlier history of this option,
136 hence the name). This a string of words
137 that describe properties on the designated
138 target platform, such as the type of
139 integers used to build up the bitnum,
140 different ways to implement certain ciphers
141 and so on. To fully comprehend the
142 meaning, the best is to read the affected
143 source.
144 The valid words are:
145
Richard Levitte9e0724a2015-05-18 02:54:28 +0200146 BN_LLONG use 'unsigned long long' in
147 some bignum calculations.
148 This has no value when
149 SIXTY_FOUR_BIT or
150 SIXTY_FOUR_BIT_LONG is given.
Rich Salz3e9e8102016-01-27 18:43:25 -0500151 RC4_CHAR makes the basic RC4 unit of
Richard Levitte9e0724a2015-05-18 02:54:28 +0200152 calculation an unsigned char.
Richard Levitte9e0724a2015-05-18 02:54:28 +0200153 SIXTY_FOUR_BIT processor registers
154 are 64 bits, long is
155 32 bits, long long is
156 64 bits.
157 SIXTY_FOUR_BIT_LONG processor registers
158 are 64 bits, long is
159 64 bits.
160 THIRTY_TWO_BIT processor registers
161 are 32 bits.
162 EXPORT_VAR_AS_FN for shared libraries,
163 export vars as
164 accessor functions.
165
Richard Levittee84193e2016-01-30 07:14:58 +0100166 apps_extra_src => Extra source to build apps/openssl, as
167 needed by the target.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100168 cpuid_asm_src => assembler implementation of cpuid code as
Richard Levitte9e0724a2015-05-18 02:54:28 +0200169 well as OPENSSL_cleanse().
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100170 Default to mem_clr.c
171 bn_asm_src => Assembler implementation of core bignum
Richard Levitte9e0724a2015-05-18 02:54:28 +0200172 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100173 Defaults to bn_asm.c
174 ec_asm_src => Assembler implementation of core EC
Richard Levitte9e0724a2015-05-18 02:54:28 +0200175 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100176 des_asm_src => Assembler implementation of core DES
Richard Levitte9e0724a2015-05-18 02:54:28 +0200177 encryption functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100178 Defaults to 'des_enc.c fcrypt_b.c'
179 aes_asm_src => Assembler implementation of core AES
Richard Levitte9e0724a2015-05-18 02:54:28 +0200180 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100181 Defaults to 'aes_core.c aes_cbc.c'
182 bf_asm_src => Assembler implementation of core BlowFish
Richard Levitte9e0724a2015-05-18 02:54:28 +0200183 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100184 Defaults to 'bf_enc.c'
185 md5_asm_src => Assembler implementation of core MD5
Richard Levitte9e0724a2015-05-18 02:54:28 +0200186 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100187 sha1_asm_src => Assembler implementation of core SHA1,
Richard Levitte9e0724a2015-05-18 02:54:28 +0200188 functions, and also possibly SHA256 and
189 SHA512 ones.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100190 cast_asm_src => Assembler implementation of core CAST
Richard Levitte9e0724a2015-05-18 02:54:28 +0200191 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100192 Defaults to 'c_enc.c'
193 rc4_asm_src => Assembler implementation of core RC4
Richard Levitte9e0724a2015-05-18 02:54:28 +0200194 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100195 Defaults to 'rc4_enc.c rc4_skey.c'
196 rmd160_asm_src => Assembler implementation of core RMD160
Richard Levitte9e0724a2015-05-18 02:54:28 +0200197 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100198 rc5_asm_src => Assembler implementation of core RC5
Richard Levitte9e0724a2015-05-18 02:54:28 +0200199 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100200 Defaults to 'rc5_enc.c'
201 wp_asm_src => Assembler implementation of core WHIRLPOOL
Richard Levitte9e0724a2015-05-18 02:54:28 +0200202 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100203 cmll_asm_src => Assembler implementation of core CAMELLIA
Richard Levitte9e0724a2015-05-18 02:54:28 +0200204 functions.
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100205 Defaults to 'camellia.c cmll_misc.c cmll_cbc.c'
206 modes_asm_src => Assembler implementation of cipher modes,
207 currently the functions gcm_gmult_4bit and
208 gcm_ghash_4bit.
209 padlock_asm_src => Assembler implementation of core parts of
Richard Levitte9e0724a2015-05-18 02:54:28 +0200210 the padlock engine. This is mandatory on
211 any platform where the padlock engine might
212 actually be built.
213
214
215[1] as part of the target configuration, one can have a key called
216 'inherit_from' that indicate what other configurations to inherit
217 data from. These are resolved recursively.
218
219 Inheritance works as a set of default values that can be overriden
220 by corresponding key values in the inheriting configuration.
221
222 Note 1: any configuration table can be used as a template.
223 Note 2: pure templates have the attribute 'template => 1' and
224 cannot be used as build targets.
225
226 If several configurations are given in the 'inherit_from' array,
227 the values of same attribute are concatenated with space
228 separation. With this, it's possible to have several smaller
229 templates for different configuration aspects that can be combined
230 into a complete configuration.
231
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
238 An example:
239
240 "foo" => {
241 template => 1,
242 haha => "ha ha",
243 hoho => "ho",
244 ignored => "This should not appear in the end result",
245 },
246 "bar" => {
247 template => 1,
248 haha => "ah",
249 hoho => "haho",
250 hehe => "hehe"
251 },
252 "laughter" => {
253 inherit_from => [ "foo", "bar" ],
254 hehe => sub { join(" ",(@_,"!!!")) },
255 ignored => "",
256 }
257
258 The entry for "laughter" will become as follows after processing:
259
260 "laughter" => {
261 haha => "ha ha ah",
262 hoho => "ho haho",
263 hehe => "hehe !!!",
264 ignored => ""
265 }
266
267[2] OpenSSL is built with threading capabilities unless the user
268 specifies 'no-threads'. The value of the key 'thread_cflags' may
269 be "(unknown)", in which case the user MUST give some compilation
270 flags to Configure.
271
Richard Levittec86ddbe2016-02-05 11:47:14 +0100272[3] OpenSSL has three types of things to link from object files or
273 static libraries:
274
275 - shared libraries; that would be libcrypto and libssl.
276 - shared objects (sometimes called dynamic libraries); that would
277 be the engines.
278 - applications; those are apps/openssl and all the test apps.
279
280 Very roughly speaking, linking is done like this (words in braces
281 represent the configuration settings documented at the beginning
282 of this file):
283
284 shared libraries:
285 {ld} $(CFLAGS) {shared_ldflag} -shared -o libfoo.so \
286 -Wl,--whole-archive libfoo.a -Wl,--no-whole-archive \
287 {plib_lflags} -lcrypto {ex_libs}
288
289 shared objects:
290 {ld} $(CFLAGS) {shared_ldflag} -shared -o libeng.so \
291 blah1.o blah2.o {plib_lflags} -lcrypto {ex_libs}
292
293 applications:
294 {ld} $(CFLAGS) {lflags} -o app \
295 app1.o utils.o {plib_lflags} -lssl -lcrypto {ex_libs}
296
Richard Levitte9e0724a2015-05-18 02:54:28 +0200297
298Historically, the target configurations came in form of a string with
Richard Levittedf71f0b2016-01-23 11:43:35 +0100299values separated by colons. This use is deprecated. The string form
300looked like this:
Richard Levitte9e0724a2015-05-18 02:54:28 +0200301
Richard Levittef0bd4682016-01-25 21:51:22 +0100302 "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}"
Richard Levitte9fe2bb72016-01-29 19:45:51 +0100303
304
305Build info files
306================
307
308The build.info files that are spread over the source tree contain the
309minimum information needed to build and distribute OpenSSL. It uses a
310simple and yet fairly powerful language to determine what needs to be
311built, from what sources, and other relationships between files.
312
313For every build.info file, all file references are relative to the
314directory of the build.info file for source files, and the
315corresponding build directory for built files if the build tree
316differs from the source tree.
317
318When processed, every line is processed with the perl module
319Text::Template, using the delimiters "{-" and "-}". The hashes
320%config and %target are passed to the perl fragments, along with
321$sourcedir and $builddir, which are the locations of the source
322directory for the current build.info file and the corresponding build
323directory, all relative to the top of the build tree.
324
325To begin with, things to be built are declared by setting specific
326variables:
327
328 PROGRAMS=foo bar
329 LIBS=libsomething
330 ENGINES=libeng
331 SCRIPTS=myhack
332 EXTRA=file1 file2
333
334Note that the files mentioned for PROGRAMS, LIBS and ENGINES *must* be
335without extensions. The build file templates will figure them out.
336
337For each thing to be built, it is then possible to say what sources
338they are built from:
339
340 PROGRAMS=foo bar
341 SOURCE[foo]=foo.c common.c
342 SOURCE[bar]=bar.c extra.c common.c
343
344It's also possible to tell some other dependencies:
345
346 DEPEND[foo]=libsomething
347 DEPEND[libbar]=libsomethingelse
348
349(it could be argued that 'libsomething' and 'libsomethingelse' are
350source as well. However, the files given through SOURCE are expected
351to be located in the source tree while files given through DEPEND are
352expected to be located in the build tree)
353
354For some libraries, we maintain files with public symbols and their
355slot in a transfer vector (important on some platforms). It can be
356declared like this:
357
358 ORDINALS[libcrypto]=crypto
359
360The value is not the name of the file in question, but rather the
361argument to util/mkdef.pl that indicates which file to use.
362
363One some platforms, shared libraries come with a name that's different
364from their static counterpart. That's declared as follows:
365
366 SHARED_NAME[libfoo]=cygfoo-{- $config{shlibver} -}
367
368The example is from Cygwin, which has a required naming convention.
369
370Sometimes, it makes sense to rename an output file, for example a
371library:
372
373 RENAME[libfoo]=libbar
374
375That lines has "libfoo" get renamed to "libbar". While it makes no
376sense at all to just have a rename like that (why not just use
377"libbar" everywhere?), it does make sense when it can be used
378conditionally. See a little further below for an example.
379
380For any file to be built, it's also possible to tell what extra
381include paths the build of their source files should use:
382
383 INCLUDE[foo]=include
384
385It's possible to have raw build file lines, between BEGINRAW and
386ENDRAW lines as follows:
387
388 BEGINRAW[Makefile(unix)]
389 haha.h: {- $builddir -}/Makefile
390 echo "/* haha */" > haha.h
391 ENDRAW[Makefile(unix)]
392
393The word withing square brackets is the build_file configuration item
394or the build_file configuration item followed by the second word in the
395build_scheme configuration item for the configured target within
396parenthesis as shown above. For example, with the following relevant
397configuration items:
398
399 build_file => "build.ninja"
400 build_scheme => [ "unified", "unix" ]
401
402... these lines will be considered:
403
404 BEGINRAW[build.ninja]
405 build haha.h: echo "/* haha */" > haha.h
406 ENDRAW[build.ninja]
407
408 BEGINRAW[build.ninja(unix)]
409 build hoho.h: echo "/* hoho */" > hoho.h
410 ENDRAW[build.ninja(unix)]
411
412See the documentation further up for more information on configuration
413items.
414
415Finally, you can have some simple conditional use of the build.info
416information, looking like this:
417
418 IF[1]
419 something
420 ELSIF[2]
421 something other
422 ELSE
423 something else
424 ENDIF
425
426The expression in square brackets is interpreted as a string in perl,
427and will be seen as true if perl thinks it is, otherwise false. For
428example, the above would have "something" used, since 1 is true.
429
430Together with the use of Text::Template, this can be used as
431conditions based on something in the passed variables, for example:
432
433 IF[{- $config{no_shared} -}]
434 LIBS=libcrypto
435 SOURCE[libcrypto]=...
436 ELSE
437 LIBS=libfoo
438 SOURCE[libfoo]=...
439 ENDIF
440
441or:
442
443 # VMS has a cultural standard where all libraries are prefixed.
444 # For OpenSSL, the choice is 'ossl_'
445 IF[{- $config{target} =~ /^vms/ -}]
446 RENAME[libcrypto]=ossl_libcrypto
447 RENAME[libssl]=ossl_libssl
448 ENDIF
Richard Levitteddf18472016-01-30 00:57:33 +0100449
450
451Build-file programming with the "unified" build system
452======================================================
453
454"Build files" are called "Makefile" on Unix-like operating systems,
455"descrip.mms" for MMS on VMS, "makefile" for nmake on Windows, etc.
456
457To use the "unified" build system, the target configuration needs to
458set the three items 'build_scheme', 'build_file' and 'build_command'.
459In the rest of this section, we will assume that 'build_scheme' is set
460to "unified" (see the configurations documentation above for the
461details).
462
463For any name given by 'build_file', the "unified" system expects a
464template file in Configurations/ named like the build file, with
465".tmpl" appended, or in case of possible ambiguity, a combination of
466the second 'build_scheme' list item and the 'build_file' name. For
467example, if 'build_file' is set to "Makefile", the template could be
468Configurations/Makefile.tmpl or Configurations/unix-Makefile.tmpl.
469In case both Configurations/unix-Makefile.tmpl and
470Configurations/Makefile.tmpl are present, the former takes
471precedence.
472
473The build-file template is processed with the perl module
474Text::Template, using "{-" and "-}" as delimiters that enclose the
475perl code fragments that generate configuration-dependent content.
476Those perl fragments have access to all the hash variables from
477configdata.pem.
478
479The build-file template is expected to define at least the following
480perl functions in a perl code fragment enclosed with "{-" and "-}".
481They are all expected to return a string with the lines they produce.
482
483 src2dep - function that produces build file lines to get the
484 dependencies for an object file into a dependency
485 file.
486
487 It's called like this:
488
489 src2dep(obj => "PATH/TO/objectfile",
490 srcs => [ "PATH/TO/sourcefile", ... ],
Richard Levitte50e83cd2016-02-12 14:05:06 +0100491 deps => [ "dep1", ... ],
Richard Levitteddf18472016-01-30 00:57:33 +0100492 incs => [ "INCL/PATH", ... ]);
493
494 'obj' has the dependent object file as well as
495 object file the dependencies are for; it's *without*
496 extension, src2dep() is expected to add that.
497 'srcs' has the list of source files to build the
498 object file, with the first item being the source
499 file that directly corresponds to the object file.
Richard Levitte50e83cd2016-02-12 14:05:06 +0100500 'deps' is a list of explicit dependencies. 'incs'
501 is a list of include file directories.
Richard Levitteddf18472016-01-30 00:57:33 +0100502
503 src2obj - function that produces build file lines to build an
504 object file from source files and associated data.
505
506 It's called like this:
507
508 src2obj(obj => "PATH/TO/objectfile",
509 srcs => [ "PATH/TO/sourcefile", ... ],
510 deps => [ "dep1", ... ],
511 incs => [ "INCL/PATH", ... ]);
512
513 'obj' has the intended object file *without*
514 extension, src2obj() is expected to add that.
515 'srcs' has the list of source files to build the
516 object file, with the first item being the source
517 file that directly corresponds to the object file.
Richard Levitte50e83cd2016-02-12 14:05:06 +0100518 'deps' is a list of explicit dependencies. 'incs'
519 is a list of include file directories.
Richard Levitteddf18472016-01-30 00:57:33 +0100520
521 obj2lib - function that produces build file lines to build a
522 static library file ("libfoo.a" in Unix terms) from
523 object files.
524
525 called like this:
526
527 obj2lib(lib => "PATH/TO/libfile",
528 objs => [ "PATH/TO/objectfile", ... ]);
529
530 'lib' has the intended library file name *without*
531 extension, obj2lib is expected to add that. 'objs'
532 has the list of object files (also *without*
533 extension) to build this library.
534
535 libobj2shlib - function that produces build file lines to build a
536 shareable object library file ("libfoo.so" in Unix
537 terms) from the corresponding static library file
538 or object files.
539
540 called like this:
541
542 libobj2shlib(shlib => "PATH/TO/shlibfile",
543 lib => "PATH/TO/libfile",
544 objs => [ "PATH/TO/objectfile", ... ],
545 deps => [ "PATH/TO/otherlibfile", ... ],
546 ordinals => [ "word", "/PATH/TO/ordfile" ]);
547
548 'lib' has the intended library file name *without*
549 extension, libobj2shlib is expected to add that.
550 'shlib' has the correcponding shared library name
551 *without* extension. 'deps' has the list of other
552 libraries (also *without* extension) this library
553 needs to be linked with. 'objs' has the list of
554 object files (also *without* extension) to build
555 this library. 'ordinals' MAY be present, and when
556 it is, its value is an array where the word is
557 "crypto" or "ssl" and the file is one of the ordinal
558 files util/libeay.num or util/ssleay.num in the
559 source directory.
560
561 This function has a choice; it can use the
562 corresponding static library as input to make the
563 shared library, or the list of object files.
564
565 obj2dynlib - function that produces build file lines to build a
566 dynamically loadable library file ("libfoo.so" on
567 Unix) from object files.
568
569 called like this:
570
571 obj2dynlib(lib => "PATH/TO/libfile",
572 objs => [ "PATH/TO/objectfile", ... ],
573 deps => [ "PATH/TO/otherlibfile",
574 ... ]);
575
576 This is almost the same as libobj2shlib, but the
577 intent is to build a shareable library that can be
578 loaded in runtime (a "plugin"...). The differences
579 are subtle, one of the most visible ones is that the
580 resulting shareable library is produced from object
581 files only.
582
583 obj2bin - function that produces build file lines to build an
584 executable file from object files.
585
586 called like this:
587
588 obj2bin(bin => "PATH/TO/binfile",
589 objs => [ "PATH/TO/objectfile", ... ],
590 deps => [ "PATH/TO/libfile", ... ]);
591
592 'bin' has the intended executable file name
593 *without* extension, obj2bin is expected to add
594 that. 'objs' has the list of object files (also
595 *without* extension) to build this library. 'deps'
596 has the list of library files (also *without*
597 extension) that the programs needs to be linked
598 with.
599
600 in2script - function that produces build file lines to build a
601 script file from some input.
602
603 called like this:
604
605 in2script(script => "PATH/TO/scriptfile",
606 sources => [ "PATH/TO/infile", ... ]);
607
608 'script' has the intended script file name.
609 'sources' has the list of source files to build the
610 resulting script from.
611
612In all cases, file file paths are relative to the build tree top, and
613the build file actions run with the build tree top as current working
614directory.
615
616Make sure to end the section with these functions with a string that
617you thing is apropriate for the resulting build file. If nothing
618else, end it like this:
619
620 ""; # Make sure no lingering values end up in the Makefile
621 -}