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
nexedi
linux
Commits
6c94e37b
Commit
6c94e37b
authored
Jun 07, 2003
by
Sam Ravnborg
Committed by
Linus Torvalds
Jun 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kbuild: Document newly added lib-y
parent
e9da59fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
Documentation/kbuild/makefiles.txt
Documentation/kbuild/makefiles.txt
+23
-10
No files found.
Documentation/kbuild/makefiles.txt
View file @
6c94e37b
...
@@ -11,7 +11,7 @@ This document describes the Linux kernel Makefiles.
...
@@ -11,7 +11,7 @@ This document describes the Linux kernel Makefiles.
--- 3.2 Built-in object goals - obj-y
--- 3.2 Built-in object goals - obj-y
--- 3.3 Loadable module goals - obj-m
--- 3.3 Loadable module goals - obj-m
--- 3.4 Objects which export symbols
--- 3.4 Objects which export symbols
--- 3.5 Library file goals -
L_TARGET
--- 3.5 Library file goals -
lib-y
--- 3.6 Descending down in directories
--- 3.6 Descending down in directories
--- 3.7 Compilation flags
--- 3.7 Compilation flags
--- 3.8 Command line dependency
--- 3.8 Command line dependency
...
@@ -214,20 +214,33 @@ more details, with real examples.
...
@@ -214,20 +214,33 @@ more details, with real examples.
modules exporting symbols.
modules exporting symbols.
See also Documentation/modules.txt.
See also Documentation/modules.txt.
--- 3.5 Library file goals -
L_TARGET
--- 3.5 Library file goals -
lib-y
Instead of building a built-in.o file, you may also
Objects listed with obj-* is used for modules or
build an archive which again contains objects listed in $(obj-y).
are combined in a built-in.o for that specific directory.
This is normally not necessary and only used in lib/ and
There is also the possibility to list objects that will
arch/$(ARCH)/lib directories.
be included in a library, lib.a.
Only the name lib.a is allowed.
All objects listed with lib-y are combined in a single
library for that directory.
Objects that are listed in obj-y and additional listed in
lib-y will not be included in the library, since they will anyway
be accessible.
For consistency objects listed in lib-m will be included in lib.a.
Note that the same kbuild makefile may list files to be built-in
and to be part of a library. Therefore the same directory
may contain both a built-in.o and a lib.a file.
Example:
Example:
#arch/i386/lib/Makefile
#arch/i386/lib/Makefile
L_TARGET := lib.a
lib-y := checksum.o delay.o
obj-y := checksum.o delay.o
This will create a library lib.a based on checksum.o and delay.o.
This will create a library lib.a based on checksum.o and delay.o.
For kbuild to actually recognize that there is a lib.a being build
the directory shall be listed in libs-y.
See also "6.3 List directories to visit when descending".
Usage of lib-y is normally restricted to lib/ and arch/*/lib.
--- 3.6 Descending down in directories
--- 3.6 Descending down in directories
...
@@ -727,7 +740,7 @@ When kbuild executes the following steps are followed (roughly):
...
@@ -727,7 +740,7 @@ When kbuild executes the following steps are followed (roughly):
head-y, init-y, core-y, libs-y, drivers-y, net-y
head-y, init-y, core-y, libs-y, drivers-y, net-y
$(head-y) list objects to be linked first in vmlinux.
$(head-y) list objects to be linked first in vmlinux.
$(libs-y) list directories where a lib
s
.a archive can be located.
$(libs-y) list directories where a lib.a archive can be located.
The rest list directories where a built-in.o object file can be located.
The rest list directories where a built-in.o object file can be located.
$(init-y) objects will be located after $(head-y).
$(init-y) objects will be located after $(head-y).
...
...
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