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