root/lm-sensors/trunk/doc/developers/makefiles

Revision 5055, 2.1 KB (checked in by khali, 5 years ago)

Fix typos, strip trailing space.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1The Makefiles in this package are rather advanced. They are partially based
2on the article "Recursive Make considered Harmful", written by Peter Miller:
3  http://miller.emu.id.au/pmiller/books/rmch/
4
5There is one big Makefile in the root of this package. It includes many
6other files; one for each directory in which source code is found. These
7included files are called 'Module.mk'.
8
9There are several interesting targets defined through this Makefile:
10  * all
11    Create everything in all directories.
12  * install
13    Install everything from all directories.
14  * uninstall
15    Uninstall everything.
16  * clean
17    Remove anything which can be regenerated from all directories. A call
18    of 'make clean' (without any other targets) will ignore any .d files;
19    this is useful when they are out of date (and prevent the calling of
20    any other target).
21
22The best way to understand the Module.mk subfiles is to examine one of them,
23for example lib/Module.mk. They are not too difficult to understand.
24
25There are several variables which can be set in the main Makefile. You can
26also specify them on the command-line; this overrules any definitions
27within the Makefile. For example: 'make all WARN=1' will enable all warnings.
28Examine main Makefile to see which ones are available. The most important
29ones for developers:
30  * WARN
31    Set to 1 to enable many compiler warnings.
32  * DEBUG
33    Set to 1 to enable any debugging code. Note that debugging code should
34    only output more information, and never make the code mis-behave.
35
36Several files are generated by Makefiles:
37  * .rd
38    Dependency files for executables. Automatically generated.
39  * .ad
40    Dependency files for static libraries. Automatically generated.
41  * .ld
42    Dependency files for shared libraries. Automatically generated.
43  * .ro
44    Object files for executables. They will be linked together to create
45    the executable.
46  * .ao
47    Object files for static libraries
48  * .lo
49    Object files for shared libraries
50The reason for using different extensions is to make the Makefile much
51simpler.
52
53There are lots of comments within the main Makefile. Please read them if
54you want to know more.
Note: See TracBrowser for help on using the browser.