mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
* master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits) kbuild: remove obsoleted scripts/reference_* files kbuild: fix make help & make *pkg kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h Kconfig: remove the CONFIG_CC_ALIGN_* options kbuild: add -fverbose-asm to i386 Makefile kbuild: clean-up genksyms kbuild: Lindent genksyms.c kbuild: fix genksyms build error kbuild: in makefile.txt note that Makefile is preferred name for kbuild files kbuild: replace PHONY with FORCE kbuild: Fix bug in crc symbol generating of kernel and modules kbuild: change kbuild to not rely on incorrect GNU make behavior kbuild: when warning symbols exported twice now tell user this is the problem kbuild: fix make dir/file.xx when asm symlink is missing kbuild: in the section mismatch check try harder to find symbols kbuild: fix section mismatch check for unwind on IA64 kbuild: kill false positives from section mismatch warnings for powerpc kbuild: kill trailing whitespace in modpost & friends kbuild: small update of allnoconfig description kbuild: make namespace.pl CROSS_COMPILE happy ... Trivial conflict in arch/ppc/boot/Makefile manually fixed up
This commit is contained in:
@@ -28,7 +28,7 @@ PS_METHOD = $(prefer-db2x)
|
||||
|
||||
###
|
||||
# The targets that may be used.
|
||||
.PHONY: xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
|
||||
PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs
|
||||
|
||||
BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
|
||||
xmldocs: $(BOOKS)
|
||||
@@ -211,3 +211,9 @@ clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS))
|
||||
|
||||
#man put files in man subdir - traverse down
|
||||
subdir- := man/
|
||||
|
||||
|
||||
# Declare the contents of the .PHONY variable as phony. We keep that
|
||||
# information in a variable se we can use it in if_changed and friends.
|
||||
|
||||
.PHONY: $(PHONY)
|
||||
|
||||
@@ -17,6 +17,7 @@ This document describes the Linux kernel Makefiles.
|
||||
--- 3.8 Command line dependency
|
||||
--- 3.9 Dependency tracking
|
||||
--- 3.10 Special Rules
|
||||
--- 3.11 $(CC) support functions
|
||||
|
||||
=== 4 Host Program support
|
||||
--- 4.1 Simple Host Program
|
||||
@@ -38,7 +39,6 @@ This document describes the Linux kernel Makefiles.
|
||||
--- 6.6 Commands useful for building a boot image
|
||||
--- 6.7 Custom kbuild commands
|
||||
--- 6.8 Preprocessing linker scripts
|
||||
--- 6.9 $(CC) support functions
|
||||
|
||||
=== 7 Kbuild Variables
|
||||
=== 8 Makefile language
|
||||
@@ -106,9 +106,9 @@ This document is aimed towards normal developers and arch developers.
|
||||
Most Makefiles within the kernel are kbuild Makefiles that use the
|
||||
kbuild infrastructure. This chapter introduce the syntax used in the
|
||||
kbuild makefiles.
|
||||
The preferred name for the kbuild files is 'Kbuild' but 'Makefile' will
|
||||
continue to be supported. All new developmen is expected to use the
|
||||
Kbuild filename.
|
||||
The preferred name for the kbuild files are 'Makefile' but 'Kbuild' can
|
||||
be used and if both a 'Makefile' and a 'Kbuild' file exists then the 'Kbuild'
|
||||
file will be used.
|
||||
|
||||
Section 3.1 "Goal definitions" is a quick intro, further chapters provide
|
||||
more details, with real examples.
|
||||
@@ -385,6 +385,102 @@ more details, with real examples.
|
||||
to prerequisites are referenced with $(src) (because they are not
|
||||
generated files).
|
||||
|
||||
--- 3.11 $(CC) support functions
|
||||
|
||||
The kernel may be build with several different versions of
|
||||
$(CC), each supporting a unique set of features and options.
|
||||
kbuild provide basic support to check for valid options for $(CC).
|
||||
$(CC) is useally the gcc compiler, but other alternatives are
|
||||
available.
|
||||
|
||||
as-option
|
||||
as-option is used to check if $(CC) when used to compile
|
||||
assembler (*.S) files supports the given option. An optional
|
||||
second option may be specified if first option are not supported.
|
||||
|
||||
Example:
|
||||
#arch/sh/Makefile
|
||||
cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),)
|
||||
|
||||
In the above example cflags-y will be assinged the the option
|
||||
-Wa$(comma)-isa=$(isa-y) if it is supported by $(CC).
|
||||
The second argument is optional, and if supplied will be used
|
||||
if first argument is not supported.
|
||||
|
||||
cc-option
|
||||
cc-option is used to check if $(CC) support a given option, and not
|
||||
supported to use an optional second option.
|
||||
|
||||
Example:
|
||||
#arch/i386/Makefile
|
||||
cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
|
||||
|
||||
In the above example cflags-y will be assigned the option
|
||||
-march=pentium-mmx if supported by $(CC), otherwise -march-i586.
|
||||
The second argument to cc-option is optional, and if omitted
|
||||
cflags-y will be assigned no value if first option is not supported.
|
||||
|
||||
cc-option-yn
|
||||
cc-option-yn is used to check if gcc supports a given option
|
||||
and return 'y' if supported, otherwise 'n'.
|
||||
|
||||
Example:
|
||||
#arch/ppc/Makefile
|
||||
biarch := $(call cc-option-yn, -m32)
|
||||
aflags-$(biarch) += -a32
|
||||
cflags-$(biarch) += -m32
|
||||
|
||||
In the above example $(biarch) is set to y if $(CC) supports the -m32
|
||||
option. When $(biarch) equals to y the expanded variables $(aflags-y)
|
||||
and $(cflags-y) will be assigned the values -a32 and -m32.
|
||||
|
||||
cc-option-align
|
||||
gcc version >= 3.0 shifted type of options used to speify
|
||||
alignment of functions, loops etc. $(cc-option-align) whrn used
|
||||
as prefix to the align options will select the right prefix:
|
||||
gcc < 3.00
|
||||
cc-option-align = -malign
|
||||
gcc >= 3.00
|
||||
cc-option-align = -falign
|
||||
|
||||
Example:
|
||||
CFLAGS += $(cc-option-align)-functions=4
|
||||
|
||||
In the above example the option -falign-functions=4 is used for
|
||||
gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used.
|
||||
|
||||
cc-version
|
||||
cc-version return a numerical version of the $(CC) compiler version.
|
||||
The format is <major><minor> where both are two digits. So for example
|
||||
gcc 3.41 would return 0341.
|
||||
cc-version is useful when a specific $(CC) version is faulty in one
|
||||
area, for example the -mregparm=3 were broken in some gcc version
|
||||
even though the option was accepted by gcc.
|
||||
|
||||
Example:
|
||||
#arch/i386/Makefile
|
||||
cflags-y += $(shell \
|
||||
if [ $(call cc-version) -ge 0300 ] ; then \
|
||||
echo "-mregparm=3"; fi ;)
|
||||
|
||||
In the above example -mregparm=3 is only used for gcc version greater
|
||||
than or equal to gcc 3.0.
|
||||
|
||||
cc-ifversion
|
||||
cc-ifversion test the version of $(CC) and equals last argument if
|
||||
version expression is true.
|
||||
|
||||
Example:
|
||||
#fs/reiserfs/Makefile
|
||||
EXTRA_CFLAGS := $(call cc-ifversion, -lt, 0402, -O1)
|
||||
|
||||
In this example EXTRA_CFLAGS will be assigned the value -O1 if the
|
||||
$(CC) version is less than 4.2.
|
||||
cc-ifversion takes all the shell operators:
|
||||
-eq, -ne, -lt, -le, -gt, and -ge
|
||||
The third parameter may be a text as in this example, but it may also
|
||||
be an expanded variable or a macro.
|
||||
|
||||
|
||||
=== 4 Host Program support
|
||||
|
||||
@@ -973,74 +1069,6 @@ When kbuild executes the following steps are followed (roughly):
|
||||
architecture specific files.
|
||||
|
||||
|
||||
--- 6.9 $(CC) support functions
|
||||
|
||||
The kernel may be build with several different versions of
|
||||
$(CC), each supporting a unique set of features and options.
|
||||
kbuild provide basic support to check for valid options for $(CC).
|
||||
$(CC) is useally the gcc compiler, but other alternatives are
|
||||
available.
|
||||
|
||||
cc-option
|
||||
cc-option is used to check if $(CC) support a given option, and not
|
||||
supported to use an optional second option.
|
||||
|
||||
Example:
|
||||
#arch/i386/Makefile
|
||||
cflags-y += $(call cc-option,-march=pentium-mmx,-march=i586)
|
||||
|
||||
In the above example cflags-y will be assigned the option
|
||||
-march=pentium-mmx if supported by $(CC), otherwise -march-i586.
|
||||
The second argument to cc-option is optional, and if omitted
|
||||
cflags-y will be assigned no value if first option is not supported.
|
||||
|
||||
cc-option-yn
|
||||
cc-option-yn is used to check if gcc supports a given option
|
||||
and return 'y' if supported, otherwise 'n'.
|
||||
|
||||
Example:
|
||||
#arch/ppc/Makefile
|
||||
biarch := $(call cc-option-yn, -m32)
|
||||
aflags-$(biarch) += -a32
|
||||
cflags-$(biarch) += -m32
|
||||
|
||||
In the above example $(biarch) is set to y if $(CC) supports the -m32
|
||||
option. When $(biarch) equals to y the expanded variables $(aflags-y)
|
||||
and $(cflags-y) will be assigned the values -a32 and -m32.
|
||||
|
||||
cc-option-align
|
||||
gcc version >= 3.0 shifted type of options used to speify
|
||||
alignment of functions, loops etc. $(cc-option-align) whrn used
|
||||
as prefix to the align options will select the right prefix:
|
||||
gcc < 3.00
|
||||
cc-option-align = -malign
|
||||
gcc >= 3.00
|
||||
cc-option-align = -falign
|
||||
|
||||
Example:
|
||||
CFLAGS += $(cc-option-align)-functions=4
|
||||
|
||||
In the above example the option -falign-functions=4 is used for
|
||||
gcc >= 3.00. For gcc < 3.00 -malign-functions=4 is used.
|
||||
|
||||
cc-version
|
||||
cc-version return a numerical version of the $(CC) compiler version.
|
||||
The format is <major><minor> where both are two digits. So for example
|
||||
gcc 3.41 would return 0341.
|
||||
cc-version is useful when a specific $(CC) version is faulty in one
|
||||
area, for example the -mregparm=3 were broken in some gcc version
|
||||
even though the option was accepted by gcc.
|
||||
|
||||
Example:
|
||||
#arch/i386/Makefile
|
||||
cflags-y += $(shell \
|
||||
if [ $(call cc-version) -ge 0300 ] ; then \
|
||||
echo "-mregparm=3"; fi ;)
|
||||
|
||||
In the above example -mregparm=3 is only used for gcc version greater
|
||||
than or equal to gcc 3.0.
|
||||
|
||||
|
||||
=== 7 Kbuild Variables
|
||||
|
||||
The top Makefile exports the following variables:
|
||||
|
||||
@@ -13,6 +13,7 @@ In this document you will find information about:
|
||||
--- 2.2 Available targets
|
||||
--- 2.3 Available options
|
||||
--- 2.4 Preparing the kernel tree for module build
|
||||
--- 2.5 Building separate files for a module
|
||||
=== 3. Example commands
|
||||
=== 4. Creating a kbuild file for an external module
|
||||
=== 5. Include files
|
||||
@@ -22,7 +23,10 @@ In this document you will find information about:
|
||||
=== 6. Module installation
|
||||
--- 6.1 INSTALL_MOD_PATH
|
||||
--- 6.2 INSTALL_MOD_DIR
|
||||
=== 7. Module versioning
|
||||
=== 7. Module versioning & Module.symvers
|
||||
--- 7.1 Symbols fron the kernel (vmlinux + modules)
|
||||
--- 7.2 Symbols and external modules
|
||||
--- 7.3 Symbols from another external module
|
||||
=== 8. Tips & Tricks
|
||||
--- 8.1 Testing for CONFIG_FOO_BAR
|
||||
|
||||
@@ -88,7 +92,8 @@ when building an external module.
|
||||
make -C $KDIR M=$PWD modules_install
|
||||
Install the external module(s).
|
||||
Installation default is in /lib/modules/<kernel-version>/extra,
|
||||
but may be prefixed with INSTALL_MOD_PATH - see separate chapter.
|
||||
but may be prefixed with INSTALL_MOD_PATH - see separate
|
||||
chapter.
|
||||
|
||||
make -C $KDIR M=$PWD clean
|
||||
Remove all generated files for the module - the kernel
|
||||
@@ -131,6 +136,16 @@ when building an external module.
|
||||
Therefore a full kernel build needs to be executed to make
|
||||
module versioning work.
|
||||
|
||||
--- 2.5 Building separate files for a module
|
||||
It is possible to build single files which is part of a module.
|
||||
This works equal for the kernel, a module and even for external
|
||||
modules.
|
||||
Examples (module foo.ko, consist of bar.o, baz.o):
|
||||
make -C $KDIR M=`pwd` bar.lst
|
||||
make -C $KDIR M=`pwd` bar.o
|
||||
make -C $KDIR M=`pwd` foo.ko
|
||||
make -C $KDIR M=`pwd` /
|
||||
|
||||
|
||||
=== 3. Example commands
|
||||
|
||||
@@ -422,7 +437,7 @@ External modules are installed in the directory:
|
||||
=> Install dir: /lib/modules/$(KERNELRELEASE)/gandalf
|
||||
|
||||
|
||||
=== 7. Module versioning
|
||||
=== 7. Module versioning & Module.symvers
|
||||
|
||||
Module versioning is enabled by the CONFIG_MODVERSIONS tag.
|
||||
|
||||
@@ -432,11 +447,80 @@ when a module is loaded/used then the CRC values contained in the kernel are
|
||||
compared with similar values in the module. If they are not equal then the
|
||||
kernel refuses to load the module.
|
||||
|
||||
During a kernel build a file named Module.symvers will be generated. This
|
||||
file includes the symbol version of all symbols within the kernel. If the
|
||||
Module.symvers file is saved from the last full kernel compile one does not
|
||||
have to do a full kernel compile to build a module version's compatible module.
|
||||
Module.symvers contains a list of all exported symbols from a kernel build.
|
||||
|
||||
--- 7.1 Symbols fron the kernel (vmlinux + modules)
|
||||
|
||||
During a kernel build a file named Module.symvers will be generated.
|
||||
Module.symvers contains all exported symbols from the kernel and
|
||||
compiled modules. For each symbols the corresponding CRC value
|
||||
is stored too.
|
||||
|
||||
The syntax of the Module.symvers file is:
|
||||
<CRC> <Symbol> <module>
|
||||
Sample:
|
||||
0x2d036834 scsi_remove_host drivers/scsi/scsi_mod
|
||||
|
||||
For a kernel build without CONFIG_MODVERSIONING enabled the crc
|
||||
would read: 0x00000000
|
||||
|
||||
Module.symvers serve two purposes.
|
||||
1) It list all exported symbols both from vmlinux and all modules
|
||||
2) It list CRC if CONFIG_MODVERSION is enabled
|
||||
|
||||
--- 7.2 Symbols and external modules
|
||||
|
||||
When building an external module the build system needs access to
|
||||
the symbols from the kernel to check if all external symbols are
|
||||
defined. This is done in the MODPOST step and to obtain all
|
||||
symbols modpost reads Module.symvers from the kernel.
|
||||
If a Module.symvers file is present in the directory where
|
||||
the external module is being build this file will be read too.
|
||||
During the MODPOST step a new Module.symvers file will be written
|
||||
containing all exported symbols that was not defined in the kernel.
|
||||
|
||||
--- 7.3 Symbols from another external module
|
||||
|
||||
Sometimes one external module uses exported symbols from another
|
||||
external module. Kbuild needs to have full knowledge on all symbols
|
||||
to avoid spitting out warnings about undefined symbols.
|
||||
Two solutions exist to let kbuild know all symbols of more than
|
||||
one external module.
|
||||
The method with a top-level kbuild file is recommended but may be
|
||||
impractical in certain situations.
|
||||
|
||||
Use a top-level Kbuild file
|
||||
If you have two modules: 'foo', 'bar' and 'foo' needs symbols
|
||||
from 'bar' then one can use a common top-level kbuild file so
|
||||
both modules are compiled in same build.
|
||||
|
||||
Consider following directory layout:
|
||||
./foo/ <= contains the foo module
|
||||
./bar/ <= contains the bar module
|
||||
The top-level Kbuild file would then look like:
|
||||
|
||||
#./Kbuild: (this file may also be named Makefile)
|
||||
obj-y := foo/ bar/
|
||||
|
||||
Executing:
|
||||
make -C $KDIR M=`pwd`
|
||||
|
||||
will then do the expected and compile both modules with full
|
||||
knowledge on symbols from both modules.
|
||||
|
||||
Use an extra Module.symvers file
|
||||
When an external module is build a Module.symvers file is
|
||||
generated containing all exported symbols which are not
|
||||
defined in the kernel.
|
||||
To get access to symbols from module 'bar' one can copy the
|
||||
Module.symvers file from the compilation of the 'bar' module
|
||||
to the directory where the 'foo' module is build.
|
||||
During the module build kbuild will read the Module.symvers
|
||||
file in the directory of the external module and when the
|
||||
build is finished a new Module.symvers file is created
|
||||
containing the sum of all symbols defined and not part of the
|
||||
kernel.
|
||||
|
||||
=== 8. Tips & Tricks
|
||||
|
||||
--- 8.1 Testing for CONFIG_FOO_BAR
|
||||
|
||||
@@ -56,10 +56,6 @@ Here is the solution:
|
||||
writing one file per option. It updates only the files for options
|
||||
that have changed.
|
||||
|
||||
mkdep.c no longer generates warning messages for missing or unneeded
|
||||
<linux/config.h> lines. The new top-level target 'make checkconfig'
|
||||
checks for these problems.
|
||||
|
||||
Flag Dependencies
|
||||
|
||||
Martin Von Loewis contributed another feature to this patch:
|
||||
|
||||
197
Makefile
197
Makefile
@@ -95,7 +95,7 @@ ifdef O
|
||||
endif
|
||||
|
||||
# That's our default target when none is given on the command line
|
||||
.PHONY: _all
|
||||
PHONY := _all
|
||||
_all:
|
||||
|
||||
ifneq ($(KBUILD_OUTPUT),)
|
||||
@@ -106,7 +106,7 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
|
||||
$(if $(KBUILD_OUTPUT),, \
|
||||
$(error output directory "$(saved-output)" does not exist))
|
||||
|
||||
.PHONY: $(MAKECMDGOALS)
|
||||
PHONY += $(MAKECMDGOALS)
|
||||
|
||||
$(filter-out _all,$(MAKECMDGOALS)) _all:
|
||||
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
|
||||
@@ -123,7 +123,7 @@ ifeq ($(skip-makefile),)
|
||||
|
||||
# If building an external module we do not care about the all: rule
|
||||
# but instead _all depend on modules
|
||||
.PHONY: all
|
||||
PHONY += all
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
_all: all
|
||||
else
|
||||
@@ -137,7 +137,7 @@ objtree := $(CURDIR)
|
||||
src := $(srctree)
|
||||
obj := $(objtree)
|
||||
|
||||
VPATH := $(srctree)
|
||||
VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
|
||||
|
||||
export srctree objtree VPATH TOPDIR
|
||||
|
||||
@@ -151,7 +151,7 @@ export srctree objtree VPATH TOPDIR
|
||||
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
||||
-e s/arm.*/arm/ -e s/sa110/arm/ \
|
||||
-e s/s390x/s390/ -e s/parisc64/parisc/ \
|
||||
-e s/ppc.*/powerpc/ )
|
||||
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
|
||||
|
||||
# Cross compiling and selecting different set of gcc/bin-utils
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -258,38 +258,6 @@ endif
|
||||
|
||||
export quiet Q KBUILD_VERBOSE
|
||||
|
||||
######
|
||||
# cc support functions to be used (only) in arch/$(ARCH)/Makefile
|
||||
# See documentation in Documentation/kbuild/makefiles.txt
|
||||
|
||||
# as-option
|
||||
# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
|
||||
|
||||
as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
|
||||
-xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
|
||||
else echo "$(2)"; fi ;)
|
||||
|
||||
# cc-option
|
||||
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
|
||||
|
||||
cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
|
||||
> /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
|
||||
|
||||
# cc-option-yn
|
||||
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
|
||||
cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
|
||||
> /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
|
||||
|
||||
# cc-option-align
|
||||
# Prefix align with either -falign or -malign
|
||||
cc-option-align = $(subst -functions=0,,\
|
||||
$(call cc-option,-falign-functions=0,-malign-functions=0))
|
||||
|
||||
# cc-version
|
||||
# Usage gcc-ver := $(call cc-version $(CC))
|
||||
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
|
||||
$(if $(1), $(1), $(CC)))
|
||||
|
||||
|
||||
# Look for make include files relative to root of kernel src
|
||||
MAKEFLAGS += --include-dir=$(srctree)
|
||||
@@ -369,14 +337,14 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc
|
||||
# Rules shared between *config targets and build targets
|
||||
|
||||
# Basic helpers built in scripts/
|
||||
.PHONY: scripts_basic
|
||||
PHONY += scripts_basic
|
||||
scripts_basic:
|
||||
$(Q)$(MAKE) $(build)=scripts/basic
|
||||
|
||||
# To avoid any implicit rule to kick in, define an empty command.
|
||||
scripts/basic/%: scripts_basic ;
|
||||
|
||||
.PHONY: outputmakefile
|
||||
PHONY += outputmakefile
|
||||
# outputmakefile generate a Makefile to be placed in output directory, if
|
||||
# using a seperate output directory. This allows convinient use
|
||||
# of make in output directory
|
||||
@@ -452,7 +420,7 @@ ifeq ($(KBUILD_EXTMOD),)
|
||||
# Additional helpers built in scripts/
|
||||
# Carefully list dependencies so we do not try to build scripts twice
|
||||
# in parrallel
|
||||
.PHONY: scripts
|
||||
PHONY += scripts
|
||||
scripts: scripts_basic include/config/MARKER
|
||||
$(Q)$(MAKE) $(build)=$(@)
|
||||
|
||||
@@ -504,13 +472,6 @@ else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
|
||||
#Add align options if CONFIG_CC_* is not equal to 0
|
||||
add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1)))
|
||||
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions)
|
||||
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels)
|
||||
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops)
|
||||
CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps)
|
||||
|
||||
ifdef CONFIG_FRAME_POINTER
|
||||
CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
|
||||
else
|
||||
@@ -756,7 +717,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
|
||||
# make menuconfig etc.
|
||||
# Error messages still appears in the original language
|
||||
|
||||
.PHONY: $(vmlinux-dirs)
|
||||
PHONY += $(vmlinux-dirs)
|
||||
$(vmlinux-dirs): prepare scripts
|
||||
$(Q)$(MAKE) $(build)=$@
|
||||
|
||||
@@ -809,10 +770,10 @@ kernelrelease = $(KERNELVERSION)$(localver-full)
|
||||
# version.h and scripts_basic is processed / created.
|
||||
|
||||
# Listed in dependency order
|
||||
.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3
|
||||
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
|
||||
|
||||
# prepare-all is deprecated, use prepare as valid replacement
|
||||
.PHONY: prepare-all
|
||||
PHONY += prepare-all
|
||||
|
||||
# prepare3 is used to check if we are building in a separate output directory,
|
||||
# and if so do:
|
||||
@@ -853,27 +814,6 @@ prepare prepare-all: prepare0
|
||||
|
||||
export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
|
||||
|
||||
# Single targets
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
%.s: %.c scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
%.i: %.c scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
%.o: %.c scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
%.ko: scripts FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) $(@:.ko=.o)
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||
%/: scripts prepare FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
|
||||
%.lst: %.c scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
%.s: %.S scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
%.o: %.S scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(@D) $@
|
||||
|
||||
# FIXME: The asm symlink changes when $(ARCH) changes. That's
|
||||
# hard to detect, but I suppose "make mrproper" is a good idea
|
||||
# before switching between archs anyway.
|
||||
@@ -914,7 +854,7 @@ include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.PHONY: depend dep
|
||||
PHONY += depend dep
|
||||
depend dep:
|
||||
@echo '*** Warning: make $@ is unnecessary now.'
|
||||
|
||||
@@ -929,21 +869,21 @@ all: modules
|
||||
|
||||
# Build modules
|
||||
|
||||
.PHONY: modules
|
||||
PHONY += modules
|
||||
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux)
|
||||
@echo ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
|
||||
# Target to prepare building external modules
|
||||
.PHONY: modules_prepare
|
||||
PHONY += modules_prepare
|
||||
modules_prepare: prepare scripts
|
||||
|
||||
# Target to install modules
|
||||
.PHONY: modules_install
|
||||
PHONY += modules_install
|
||||
modules_install: _modinst_ _modinst_post
|
||||
|
||||
.PHONY: _modinst_
|
||||
PHONY += _modinst_
|
||||
_modinst_:
|
||||
@if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \
|
||||
echo "Warning: you may need to install module-init-tools"; \
|
||||
@@ -970,7 +910,7 @@ depmod_opts :=
|
||||
else
|
||||
depmod_opts := -b $(INSTALL_MOD_PATH) -r
|
||||
endif
|
||||
.PHONY: _modinst_post
|
||||
PHONY += _modinst_post
|
||||
_modinst_post: _modinst_
|
||||
if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
|
||||
|
||||
@@ -1013,7 +953,7 @@ clean: rm-dirs := $(CLEAN_DIRS)
|
||||
clean: rm-files := $(CLEAN_FILES)
|
||||
clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs))
|
||||
|
||||
.PHONY: $(clean-dirs) clean archclean
|
||||
PHONY += $(clean-dirs) clean archclean
|
||||
$(clean-dirs):
|
||||
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
|
||||
@@ -1031,7 +971,7 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
|
||||
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
|
||||
mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
|
||||
|
||||
.PHONY: $(mrproper-dirs) mrproper archmrproper
|
||||
PHONY += $(mrproper-dirs) mrproper archmrproper
|
||||
$(mrproper-dirs):
|
||||
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
|
||||
|
||||
@@ -1041,7 +981,7 @@ mrproper: clean archmrproper $(mrproper-dirs)
|
||||
|
||||
# distclean
|
||||
#
|
||||
.PHONY: distclean
|
||||
PHONY += distclean
|
||||
|
||||
distclean: mrproper
|
||||
@find $(srctree) $(RCS_FIND_IGNORE) \
|
||||
@@ -1057,12 +997,10 @@ distclean: mrproper
|
||||
# rpm target kept for backward compatibility
|
||||
package-dir := $(srctree)/scripts/package
|
||||
|
||||
.PHONY: %-pkg rpm
|
||||
|
||||
%pkg: FORCE
|
||||
$(Q)$(MAKE) -f $(package-dir)/Makefile $@
|
||||
$(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||
rpm: FORCE
|
||||
$(Q)$(MAKE) -f $(package-dir)/Makefile $@
|
||||
$(Q)$(MAKE) $(build)=$(package-dir) $@
|
||||
|
||||
|
||||
# Brief documentation of the typical targets used
|
||||
@@ -1094,13 +1032,11 @@ help:
|
||||
@echo ' kernelversion - Output the version stored in Makefile'
|
||||
@echo ''
|
||||
@echo 'Static analysers'
|
||||
@echo ' buildcheck - List dangling references to vmlinux discarded sections'
|
||||
@echo ' and init sections from non-init sections'
|
||||
@echo ' checkstack - Generate a list of stack hogs'
|
||||
@echo ' namespacecheck - Name space analysis on compiled kernel'
|
||||
@echo ''
|
||||
@echo 'Kernel packaging:'
|
||||
@$(MAKE) -f $(package-dir)/Makefile help
|
||||
@$(MAKE) $(build)=$(package-dir) help
|
||||
@echo ''
|
||||
@echo 'Documentation targets:'
|
||||
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
|
||||
@@ -1149,11 +1085,12 @@ else # KBUILD_EXTMOD
|
||||
|
||||
# We are always building modules
|
||||
KBUILD_MODULES := 1
|
||||
.PHONY: crmodverdir
|
||||
PHONY += crmodverdir
|
||||
crmodverdir:
|
||||
$(Q)rm -rf $(MODVERDIR)
|
||||
$(Q)mkdir -p $(MODVERDIR)
|
||||
|
||||
.PHONY: $(objtree)/Module.symvers
|
||||
PHONY += $(objtree)/Module.symvers
|
||||
$(objtree)/Module.symvers:
|
||||
@test -e $(objtree)/Module.symvers || ( \
|
||||
echo; \
|
||||
@@ -1162,7 +1099,7 @@ $(objtree)/Module.symvers:
|
||||
echo )
|
||||
|
||||
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
|
||||
.PHONY: $(module-dirs) modules
|
||||
PHONY += $(module-dirs) modules
|
||||
$(module-dirs): crmodverdir $(objtree)/Module.symvers
|
||||
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
|
||||
|
||||
@@ -1170,13 +1107,32 @@ modules: $(module-dirs)
|
||||
@echo ' Building modules, stage 2.';
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
.PHONY: modules_install
|
||||
modules_install:
|
||||
PHONY += modules_install
|
||||
modules_install: _emodinst_ _emodinst_post
|
||||
|
||||
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
|
||||
PHONY += _emodinst_
|
||||
_emodinst_:
|
||||
$(Q)rm -rf $(MODLIB)/$(install-dir)
|
||||
$(Q)mkdir -p $(MODLIB)/$(install-dir)
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
|
||||
|
||||
# Run depmod only is we have System.map and depmod is executable
|
||||
quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
|
||||
cmd_depmod = if [ -r System.map -a -x $(DEPMOD) ]; then \
|
||||
$(DEPMOD) -ae -F System.map \
|
||||
$(if $(strip $(INSTALL_MOD_PATH)), \
|
||||
-b $(INSTALL_MOD_PATH) -r) \
|
||||
$(KERNELRELEASE); \
|
||||
fi
|
||||
|
||||
PHONY += _emodinst_post
|
||||
_emodinst_post: _emodinst_
|
||||
$(call cmd,depmod)
|
||||
|
||||
clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
|
||||
|
||||
.PHONY: $(clean-dirs) clean
|
||||
PHONY += $(clean-dirs) clean
|
||||
$(clean-dirs):
|
||||
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
|
||||
|
||||
@@ -1196,6 +1152,11 @@ help:
|
||||
@echo ' modules_install - install the module'
|
||||
@echo ' clean - remove generated files in module directory only'
|
||||
@echo ''
|
||||
|
||||
# Dummies...
|
||||
PHONY += prepare scripts
|
||||
prepare: ;
|
||||
scripts: ;
|
||||
endif # KBUILD_EXTMOD
|
||||
|
||||
# Generate tags for editors
|
||||
@@ -1296,17 +1257,13 @@ versioncheck:
|
||||
-name '*.[hcS]' -type f -print | sort \
|
||||
| xargs $(PERL) -w scripts/checkversion.pl
|
||||
|
||||
buildcheck:
|
||||
$(PERL) $(srctree)/scripts/reference_discarded.pl
|
||||
$(PERL) $(srctree)/scripts/reference_init.pl
|
||||
|
||||
namespacecheck:
|
||||
$(PERL) $(srctree)/scripts/namespace.pl
|
||||
|
||||
endif #ifeq ($(config-targets),1)
|
||||
endif #ifeq ($(mixed-targets),1)
|
||||
|
||||
.PHONY: checkstack
|
||||
PHONY += checkstack
|
||||
checkstack:
|
||||
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
|
||||
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
|
||||
@@ -1317,6 +1274,44 @@ kernelrelease:
|
||||
kernelversion:
|
||||
@echo $(KERNELVERSION)
|
||||
|
||||
# Single targets
|
||||
# ---------------------------------------------------------------------------
|
||||
# The directory part is taken from first prerequisite, so this
|
||||
# works even with external modules
|
||||
%.s: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.i: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.o: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.lst: %.c prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.s: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
%.o: %.S prepare scripts FORCE
|
||||
$(Q)$(MAKE) $(build)=$(dir $<) $(dir $<)$(notdir $@)
|
||||
|
||||
# For external modules we shall include any directory of the target,
|
||||
# but usual case there is no directory part.
|
||||
# make M=`pwd` module.o => $(dir $@)=./
|
||||
# make M=`pwd` foo/module.o => $(dir $@)=foo/
|
||||
# make M=`pwd` / => $(dir $@)=/
|
||||
|
||||
ifeq ($(KBUILD_EXTMOD),)
|
||||
target-dir = $(@D)
|
||||
else
|
||||
zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
|
||||
target-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
|
||||
endif
|
||||
|
||||
/ %/: scripts prepare FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(target-dir)
|
||||
%.ko: scripts FORCE
|
||||
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
|
||||
$(build)=$(target-dir) $(@:.ko=.o)
|
||||
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
|
||||
|
||||
# FIXME Should go into a make.lib or something
|
||||
# ===========================================================================
|
||||
|
||||
@@ -1351,4 +1346,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
|
||||
|
||||
endif # skip-makefile
|
||||
|
||||
PHONY += FORCE
|
||||
FORCE:
|
||||
|
||||
|
||||
# Declare the contents of the .PHONY variable as phony. We keep that
|
||||
# information in a variable se we can use it in if_changed and friends.
|
||||
.PHONY: $(PHONY)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# arch/arm/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -177,7 +180,7 @@ endif
|
||||
|
||||
archprepare: maketools
|
||||
|
||||
.PHONY: maketools FORCE
|
||||
PHONY += maketools FORCE
|
||||
maketools: include/linux/version.h include/asm-arm/.arch FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# arch/arm/boot/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -73,7 +76,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
|
||||
$(call if_changed,objcopy)
|
||||
@echo ' Kernel: $@ is ready'
|
||||
|
||||
.PHONY: initrd FORCE
|
||||
PHONY += initrd FORCE
|
||||
initrd:
|
||||
@test "$(INITRD_PHYS)" != "" || \
|
||||
(echo This machine does not support INITRD; exit -1)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# linux/arch/arm/boot/bootp/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
|
||||
LDFLAGS_bootp :=-p --no-undefined -X \
|
||||
--defsym initrd_phys=$(INITRD_PHYS) \
|
||||
@@ -21,4 +24,4 @@ $(obj)/kernel.o: arch/arm/boot/zImage FORCE
|
||||
|
||||
$(obj)/initrd.o: $(INITRD) FORCE
|
||||
|
||||
.PHONY: $(INITRD) FORCE
|
||||
PHONY += $(INITRD) FORCE
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# arch/arm26/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -49,9 +52,9 @@ all: zImage
|
||||
|
||||
boot := arch/arm26/boot
|
||||
|
||||
.PHONY: maketools FORCE
|
||||
PHONY += maketools FORCE
|
||||
maketools: FORCE
|
||||
|
||||
|
||||
|
||||
# Convert bzImage to zImage
|
||||
bzImage: vmlinux
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# arch/arm26/boot/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -60,7 +63,7 @@ $(obj)/xipImage: vmlinux FORCE
|
||||
@echo ' Kernel: $@ is ready'
|
||||
endif
|
||||
|
||||
.PHONY: initrd
|
||||
PHONY += initrd
|
||||
initrd:
|
||||
@test "$(INITRD_PHYS)" != "" || \
|
||||
(echo This machine does not support INITRD; exit -1)
|
||||
|
||||
@@ -99,8 +99,8 @@ AFLAGS += $(mflags-y)
|
||||
|
||||
boot := arch/i386/boot
|
||||
|
||||
.PHONY: zImage bzImage compressed zlilo bzlilo \
|
||||
zdisk bzdisk fdimage fdimage144 fdimage288 install
|
||||
PHONY += zImage bzImage compressed zlilo bzlilo \
|
||||
zdisk bzdisk fdimage fdimage144 fdimage288 install
|
||||
|
||||
all: bzImage
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
#include <asm/thread_info.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/cache.h>
|
||||
|
||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||
OUTPUT_ARCH(i386)
|
||||
@@ -135,7 +136,7 @@ SECTIONS
|
||||
__initramfs_start = .;
|
||||
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { *(.init.ramfs) }
|
||||
__initramfs_end = .;
|
||||
. = ALIGN(32);
|
||||
. = ALIGN(L1_CACHE_BYTES);
|
||||
__per_cpu_start = .;
|
||||
.data.percpu : AT(ADDR(.data.percpu) - LOAD_OFFSET) { *(.data.percpu) }
|
||||
__per_cpu_end = .;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# ia64/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -62,7 +65,7 @@ drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/
|
||||
|
||||
boot := arch/ia64/hp/sim/boot
|
||||
|
||||
.PHONY: boot compressed check
|
||||
PHONY += boot compressed check
|
||||
|
||||
all: compressed unwcheck
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#
|
||||
# m32r/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
|
||||
LDFLAGS :=
|
||||
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
|
||||
@@ -39,7 +42,7 @@ drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/
|
||||
|
||||
boot := arch/m32r/boot
|
||||
|
||||
.PHONY: zImage
|
||||
PHONY += zImage
|
||||
|
||||
all: zImage
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ CPPFLAGS_vmlinux.lds := -Upowerpc
|
||||
|
||||
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage vmlinux.bin
|
||||
|
||||
.PHONY: $(BOOT_TARGETS)
|
||||
PHONY += $(BOOT_TARGETS)
|
||||
|
||||
boot := arch/$(ARCH)/boot
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
|
||||
|
||||
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
|
||||
|
||||
.PHONY: $(BOOT_TARGETS)
|
||||
PHONY += $(BOOT_TARGETS)
|
||||
|
||||
all: uImage zImage
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
#
|
||||
# arch/ppc/boot/Makefile
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# This file is subject to the terms and conditions of the GNU General Public
|
||||
# License. See the file "COPYING" in the main directory of this archive
|
||||
# for more details.
|
||||
@@ -22,7 +28,7 @@ subdir- += simple openfirmware
|
||||
|
||||
hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree)
|
||||
|
||||
.PHONY: $(BOOT_TARGETS) $(bootdir-y)
|
||||
PHONY += $(BOOT_TARGETS) $(bootdir-y)
|
||||
|
||||
$(BOOT_TARGETS): $(bootdir-y)
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Makefile for making bootable images on various OpenFirmware machines.
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# Paul Mackerras January 1997
|
||||
# XCOFF bootable images for PowerMacs
|
||||
# Geert Uytterhoeven September 1997
|
||||
@@ -86,7 +89,7 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \
|
||||
|
||||
# The targets used on the make command-line
|
||||
|
||||
.PHONY: zImage zImage.initrd
|
||||
PHONY += zImage zImage.initrd
|
||||
zImage: $(images)/zImage.chrp \
|
||||
$(images)/zImage.chrp-rs6k
|
||||
@echo ' kernel: $@ is ready ($<)'
|
||||
@@ -96,7 +99,7 @@ zImage.initrd: $(images)/zImage.initrd.chrp \
|
||||
|
||||
TFTPIMAGE := /tftpboot/zImage
|
||||
|
||||
.PHONY: znetboot znetboot.initrd
|
||||
PHONY += znetboot znetboot.initrd
|
||||
znetboot: $(images)/zImage.chrp
|
||||
cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END)
|
||||
@echo ' kernel: $@ is ready ($<)'
|
||||
|
||||
@@ -172,7 +172,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/MARKER
|
||||
|
||||
archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach
|
||||
|
||||
.PHONY: maketools FORCE
|
||||
PHONY += maketools FORCE
|
||||
maketools: include/linux/version.h FORCE
|
||||
$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#
|
||||
#
|
||||
# This file is included by the global makefile so that you can add your own
|
||||
# architecture-specific flags and dependencies.
|
||||
#
|
||||
# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
||||
# Licensed under the GPL
|
||||
#
|
||||
@@ -88,7 +91,7 @@ CONFIG_KERNEL_HALF_GIGS ?= 0
|
||||
|
||||
SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
|
||||
|
||||
.PHONY: linux
|
||||
PHONY += linux
|
||||
|
||||
all: linux
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user