Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3c3726f7
Commit
3c3726f7
authored
May 04, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation/kbuild/makefiles.txt polish
Some improvements to the wording by Toshiyasu Morita.
parent
e9df2323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
28 deletions
+25
-28
Documentation/kbuild/makefiles.txt
Documentation/kbuild/makefiles.txt
+25
-28
No files found.
Documentation/kbuild/makefiles.txt
View file @
3c3726f7
...
...
@@ -99,15 +99,15 @@ This document is aimed towards normal developers and arch developers.
=== 3 Makefile language
The kernel Makefiles are designed to run with G
nu
Make. The Makefiles
use only the documented features of G
nu
Make, but they do use many
G
nu
extensions.
The kernel Makefiles are designed to run with G
NU
Make. The Makefiles
use only the documented features of G
NU
Make, but they do use many
G
NU
extensions.
G
nu
Make supports elementary list-processing functions. The kernel
G
NU
Make supports elementary list-processing functions. The kernel
Makefiles use a novel style of list building and manipulation with few
"if" statements.
G
nu
Make has two assignment operators, ":=" and "=". ":=" performs
G
NU
Make has two assignment operators, ":=" and "=". ":=" performs
immediate evaluation of the right-hand side and stores an actual string
into the left-hand side. "=" is like a formula definition; it stores the
right-hand side in an unevaluated form and then evaluates this form each
...
...
@@ -191,7 +191,7 @@ The top Makefile exports the following variables:
$(DRIVERS), and $(LIBS). The arch Makefile defines $(HEAD)
and $(LINKFLAGS), and extends $(CORE_FILES) and $(LIBS).
Note: there are more
nam
es here than necessary. $(NETWORKS),
Note: there are more
variabl
es here than necessary. $(NETWORKS),
$(DRIVERS), and even $(LIBS) could be subsumed into $(CORE_FILES).
CPP, CC, AS, LD, AR, NM, STRIP, OBJCOPY, OBJDUMP
...
...
@@ -289,12 +289,12 @@ The top Makefile exports the following variables:
MAKE, MAKEFILES
Some variables internal to G
nu
Make.
Some variables internal to G
NU
Make.
$(MAKEFILES) in particular is used to force the arch Makefiles
and subdirectory Makefiles to read $(TOPDIR)/.config without
including it explicitly. (This was an implementation
hack and
could be fixed).
including it explicitly. (This was an implementation
al hack
and
could be fixed).
...
...
@@ -338,7 +338,7 @@ architecture-specific values.
extends them.
Many arch Makefiles dynamically run the target C compiler to
probe
what options it support
s:
probe
supported option
s:
# arch/i386/Makefile
...
...
@@ -375,7 +375,7 @@ architecture-specific values.
--- 5.2 Vmlinux build variables
An arch Makefile co
-
operates with the top Makefile to define variables
An arch Makefile cooperates with the top Makefile to define variables
which specify how to build the vmlinux file. Note that there is no
corresponding arch-specific section for modules; the module-building
machinery is all architecture-independent.
...
...
@@ -471,11 +471,9 @@ A subdirectory Makefile has four sections.
--- 6.1 Comments
The first section is a comment header. Just write what you would
write if you were editing a C source file, but use "# ..." instead of
"/* ... */". Historically, many anonymous people have edited kernel
Makefiles without leaving any change histories in the header; comments
from them would have been valuable.
The first section is a comment header. Historically, many anonymous
people have edited kernel Makefiles without leaving any change
histories in the header; comments from them would have been valuable.
...
...
@@ -657,8 +655,8 @@ $(subdir-y), not $(subdir-m).
export-objs
When using loadable modules, not every global symbol in the
kernel / other modules is automatically available
for your
module, only those explicitly exported ar
e.
kernel / other modules is automatically available
, only those
explicitly exported are available for your modul
e.
To make a symbol available for use in modules, to "export" it,
use the EXPORT_SYMBOL(<symbol>) directive in your source. In
...
...
@@ -827,7 +825,7 @@ people define most variables using "new style" but then fall back to
obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o
Notice the use of $(CONFIG_...) substitutions on the left hand
side of an assignment operator. This gives G
nu
Make the power
side of an assignment operator. This gives G
NU
Make the power
of associative indexing! Each of these assignments replaces
eight lines of code in an old-style Makefile.
...
...
@@ -840,9 +838,8 @@ people define most variables using "new style" but then fall back to
$(obj-n) and $(obj-) are ignored.
Each list may contain duplicates items; duplicates are
automatically removed later. Also, if a file appears in both
$(obj-y) and $(obj-m), it will automatically be removed from
the $(obj-m) list.
automatically removed later. Duplicates in both $(obj-y) and
$(obj-m) will automatically be removed from the $(obj-m) list.
Example:
...
...
@@ -926,9 +923,9 @@ people define most variables using "new style" but then fall back to
of sr_mod.o will be linked together with "$(LD) -r" to make the
kernel module sr_mod.o.
A
nd suppose CONFIG_SCSI_INITIO=n. Then initio.o goes onto the
$(obj-n) list and that's the end of it. Its component files
are not compiled, and the composite file is not created.
A
lso suppose CONFIG_SCSI_INITIO=n. Then initio.o goes onto
the $(obj-n) list and that's the end of it. Its component
files
are not compiled, and the composite file is not created.
subdir-y subdir-m subdir-n subdir-
...
...
@@ -947,9 +944,9 @@ people define most variables using "new style" but then fall back to
These variables work similar to obj-*, but are used for
subdirectories instead of object files.
After executing all
of the assignments, the subdirectory
Makefile has built up four lists: $(subdir-y), $(subdir-m
),
$(subdir-n),
and $(subdir-).
After executing all
assignments, the subdirectory Makefile has
built up four lists: $(subdir-y), $(subdir-m), $(subdir-n
),
and $(subdir-).
$(subdir-y) is a list of directories that should be entered
for making vmlinux.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment