mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-09 16:52:33 +07:00
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5055 7894878c-1315-0410-8ee3-d5d059ff63e0
55 lines
2.1 KiB
Plaintext
55 lines
2.1 KiB
Plaintext
The Makefiles in this package are rather advanced. They are partially based
|
|
on the article "Recursive Make considered Harmful", written by Peter Miller:
|
|
http://miller.emu.id.au/pmiller/books/rmch/
|
|
|
|
There is one big Makefile in the root of this package. It includes many
|
|
other files; one for each directory in which source code is found. These
|
|
included files are called 'Module.mk'.
|
|
|
|
There are several interesting targets defined through this Makefile:
|
|
* all
|
|
Create everything in all directories.
|
|
* install
|
|
Install everything from all directories.
|
|
* uninstall
|
|
Uninstall everything.
|
|
* clean
|
|
Remove anything which can be regenerated from all directories. A call
|
|
of 'make clean' (without any other targets) will ignore any .d files;
|
|
this is useful when they are out of date (and prevent the calling of
|
|
any other target).
|
|
|
|
The best way to understand the Module.mk subfiles is to examine one of them,
|
|
for example lib/Module.mk. They are not too difficult to understand.
|
|
|
|
There are several variables which can be set in the main Makefile. You can
|
|
also specify them on the command-line; this overrules any definitions
|
|
within the Makefile. For example: 'make all WARN=1' will enable all warnings.
|
|
Examine main Makefile to see which ones are available. The most important
|
|
ones for developers:
|
|
* WARN
|
|
Set to 1 to enable many compiler warnings.
|
|
* DEBUG
|
|
Set to 1 to enable any debugging code. Note that debugging code should
|
|
only output more information, and never make the code mis-behave.
|
|
|
|
Several files are generated by Makefiles:
|
|
* .rd
|
|
Dependency files for executables. Automatically generated.
|
|
* .ad
|
|
Dependency files for static libraries. Automatically generated.
|
|
* .ld
|
|
Dependency files for shared libraries. Automatically generated.
|
|
* .ro
|
|
Object files for executables. They will be linked together to create
|
|
the executable.
|
|
* .ao
|
|
Object files for static libraries
|
|
* .lo
|
|
Object files for shared libraries
|
|
The reason for using different extensions is to make the Makefile much
|
|
simpler.
|
|
|
|
There are lots of comments within the main Makefile. Please read them if
|
|
you want to know more.
|