1 # linux kernel headers for toolchain
3 LINUX_HEADERS_VERSION
=2.4.29
4 LINUX_KERNEL_MD5SUM
:=fcf8b6bb620467f27b657c1c4a60bbff
5 LINUX_HEADERS_SITE
=http
://www.fi.kernel.org
/pub
/linux
/kernel
/v2.4 \
6 http
://www.fr.kernel.org
/pub
/linux
/kernel
/v2.4 \
7 http
://www.kernel.org
/pub
/linux
/kernel
/v2.4 \
8 http
://www.de.kernel.org
/pub
/linux
/kernel
/v2.4
9 LINUX_HEADERS_SOURCE
=linux-
$(LINUX_HEADERS_VERSION
).
tar.bz2
10 LINUX_HEADERS_CONFIG
=.
/linux.config
11 LINUX_HEADERS_ARCH
:=$(shell echo
$(ARCH
) | sed
-e
's/i[3-9]86/i386/' \
17 $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
):
19 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(LINUX_HEADERS_SOURCE
) $(LINUX_KERNEL_MD5SUM
) $(LINUX_HEADERS_SITE
)
21 $(LINUX_HEADERS_DIR
)/.unpacked
: $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
)
22 mkdir
-p
$(TOOL_BUILD_DIR
)
23 bzcat
$(DL_DIR
)/$(LINUX_HEADERS_SOURCE
) |
tar -C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) - \
24 linux-
$(LINUX_HEADERS_VERSION
)/include \
25 linux-
$(LINUX_HEADERS_VERSION
)/Makefile \
26 linux-
$(LINUX_HEADERS_VERSION
)/Rules.make \
27 linux-
$(LINUX_HEADERS_VERSION
)/arch
/$(LINUX_HEADERS_ARCH
)/Makefile \
28 linux-
$(LINUX_HEADERS_VERSION
)/scripts \
29 linux-
$(LINUX_HEADERS_VERSION
)/arch
/$(LINUX_HEADERS_ARCH
)/config
*.in \
30 linux-
$(LINUX_HEADERS_VERSION
)/*/*/Config.in \
31 linux-
$(LINUX_HEADERS_VERSION
)/*/Config.in
32 ln
-sf
$(LINUX_HEADERS_DIR
)-$(LINUX_HEADERS_VERSION
) $(LINUX_HEADERS_DIR
)
33 $(SED
) 's/@expr length/@-expr length/' $(LINUX_HEADERS_DIR
)/Makefile
34 touch
$(LINUX_HEADERS_DIR
)/.unpacked
36 $(LINUX_HEADERS_DIR
)/.configured
: $(LINUX_HEADERS_DIR
)/.unpacked
37 -cp
-af
$(LINUX_HEADERS_CONFIG
) $(LINUX_HEADERS_DIR
)/.config
38 $(MAKE
) -C
$(LINUX_HEADERS_DIR
) ARCH
=$(LINUX_HEADERS_ARCH
) oldconfig
include/linux
/version.h
39 touch
$(LINUX_HEADERS_DIR
)/.configured
41 kernel-headers
: $(LINUX_HEADERS_DIR
)/.configured
43 kernel-headers-source
: $(DL_DIR
)/$(LINUX_HEADERS_SOURCE
)
45 kernel-headers-clean
: clean
46 rm -rf
$(LINUX_HEADERS_DIR
)
48 kernel-headers-toolclean
:
49 rm -rf
$(LINUX_HEADERS_DIR
)