[PATCH 1/2] kernel: add kmod-crypto-ipsec
[openwrt.git] / toolchain / kernel-headers / Makefile
index fba3cc8..2a90e3d 100644 (file)
@@ -31,9 +31,7 @@ ifeq ($(strip $(BOARD)),uml)
   LINUX_KARCH:=$(subst x86_64,x86,$(subst i386,x86,$(ARCH)))
 endif
 
-ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.18)),1)
-  LINUX_HAS_HEADERS_INSTALL:=y
-endif
+LINUX_HAS_HEADERS_INSTALL:=y
 
 KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
        ARCH=$(LINUX_KARCH) \
@@ -43,45 +41,30 @@ KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
        KBUILD_HAVE_NLS=no \
        CONFIG_SHELL=$(BASH)
 
-ifneq ($(LINUX_HAS_HEADERS_INSTALL),)
-  define Host/Prepare/all
-       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr
+define Host/Prepare/all
+       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev
        $(KMAKE) \
-               INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/" \
+               INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \
                headers_install
-       if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
-               mkdir -p $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH)
-               $(CP) \
-                       $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \
-                       $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \
-       fi
-  endef
-else
-  define Host/Prepare/all
-       $(KMAKE) include/linux/version.h include/asm
-       mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include
-       cp -pLR $(HOST_BUILD_DIR)/include/asm $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/asm-generic $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH) $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-       cp -pLR $(HOST_BUILD_DIR)/include/linux $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
-  endef
-endif
+endef
 
 # XXX: the following is needed to build lzma-loader
-define Host/Prepare/lzma
+ifneq ($(CONFIG_mips)$(CONFIG_mipsel),)
+  define Host/Prepare/lzma
        $(CP) \
-               $(HOST_BUILD_DIR)/include/asm-mips/asm.h \
-               $(HOST_BUILD_DIR)/include/asm-mips/regdef.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
-endef
+               $(HOST_BUILD_DIR)/arch/mips/include/asm/asm.h \
+               $(HOST_BUILD_DIR)/arch/mips/include/asm/regdef.h \
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
+  endef
+endif
 
 define Host/Prepare/post/cris
        $(CP) \
                $(HOST_BUILD_DIR)/include/linux/user.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/linux/
-       ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch-v10/arch \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch
-       $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/user.h
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/linux/
+       ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch-v10/arch \
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/arch
+       $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/user.h
 endef
 
 define Host/Prepare/post/ubicom32
@@ -90,7 +73,7 @@ define Host/Prepare/post/ubicom32
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/user.h \
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page.h \
                $(HOST_BUILD_DIR)/arch/ubicom32/include/asm/page_offset.h \
-               $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
+               $(BUILD_DIR_TOOLCHAIN)/linux-dev/include/asm/
 endef
 
 define Host/Prepare/post/mips
This page took 0.027807 seconds and 4 git commands to generate.