Added more essential NAS modules for NSLU2, NAS100d and DSMG600RevA profiles
[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 LINUX_DIR:=$(PKG_BUILD_DIR)
19 KERNEL_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)
20 override QUILT:=
21
22 include $(INCLUDE_DIR)/host-build.mk
23 include $(INCLUDE_DIR)/kernel-defaults.mk
24
25
26 define Build/Prepare/cris
27 mkdir -p $(TOOLCHAIN_BUILD_DIR)
28 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(HOST_TAR) -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS)
29 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/generic_2.6
30 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/cris
31 ln -sf $(PKG_BUILD_DIR)/include/asm-cris/arch-v10 $(PKG_BUILD_DIR)/include/asm-cris/arch
32 ln -sf $(PKG_BUILD_DIR)/arch/cris/arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
33 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
34 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
35 endef
36
37 ifdef Build/Prepare/$(ARCH)
38 define Build/Prepare
39 $(call Build/Prepare/$(ARCH))
40 endef
41 else
42 define Build/Prepare
43 $(call Kernel/Prepare/Default)
44 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
45 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
46 endef
47 endif
48
49 define Build/Configure/powerpc
50 $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/
51 rm -rf $(PKG_BUILD_DIR)/include/asm-ppc
52 mv $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc
53 endef
54
55 ifneq (,$(findstring uml,$(BOARD)))
56 LINUX_KARCH:=$(ARCH)
57 endif
58
59 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
60 ARCH=$(LINUX_KARCH) \
61 CONFIG_SHELL=$(BASH)
62
63 define Build/Configure
64 yes '' | $(KMAKE) oldconfig
65 $(KMAKE) include/linux/version.h include/asm
66 $(call Build/Configure/$(ARCH))
67 endef
68
69 define Build/Compile
70 endef
71
72 define Build/Install
73 endef
74
75 $(eval $(call HostBuild))
This page took 0.044332 seconds and 5 git commands to generate.