ab9f36f241bd736e79b06aff04b7ea2fb84e99f2
[openwrt.git] / toolchain / kernel-headers / Makefile
1 include $(TOPDIR)/rules.mk
2
3 # linux kernel headers for toolchain
4
5 LINUX_HEADERS_VERSION=2.4.30
6 LINUX_KERNEL_MD5SUM:=75d8ce40a3668603017cd186909efe8d
7 LINUX_HEADERS_SITE=http://www.fi.kernel.org/pub/linux/kernel/v2.4 \
8 http://www.fr.kernel.org/pub/linux/kernel/v2.4 \
9 http://www.kernel.org/pub/linux/kernel/v2.4 \
10 http://www.de.kernel.org/pub/linux/kernel/v2.4
11
12 LINUX_HEADERS_SOURCE=linux-$(LINUX_HEADERS_VERSION).tar.bz2
13 LINUX_HEADERS_ARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
14 -e 's/mipsel/mips/' \
15 -e 's/powerpc/ppc/' \
16 -e 's/sh[234]/sh/' \
17 )
18
19 $(DL_DIR)/$(LINUX_HEADERS_SOURCE):
20 -mkdir -p $(DL_DIR)
21 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(LINUX_HEADERS_SOURCE) $(LINUX_KERNEL_MD5SUM) $(LINUX_HEADERS_SITE)
22
23 $(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
24 mkdir -p $(TOOL_BUILD_DIR)
25 bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - \
26 linux-$(LINUX_HEADERS_VERSION)/include \
27 linux-$(LINUX_HEADERS_VERSION)/Makefile \
28 linux-$(LINUX_HEADERS_VERSION)/Rules.make \
29 linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/Makefile \
30 linux-$(LINUX_HEADERS_VERSION)/scripts \
31 linux-$(LINUX_HEADERS_VERSION)/arch/$(LINUX_HEADERS_ARCH)/config*.in \
32 linux-$(LINUX_HEADERS_VERSION)/*/*/Config.in \
33 linux-$(LINUX_HEADERS_VERSION)/*/Config.in
34 ln -sf $(LINUX_HEADERS_DIR)-$(LINUX_HEADERS_VERSION) $(LINUX_HEADERS_DIR)
35 $(SED) 's/@expr length/@-expr length/' $(LINUX_HEADERS_DIR)/Makefile
36 touch $(LINUX_HEADERS_DIR)/.unpacked
37
38 $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_DIR)/.unpacked
39 -cp -af config.$(LINUX_HEADERS_ARCH) $(LINUX_HEADERS_DIR)/.config
40 $(MAKE) -C $(LINUX_HEADERS_DIR) ARCH=$(LINUX_HEADERS_ARCH) oldconfig include/linux/version.h
41 touch $(LINUX_HEADERS_DIR)/.configured
42
43 source: $(DL_DIR)/$(LINUX_HEADERS_SOURCE)
44 prepare: $(LINUX_HEADERS_DIR)/.configured
45 compile:
46 install:
47 clean:
48 rm -rf $(LINUX_HEADERS_DIR)
49
This page took 0.045672 seconds and 3 git commands to generate.