Backport linux-atm api from 2.6.8.1 for brcm63xx
[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
18 include $(INCLUDE_DIR)/host-build.mk
19
20 define Build/Prepare
21 mkdir -p $(TOOLCHAIN_BUILD_DIR)
22 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(HOST_TAR) -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS)
23 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/generic-$(KERNEL)/patches
24 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
25 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
26 endef
27
28 define Build/Configure/powerpc
29 $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/
30 rm -rf $(PKG_BUILD_DIR)/include/asm-ppc
31 mv $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc
32 endef
33
34 ifneq (,$(findstring uml,$(BOARD)))
35 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
36 CONFIG_SHELL=$(BASH)
37 else
38 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
39 ARCH=$(LINUX_KARCH) \
40 CONFIG_SHELL=$(BASH)
41 endif
42
43 define Build/Configure
44 yes '' | $(KMAKE) oldconfig
45 $(KMAKE) include/linux/version.h include/asm
46 $(call Build/Configure/$(ARCH))
47 endef
48
49 define Build/Compile
50 endef
51
52 define Build/Install
53 endef
54
55 $(eval $(call HostBuild))
This page took 0.07022 seconds and 5 git commands to generate.