root/lm-sensors/trunk/doc/makefiles @ 19

Revision 19, 2.5 KB (checked in by frodo, 14 years ago)

Many things, most notable the lm78 module

* Some Makefile changes. doc/makefiles documents most of them.
* The lm78 module now compiles, but it will still crash.
* New module sensors, with general code usable by chip driver modules
* i2c-core: added function i2c_adapter_id(), which returns a (low)

unique i2c-bus ID.

* lm78.h stuff moved into lm78.c or sensors.h

  • 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.
3See doc/useful_addresses.html for a link to this article.
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'. There is a separate set of Makefiles
8in the i2c/ directories; these are Simon Vogl's original Makefiles, and
9not referred by the main package Makefile.
10
11There are several interesting targets defined through this Makefile:
12  * all
13    Create everything in all directories.
14  * all-i2c, all-src, ...
15    Create everything in the designated directory.
16  * install
17    Install everything from all directories.
18  * install-i2c, install-src, ...
19    Install everything in the designated directory.
20  * clean
21    Remove anything which can be regenerated from all directories. A call
22    of 'make clean' (without any other targets) will ignore any .d files;
23    this is useful when they are out of date (and prevent the calling of
24    any other target).
25  * clean-i2c, clean-src, ...
26    Remove anything which can be regenerated from the designated directory.
27  * dep
28    Do nothing, but generate any missing .d files. The command
29    'make clean && make dep' canbe useful in this case ('make clean dep'
30    will not work, due to technical reasons!).
31  * version
32    Regenerate version.h, using the current date for the date-stamp, and
33    a user-supplied version number.
34  * package
35    Create a .tar.gz file containing everything except the CVS directories.
36  * src/lm78.o, i2c/i2c-core.o, ...
37    You can of course also specify one or more targets to make.
38
39The best way to understand the Module.mk subfiles is to examine one of them,
40for example src/Module.mk. They are not too difficult to understand.
41
42There are several variables which can be set in the main Makefile. You can
43also specify them on the command-line; this overrules any definitions
44within the Makefile. For example: 'make all WARN=1' will enable all warnings.
45Examine main Makefile to see which ones are available. The most important
46ones for developers:
47  * WARN
48    Set to 1 to enable many compiler warnings.
49  * DEBUG
50    Set to 1 to enable any debugging code. Note that debugging code should
51    only output more information, and never make the code mis-behave.
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.