diff options
-rw-r--r-- | Makefile | 39 |
1 files changed, 23 insertions, 16 deletions
@@ -1010,36 +1010,43 @@ firmware_install: FORCE | |||
1010 | 1010 | ||
1011 | # --------------------------------------------------------------------------- | 1011 | # --------------------------------------------------------------------------- |
1012 | # Kernel headers | 1012 | # Kernel headers |
1013 | INSTALL_HDR_PATH=$(objtree)/usr | ||
1014 | export INSTALL_HDR_PATH | ||
1015 | 1013 | ||
1016 | HDRFILTER=generic i386 x86_64 | 1014 | #Default location for installed headers |
1017 | HDRARCHES=$(filter-out $(HDRFILTER),$(patsubst $(srctree)/include/asm-%/Kbuild,%,$(wildcard $(srctree)/include/asm-*/Kbuild))) | 1015 | export INSTALL_HDR_PATH = $(objtree)/usr |
1018 | 1016 | ||
1019 | PHONY += headers_install_all | 1017 | hdr-filter := generic um ppc |
1020 | headers_install_all: include/linux/version.h scripts_basic FORCE | 1018 | hdr-archs := $(filter-out $(hdr-filter), \ |
1019 | $(patsubst $(srctree)/include/asm-%/Kbuild,%, \ | ||
1020 | $(wildcard $(srctree)/include/asm-*/Kbuild))) | ||
1021 | hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj | ||
1022 | |||
1023 | PHONY += __headers | ||
1024 | __headers: include/linux/version.h scripts_basic FORCE | ||
1021 | $(Q)$(MAKE) $(build)=scripts scripts/unifdef | 1025 | $(Q)$(MAKE) $(build)=scripts scripts/unifdef |
1022 | $(Q)for arch in $(HDRARCHES); do \ | 1026 | |
1023 | $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch ;\ | 1027 | PHONY += headers_install_all |
1028 | headers_install_all: __headers | ||
1029 | $(Q)for arch in $(hdr-archs); do \ | ||
1030 | $(MAKE) ARCH=$$arch $(hdr-inst)=include BIASMDIR=-bi-$$arch ;\ | ||
1024 | done | 1031 | done |
1025 | 1032 | ||
1026 | PHONY += headers_install | 1033 | PHONY += headers_install |
1027 | headers_install: include/linux/version.h scripts_basic FORCE | 1034 | headers_install: __headers |
1028 | @if [ ! -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \ | 1035 | $(Q)if [ ! -r $(srctree)/include/asm-$(SRCARCH)/Kbuild ]; then \ |
1029 | echo '*** Error: Headers not exportable for this architecture ($(SRCARCH))'; \ | 1036 | echo '*** Error: Headers not exportable for this architecture ($(SRCARCH))'; \ |
1030 | exit 1 ; fi | 1037 | exit 1 ; \ |
1031 | $(Q)$(MAKE) $(build)=scripts scripts/unifdef | 1038 | fi |
1032 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include | 1039 | $(Q)$(MAKE) $(hdr-inst)=include ARCH=$(SRCARCH) |
1033 | 1040 | ||
1034 | PHONY += headers_check_all | 1041 | PHONY += headers_check_all |
1035 | headers_check_all: headers_install_all | 1042 | headers_check_all: headers_install_all |
1036 | $(Q)for arch in $(HDRARCHES); do \ | 1043 | $(Q)for arch in $(hdr-archs); do \ |
1037 | $(MAKE) ARCH=$$arch -f $(srctree)/scripts/Makefile.headersinst obj=include BIASMDIR=-bi-$$arch HDRCHECK=1 ;\ | 1044 | $(MAKE) ARCH=$$arch $(hdr-inst)=include BIASMDIR=-bi-$$arch HDRCHECK=1 ;\ |
1038 | done | 1045 | done |
1039 | 1046 | ||
1040 | PHONY += headers_check | 1047 | PHONY += headers_check |
1041 | headers_check: headers_install | 1048 | headers_check: headers_install |
1042 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.headersinst ARCH=$(SRCARCH) obj=include HDRCHECK=1 | 1049 | $(Q)$(MAKE) $(hdr-inst)=include ARCH=$(SRCARCH) HDRCHECK=1 |
1043 | 1050 | ||
1044 | # --------------------------------------------------------------------------- | 1051 | # --------------------------------------------------------------------------- |
1045 | # Modules | 1052 | # Modules |