[ar71xx] ag71xx driver: add OOM handler
[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 override CONFIG_AUTOREBUILD=
16
17 include $(INCLUDE_DIR)/kernel.mk
18
19 PKG_NAME:=linux
20 PKG_VERSION:=$(LINUX_VERSION)
21 PKG_SOURCE:=$(LINUX_SOURCE)
22 PKG_SOURCE_URL:=$(LINUX_SITE)
23 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
24 PKG_MD5SUM:=$(LINUX_KERNEL_MD5SUM)
25 LINUX_DIR := $(PKG_BUILD_DIR)
26
27 include $(INCLUDE_DIR)/host-build.mk
28 include $(INCLUDE_DIR)/kernel-defaults.mk
29
30 define Build/Configure/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)/include/asm-cris/arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
33 endef
34
35 define Build/Configure/powerpc
36 if [ -d $(PKG_BUILD_DIR)/include/asm-ppc ]; then \
37 $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/; \
38 rm -rf $(PKG_BUILD_DIR)/include/asm-ppc; \
39 ln -s $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc; \
40 fi
41 endef
42
43 ifneq (,$(findstring uml,$(BOARD)))
44 LINUX_KARCH:=$(ARCH)
45 endif
46
47 KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
48 ARCH=$(LINUX_KARCH) \
49 KBUILD_HAVE_NLS=no \
50 CONFIG_SHELL=$(BASH)
51
52 define Build/Prepare
53 $(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 if [ -d $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
59 $(CP) \
60 $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \
61 $(PKG_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \
62 fi
63 $(call Build/Configure/$(ARCH))
64 endef
65
66 define Build/Configure
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.045565 seconds and 5 git commands to generate.