- endef
-else
- define Build/Prepare/all
- mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include
- cp -pLR \
- $(BUILD_DIR_TOOLCHAIN)/linux/include/asm \
- $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-generic \
- $(BUILD_DIR_TOOLCHAIN)/linux/include/asm-$(LINUX_KARCH) \
- $(BUILD_DIR_TOOLCHAIN)/linux/include/linux \
- $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
- endef
-endif
-
-define Build/Prepare
- $(call Kernel/Prepare/Default)
- $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
- ln -sf linux-$(LINUX_VERSION) $(LINUX_HEADERS_DIR)
- yes '' | $(KMAKE) oldconfig
- $(KMAKE) include/linux/version.h include/asm
- if [ -d $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
+ if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
+ mkdir -p $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH); \