2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
9 PKG_NAME
=kernel-headers
12 PKG_SOURCE
=linux-
$(PKG_VERSION
).
tar.bz2
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
20 PKG_BUILD_DIR
:=$(TOOL_BUILD_DIR
)/linux-
$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/host-build.mk
24 LINUX_KARCH
:=$(shell echo
$(ARCH
) | sed
-e
's/i[3-9]86/i386/' \
33 mkdir
-p
$(TOOL_BUILD_DIR
)
34 bzcat
$(DL_DIR
)/$(PKG_SOURCE
) |
tar --wildcards
-C
$(TOOL_BUILD_DIR
) $(TAR_OPTIONS
) - \
35 linux-
$(PKG_VERSION
)/include \
36 linux-
$(PKG_VERSION
)/Makefile \
37 linux-
$(PKG_VERSION
)/Rules.make \
38 linux-
$(PKG_VERSION
)/arch
/$(LINUX_KARCH
)/Makefile \
39 linux-
$(PKG_VERSION
)/scripts \
40 linux-
$(PKG_VERSION
)/arch
/$(LINUX_KARCH
)/config
*.in \
41 linux-
$(PKG_VERSION
)/*/*/Config.in \
42 linux-
$(PKG_VERSION
)/*/Config.in
43 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
44 $(SED
) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR
)/Makefile
45 ln
-sf
$(PKG_BUILD_DIR
) $(LINUX_HEADERS_DIR
)
48 define Build
/Configure
49 -$(CP
) .
/files
/config.
$(LINUX_KARCH
) $(PKG_BUILD_DIR
)/.config
50 $(MAKE
) -C
$(PKG_BUILD_DIR
) ARCH
=$(LINUX_KARCH
) oldconfig
include/linux
/version.h
59 $(eval
$(call HostBuild
))