diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 11 insertions, 28 deletions
@@ -776,14 +776,14 @@ $(vmlinux-dirs): prepare-all scripts | |||
776 | # A multi level approach is used. prepare1 is updated first, then prepare0. | 776 | # A multi level approach is used. prepare1 is updated first, then prepare0. |
777 | # prepare-all is the collection point for the prepare targets. | 777 | # prepare-all is the collection point for the prepare targets. |
778 | 778 | ||
779 | .PHONY: prepare-all prepare prepare0 prepare1 prepare2 | 779 | .PHONY: prepare-all prepare prepare0 prepare1 prepare2 prepare3 |
780 | 780 | ||
781 | # prepare2 is used to check if we are building in a separate output directory, | 781 | # prepare3 is used to check if we are building in a separate output directory, |
782 | # and if so do: | 782 | # and if so do: |
783 | # 1) Check that make has not been executed in the kernel src $(srctree) | 783 | # 1) Check that make has not been executed in the kernel src $(srctree) |
784 | # 2) Create the include2 directory, used for the second asm symlink | 784 | # 2) Create the include2 directory, used for the second asm symlink |
785 | 785 | ||
786 | prepare2: | 786 | prepare3: |
787 | ifneq ($(KBUILD_SRC),) | 787 | ifneq ($(KBUILD_SRC),) |
788 | @echo ' Using $(srctree) as source for kernel' | 788 | @echo ' Using $(srctree) as source for kernel' |
789 | $(Q)if [ -f $(srctree)/.config ]; then \ | 789 | $(Q)if [ -f $(srctree)/.config ]; then \ |
@@ -795,18 +795,21 @@ ifneq ($(KBUILD_SRC),) | |||
795 | $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm | 795 | $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm |
796 | endif | 796 | endif |
797 | 797 | ||
798 | # prepare1 creates a makefile if using a separate output directory | 798 | # prepare2 creates a makefile if using a separate output directory |
799 | prepare1: prepare2 outputmakefile | 799 | prepare2: prepare3 outputmakefile |
800 | 800 | ||
801 | prepare0: prepare1 include/linux/version.h include/asm \ | 801 | prepare1: prepare2 include/linux/version.h include/asm \ |
802 | include/config/MARKER | 802 | include/config/MARKER |
803 | ifneq ($(KBUILD_MODULES),) | 803 | ifneq ($(KBUILD_MODULES),) |
804 | $(Q)rm -rf $(MODVERDIR) | 804 | $(Q)rm -rf $(MODVERDIR) |
805 | $(Q)mkdir -p $(MODVERDIR) | 805 | $(Q)mkdir -p $(MODVERDIR) |
806 | endif | 806 | endif |
807 | 807 | ||
808 | prepare0: prepare prepare1 FORCE | ||
809 | $(Q)$(MAKE) $(build)=$(srctree) | ||
810 | |||
808 | # All the preparing.. | 811 | # All the preparing.. |
809 | prepare-all: prepare0 prepare | 812 | prepare-all: prepare0 |
810 | 813 | ||
811 | # Leave this as default for preprocessing vmlinux.lds.S, which is now | 814 | # Leave this as default for preprocessing vmlinux.lds.S, which is now |
812 | # done in arch/$(ARCH)/kernel/Makefile | 815 | # done in arch/$(ARCH)/kernel/Makefile |
@@ -949,26 +952,6 @@ modules modules_install: FORCE | |||
949 | 952 | ||
950 | endif # CONFIG_MODULES | 953 | endif # CONFIG_MODULES |
951 | 954 | ||
952 | # Generate asm-offsets.h | ||
953 | # --------------------------------------------------------------------------- | ||
954 | |||
955 | define filechk_gen-asm-offsets | ||
956 | (set -e; \ | ||
957 | echo "#ifndef __ASM_OFFSETS_H__"; \ | ||
958 | echo "#define __ASM_OFFSETS_H__"; \ | ||
959 | echo "/*"; \ | ||
960 | echo " * DO NOT MODIFY."; \ | ||
961 | echo " *"; \ | ||
962 | echo " * This file was generated by arch/$(ARCH)/Makefile"; \ | ||
963 | echo " *"; \ | ||
964 | echo " */"; \ | ||
965 | echo ""; \ | ||
966 | sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ | ||
967 | echo ""; \ | ||
968 | echo "#endif" ) | ||
969 | endef | ||
970 | |||
971 | |||
972 | ### | 955 | ### |
973 | # Cleaning is done on three levels. | 956 | # Cleaning is done on three levels. |
974 | # make clean Delete most generated files | 957 | # make clean Delete most generated files |
@@ -991,7 +974,7 @@ MRPROPER_FILES += .config .config.old include/asm .version \ | |||
991 | # | 974 | # |
992 | clean: rm-dirs := $(CLEAN_DIRS) | 975 | clean: rm-dirs := $(CLEAN_DIRS) |
993 | clean: rm-files := $(CLEAN_FILES) | 976 | clean: rm-files := $(CLEAN_FILES) |
994 | clean-dirs := $(addprefix _clean_,$(vmlinux-alldirs)) | 977 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) |
995 | 978 | ||
996 | .PHONY: $(clean-dirs) clean archclean | 979 | .PHONY: $(clean-dirs) clean archclean |
997 | $(clean-dirs): | 980 | $(clean-dirs): |