]> mj.ucw.cz Git - libucw.git/blob - ucw/doc/configure.txt
Update the configure documentation
[libucw.git] / ucw / doc / configure.txt
1 How to Configure Sherlock libraries
2 ===================================
3
4 What can be configured
5 ----------------------
6 There are two different levels of configuring/customizing program
7 based on libucw:
8
9   - runtime configuration in configuration files (see <<config>>)
10
11   - compile-time configuration of the libraries: config switches set
12     before compiling, selecting optional features.
13
14 How to configure
15 ----------------
16 To set up compilation for, possibly overriding default compile-time
17 options, just run
18
19         ./configure [<option> | -<option> | <option>=<value> ...]
20
21 The default values of feature options are taken from `default.cfg`.
22 Compiler flags and options dependent on compiler, OS and CPU type
23 are set in `ucw/autoconf.cfg`. Everything can be overriden by options
24 specified on the configure's command line, which have the highest
25 priority.
26
27 If you want to see the resulting set of options, take a look at
28 `obj/config.mk`.
29
30 Options specifying compiler/linker/debugger options can be also overriden
31 during compilation by `make <option>=<value>`. While it's also possible
32 to specify the other options in this way, it probably won't have the desired
33 effect, because configure also generates C include files containing the
34 options.
35
36 Examples
37 --------
38   - `./configure -CONFIG_SHARED` will build the libraries statically.
39   - `./configure -CONFIG_IMAGES` avoids building the image library.
40   - `./configure CONFIG_UCW_ONLY -CONFIG_UCW_UTILS` compiles only the
41     libucw library without its util programs.
42
43 Where to build
44 --------------
45 If you run configure in the source directory, it prepares for compilation inside
46 the source tree. In this case, an `obj` subdirectory is created to hold all generated
47 files (object files, binaries, generated source files etc.) and all final files
48 are linked to the `run` subdirectory. No other parts of the source tree are written into.
49
50 Alternatively, you can compile in a separate object tree (which is useful when you
51 want to build several different configurations from a single source tree). In order
52 to do that, switch to the destination directory and issue `<source-dir>/configure ...`.
53 This way, configure will create the `obj` and `run` directories locally and set up
54 a Makefile which refers to the original source tree.