README.md: x86-32/64 support
[centaur.git] / docs / building.md
1 Build instructions
2 ==================
3
4 To build the CLI front-end, the static library and the shared library,
5 change to the top-level directory and run
6
7     make
8
9 This will create a build/ directory containing the intermediary and
10 output files.
11
12
13 Dependencies and pkg-config
14 ---------------------------
15
16 There is currently one hard dependency, libelf.
17
18 The Makefile uses pkg-config to try and autodetect the necessary
19 compiler and linker flags. Failing this, it defaults to "-lelf" to
20 link against libelf, and no additional include directories.
21
22 On Ubuntu, development files can be installed using
23
24     apt-get install libelfg0-dev
25
26 for tired's libelf (preferred), or
27
28     apt-get install libelf-dev
29
30 for Red Hat's libelf.
31
32
33 Documentation
34 -------------
35
36 Additional documentation can be generated from the source files using
37 Doxygen. If it is available on your machine, issue
38
39     make docs
40
41 to build it in docs/.
42
43
44 Cleanup
45 -------
46
47 The usual
48
49     make clean
50
51 and
52
53     make distclean
54
55 are supported to clean binary files (clean), or all backup and
56 generated files (distclean).
57
58
59 Installation
60 ------------
61
62 There is currently no automated installation.
63
64 If you need system-wide availability, you can copy
65
66     include/libelfu       --> /usr/local/include/
67     build/elfucli         --> /usr/local/bin/
68     build/libelfu.{a,so*} --> /usr/local/lib/
69
70 or your local variation thereof.