add kernel_headers dependency on target/linux/generic-2.*
[openwrt.git] / toolchain / kernel-headers / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/kernel.mk
9
10 PKG_NAME=kernel-headers
11 PKG_VERSION=$(LINUX_VERSION)
12
13 PKG_SOURCE=$(LINUX_SOURCE)
14 PKG_SOURCE_URL=$(LINUX_SITE)
15
16 PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux-$(PKG_VERSION)
17 PKG_FILE_DEPEND:=$(GENERIC_PLATFORM_DIR)
18
19 include $(INCLUDE_DIR)/host-build.mk
20
21 define Build/Prepare
22 mkdir -p $(TOOLCHAIN_BUILD_DIR)
23 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(HOST_TAR) -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS)
24 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/generic-$(KERNEL)/patches
25 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
26 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
27 endef
28
29 define Build/Configure/powerpc
30 $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/
31 rm -rf $(PKG_BUILD_DIR)/include/asm-ppc
32 mv $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc
33 endef
34
35 ifneq (,$(findstring uml,$(BOARD)))
36 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
37 ARCH=i386 \
38 CONFIG_SHELL=$(BASH)
39 else
40 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
41 ARCH=$(LINUX_KARCH) \
42 CONFIG_SHELL=$(BASH)
43 endif
44
45 define Build/Configure
46 yes '' | $(KMAKE) oldconfig
47 $(KMAKE) include/linux/version.h include/asm
48 $(call Build/Configure/$(ARCH))
49 endef
50
51 define Build/Compile
52 endef
53
54 define Build/Install
55 endef
56
57 $(eval $(call HostBuild))
This page took 0.041913 seconds and 5 git commands to generate.