diff options
Diffstat (limited to 'Documentation/kbuild/makefiles.txt')
-rw-r--r-- | Documentation/kbuild/makefiles.txt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 4b3d6710c504..bb5306e9a5c3 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -34,7 +34,7 @@ This document describes the Linux kernel Makefiles. | |||
34 | --- 6.1 Set variables to tweak the build to the architecture | 34 | --- 6.1 Set variables to tweak the build to the architecture |
35 | --- 6.2 Add prerequisites to archprepare: | 35 | --- 6.2 Add prerequisites to archprepare: |
36 | --- 6.3 List directories to visit when descending | 36 | --- 6.3 List directories to visit when descending |
37 | --- 6.4 Architecture specific boot images | 37 | --- 6.4 Architecture-specific boot images |
38 | --- 6.5 Building non-kbuild targets | 38 | --- 6.5 Building non-kbuild targets |
39 | --- 6.6 Commands useful for building a boot image | 39 | --- 6.6 Commands useful for building a boot image |
40 | --- 6.7 Custom kbuild commands | 40 | --- 6.7 Custom kbuild commands |
@@ -124,7 +124,7 @@ more details, with real examples. | |||
124 | Example: | 124 | Example: |
125 | obj-y += foo.o | 125 | obj-y += foo.o |
126 | 126 | ||
127 | This tell kbuild that there is one object in that directory, named | 127 | This tells kbuild that there is one object in that directory, named |
128 | foo.o. foo.o will be built from foo.c or foo.S. | 128 | foo.o. foo.o will be built from foo.c or foo.S. |
129 | 129 | ||
130 | If foo.o shall be built as a module, the variable obj-m is used. | 130 | If foo.o shall be built as a module, the variable obj-m is used. |
@@ -353,7 +353,7 @@ more details, with real examples. | |||
353 | Special rules are used when the kbuild infrastructure does | 353 | Special rules are used when the kbuild infrastructure does |
354 | not provide the required support. A typical example is | 354 | not provide the required support. A typical example is |
355 | header files generated during the build process. | 355 | header files generated during the build process. |
356 | Another example are the architecture specific Makefiles which | 356 | Another example are the architecture-specific Makefiles which |
357 | need special rules to prepare boot images etc. | 357 | need special rules to prepare boot images etc. |
358 | 358 | ||
359 | Special rules are written as normal Make rules. | 359 | Special rules are written as normal Make rules. |
@@ -416,7 +416,7 @@ more details, with real examples. | |||
416 | #arch/i386/kernel/Makefile | 416 | #arch/i386/kernel/Makefile |
417 | vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv) | 417 | vsyscall-flags += $(call ld-option, -Wl$(comma)--hash-style=sysv) |
418 | 418 | ||
419 | In the above example vsyscall-flags will be assigned the option | 419 | In the above example, vsyscall-flags will be assigned the option |
420 | -Wl$(comma)--hash-style=sysv if it is supported by $(CC). | 420 | -Wl$(comma)--hash-style=sysv if it is supported by $(CC). |
421 | The second argument is optional, and if supplied will be used | 421 | The second argument is optional, and if supplied will be used |
422 | if first argument is not supported. | 422 | if first argument is not supported. |
@@ -434,7 +434,7 @@ more details, with real examples. | |||
434 | #arch/i386/Makefile | 434 | #arch/i386/Makefile |
435 | cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586) | 435 | cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586) |
436 | 436 | ||
437 | In the above example cflags-y will be assigned the option | 437 | In the above example, cflags-y will be assigned the option |
438 | -march=pentium-mmx if supported by $(CC), otherwise -march=i586. | 438 | -march=pentium-mmx if supported by $(CC), otherwise -march=i586. |
439 | The second argument to cc-option is optional, and if omitted, | 439 | The second argument to cc-option is optional, and if omitted, |
440 | cflags-y will be assigned no value if first option is not supported. | 440 | cflags-y will be assigned no value if first option is not supported. |
@@ -750,10 +750,10 @@ When kbuild executes, the following steps are followed (roughly): | |||
750 | located at the root of the obj tree. | 750 | located at the root of the obj tree. |
751 | The very first objects linked are listed in head-y, assigned by | 751 | The very first objects linked are listed in head-y, assigned by |
752 | arch/$(ARCH)/Makefile. | 752 | arch/$(ARCH)/Makefile. |
753 | 7) Finally, the architecture specific part does any required post processing | 753 | 7) Finally, the architecture-specific part does any required post processing |
754 | and builds the final bootimage. | 754 | and builds the final bootimage. |
755 | - This includes building boot records | 755 | - This includes building boot records |
756 | - Preparing initrd images and thelike | 756 | - Preparing initrd images and the like |
757 | 757 | ||
758 | 758 | ||
759 | --- 6.1 Set variables to tweak the build to the architecture | 759 | --- 6.1 Set variables to tweak the build to the architecture |
@@ -880,7 +880,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
880 | 880 | ||
881 | $(head-y) lists objects to be linked first in vmlinux. | 881 | $(head-y) lists objects to be linked first in vmlinux. |
882 | $(libs-y) lists directories where a lib.a archive can be located. | 882 | $(libs-y) lists directories where a lib.a archive can be located. |
883 | The rest lists directories where a built-in.o object file can be | 883 | The rest list directories where a built-in.o object file can be |
884 | located. | 884 | located. |
885 | 885 | ||
886 | $(init-y) objects will be located after $(head-y). | 886 | $(init-y) objects will be located after $(head-y). |
@@ -888,7 +888,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
888 | $(core-y), $(libs-y), $(drivers-y) and $(net-y). | 888 | $(core-y), $(libs-y), $(drivers-y) and $(net-y). |
889 | 889 | ||
890 | The top level Makefile defines values for all generic directories, | 890 | The top level Makefile defines values for all generic directories, |
891 | and arch/$(ARCH)/Makefile only adds architecture specific directories. | 891 | and arch/$(ARCH)/Makefile only adds architecture-specific directories. |
892 | 892 | ||
893 | Example: | 893 | Example: |
894 | #arch/sparc64/Makefile | 894 | #arch/sparc64/Makefile |
@@ -897,7 +897,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
897 | drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/ | 897 | drivers-$(CONFIG_OPROFILE) += arch/sparc64/oprofile/ |
898 | 898 | ||
899 | 899 | ||
900 | --- 6.4 Architecture specific boot images | 900 | --- 6.4 Architecture-specific boot images |
901 | 901 | ||
902 | An arch Makefile specifies goals that take the vmlinux file, compress | 902 | An arch Makefile specifies goals that take the vmlinux file, compress |
903 | it, wrap it in bootstrapping code, and copy the resulting files | 903 | it, wrap it in bootstrapping code, and copy the resulting files |
@@ -924,7 +924,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
924 | "$(Q)$(MAKE) $(build)=<dir>" is the recommended way to invoke | 924 | "$(Q)$(MAKE) $(build)=<dir>" is the recommended way to invoke |
925 | make in a subdirectory. | 925 | make in a subdirectory. |
926 | 926 | ||
927 | There are no rules for naming architecture specific targets, | 927 | There are no rules for naming architecture-specific targets, |
928 | but executing "make help" will list all relevant targets. | 928 | but executing "make help" will list all relevant targets. |
929 | To support this, $(archhelp) must be defined. | 929 | To support this, $(archhelp) must be defined. |
930 | 930 | ||
@@ -982,7 +982,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
982 | $(call if_changed,ld/objcopy/gzip) | 982 | $(call if_changed,ld/objcopy/gzip) |
983 | 983 | ||
984 | When the rule is evaluated, it is checked to see if any files | 984 | When the rule is evaluated, it is checked to see if any files |
985 | needs an update, or the command line has changed since the last | 985 | need an update, or the command line has changed since the last |
986 | invocation. The latter will force a rebuild if any options | 986 | invocation. The latter will force a rebuild if any options |
987 | to the executable have changed. | 987 | to the executable have changed. |
988 | Any target that utilises if_changed must be listed in $(targets), | 988 | Any target that utilises if_changed must be listed in $(targets), |
@@ -1089,7 +1089,7 @@ When kbuild executes, the following steps are followed (roughly): | |||
1089 | assignment. | 1089 | assignment. |
1090 | 1090 | ||
1091 | The kbuild infrastructure for *lds file are used in several | 1091 | The kbuild infrastructure for *lds file are used in several |
1092 | architecture specific files. | 1092 | architecture-specific files. |
1093 | 1093 | ||
1094 | 1094 | ||
1095 | === 7 Kbuild Variables | 1095 | === 7 Kbuild Variables |
@@ -1133,7 +1133,7 @@ The top Makefile exports the following variables: | |||
1133 | 1133 | ||
1134 | This variable defines a place for the arch Makefiles to install | 1134 | This variable defines a place for the arch Makefiles to install |
1135 | the resident kernel image and System.map file. | 1135 | the resident kernel image and System.map file. |
1136 | Use this for architecture specific install targets. | 1136 | Use this for architecture-specific install targets. |
1137 | 1137 | ||
1138 | INSTALL_MOD_PATH, MODLIB | 1138 | INSTALL_MOD_PATH, MODLIB |
1139 | 1139 | ||