only build in-kernel bcm43xx on broadcom targets
[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
9 KERNEL_BUILD_DIR := $(BUILD_DIR_TOOLCHAIN)
10 BUILD_DIR := $(KERNEL_BUILD_DIR)
11
12 STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
13 BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
14 override QUILT:=
15
16 include $(INCLUDE_DIR)/kernel.mk
17
18 PKG_NAME:=linux
19 PKG_VERSION:=$(LINUX_VERSION)
20 PKG_SOURCE:=$(LINUX_SOURCE)
21 PKG_SOURCE_URL:=$(LINUX_SITE)
22 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
23 PKG_MD5SUM:=$(LINUX_KERNEL_MD5SUM)
24 LINUX_DIR := $(PKG_BUILD_DIR)
25
26 include $(INCLUDE_DIR)/host-build.mk
27 include $(INCLUDE_DIR)/kernel-defaults.mk
28
29 define Build/Prepare/cris
30 mkdir -p $(BUILD_DIR_TOOLCHAIN)
31 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(HOST_TAR) -C $(BUILD_DIR_TOOLCHAIN) $(TAR_OPTIONS)
32 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/generic_2.6
33 $(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/cris
34 ln -sf arch-v10 $(PKG_BUILD_DIR)/include/asm-cris/arch
35 ln -sf arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
36 endef
37
38 define Build/Configure/powerpc
39 $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/
40 rm -rf $(PKG_BUILD_DIR)/include/asm-ppc
41 mv $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc
42 endef
43
44 ifneq (,$(findstring uml,$(BOARD)))
45 LINUX_KARCH:=$(ARCH)
46 endif
47
48 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
49 ARCH=$(LINUX_KARCH) \
50 CONFIG_SHELL=$(BASH)
51
52 define Build/Prepare
53 $(if $(Build/Prepare/$(ARCH)),$(Build/Prepare/$(ARCH)),$(call Kernel/Prepare/Default))
54 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
55 ln -sf linux-$(LINUX_VERSION) $(LINUX_HEADERS_DIR)
56 yes '' | $(KMAKE) oldconfig
57 $(KMAKE) include/linux/version.h include/asm
58 $(call Build/Configure/$(ARCH))
59 endef
60
61 define Build/Configure
62 endef
63
64 define Build/Compile
65 endef
66
67 define Build/Install
68 endef
69
70 $(eval $(call HostBuild))
This page took 0.044995 seconds and 5 git commands to generate.