another one ...
[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 PKG_NAME=kernel-headers
10 PKG_VERSION=2.4.32
11
12 PKG_SOURCE=linux-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL= \
14 http://www.de.kernel.org/pub/linux/kernel/v2.4 \
15 http://www.fi.kernel.org/pub/linux/kernel/v2.4 \
16 http://www.fr.kernel.org/pub/linux/kernel/v2.4 \
17 http://www.kernel.org/pub/linux/kernel/v2.4
18 PKG_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
19
20 PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/host-build.mk
23
24 LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
25 -e 's/mipsel/mips/' \
26 -e 's/mipseb/mips/' \
27 -e 's/powerpc/ppc/' \
28 -e 's/sh[234]/sh/' \
29 -e 's/armeb/arm/' \
30 )
31
32
33 define Build/Prepare
34 mkdir -p $(TOOLCHAIN_BUILD_DIR)
35 bzcat $(DL_DIR)/$(PKG_SOURCE) | $(TAR) --wildcards -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS) \
36 linux-$(PKG_VERSION)/include \
37 linux-$(PKG_VERSION)/Makefile \
38 linux-$(PKG_VERSION)/Rules.make \
39 linux-$(PKG_VERSION)/arch/$(LINUX_KARCH)/Makefile \
40 linux-$(PKG_VERSION)/scripts \
41 linux-$(PKG_VERSION)/arch/$(LINUX_KARCH)/config*.in \
42 linux-$(PKG_VERSION)/*/*/Config.in \
43 linux-$(PKG_VERSION)/*/Config.in
44 $(PATCH) $(PKG_BUILD_DIR) ./patches
45 $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
46 ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
47 endef
48
49 define Build/Configure
50 -$(CP) ./files/config.$(LINUX_KARCH) $(PKG_BUILD_DIR)/.config
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 ARCH=$(LINUX_KARCH) \
53 CONFIG_SHELL=$(shell which bash) \
54 oldconfig include/linux/version.h
55 endef
56
57 define Build/Compile
58 endef
59
60 define Build/Install
61 endef
62
63 $(eval $(call HostBuild))
This page took 0.047408 seconds and 5 git commands to generate.