create /etc/xinetd.d used by includedir in /etc/xinetd.conf
[openwrt.git] / obsolete-buildroot / make / kernel-headers.mk
1 #############################################################
2 #
3 # Setup the kernel headers. I include a generic package of
4 # kernel headers here, so you shouldn't need to include your
5 # own. Be aware these kernel headers _will_ get blown away
6 # by a 'make clean' so don't put anything sacred in here...
7 #
8 #############################################################
9 ifneq ($(filter $(TARGETS),kernel-headers),)
10
11 VERSION=2
12 PATCHLEVEL=4
13 SUBLEVEL=25
14 LINUX_SITE:=http://www.uclibc.org/downloads/toolchain
15 LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2
16 LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux
17
18
19 # Uncomment this for 2.6.x kernel header files
20 #VERSION=2
21 #PATCHLEVEL=6
22 #SUBLEVEL=5
23 #LINUX_SITE:=http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
24 #LINUX_SOURCE:=linux-libc-headers-2.6.5.0.tar.bz2
25 #LINUX_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.5.0
26
27
28
29 LINUX_DIR:=$(TOOL_BUILD_DIR)/linux
30
31 $(DL_DIR)/$(LINUX_SOURCE):
32 $(WGET) -P $(DL_DIR) $(LINUX_SITE)/$(LINUX_SOURCE)
33
34 $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
35 mkdir -p $(TOOL_BUILD_DIR)
36 bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(TOOL_BUILD_DIR) -xvf -
37 ifneq ($(LINUX_UNPACK_DIR),$(LINUX_DIR))
38 mv $(LINUX_UNPACK_DIR) $(LINUX_DIR)
39 endif
40 touch $(LINUX_DIR)/.unpacked
41
42 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.unpacked
43 rm -f $(LINUX_DIR)/include/asm
44 @if [ ! -f $(LINUX_DIR)/Makefile ] ; then \
45 echo -e "VERSION = $(VERSION)\nPATCHLEVEL = $(PATCHLEVEL)\n" > \
46 $(LINUX_DIR)/Makefile; \
47 echo -e "SUBLEVEL = $(SUBLEVEL)\nEXTRAVERSION =\n" > \
48 $(LINUX_DIR)/Makefile; \
49 echo -e "KERNELRELEASE=\$$(VERSION).\$$(PATCHLEVEL).\$$(SUBLEVEL)\$$(EXTRAVERSION)" >> \
50 $(LINUX_DIR)/Makefile; \
51 fi;
52 @if [ "$(ARCH)" = "powerpc" ];then \
53 (cd $(LINUX_DIR)/include; ln -fs asm-ppc$(NOMMU) asm;) \
54 elif [ "$(ARCH)" = "mips" ];then \
55 (cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
56 elif [ "$(ARCH)" = "mipsel" ];then \
57 (cd $(LINUX_DIR)/include; ln -fs asm-mips$(NOMMU) asm;) \
58 elif [ "$(ARCH)" = "arm" ];then \
59 (cd $(LINUX_DIR)/include; ln -fs asm-arm$(NOMMU) asm; \
60 cd asm; \
61 if [ ! -L proc ] ; then \
62 ln -fs proc-armv proc; \
63 ln -fs arch-ebsa285 arch; fi); \
64 elif [ "$(ARCH)" = "cris" ];then \
65 (cd $(LINUX_DIR)/include; ln -fs asm-cris asm;) \
66 else \
67 (cd $(LINUX_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \
68 fi
69 touch $(LINUX_DIR)/include/linux/autoconf.h;
70 touch $(LINUX_DIR)/.configured
71
72 $(LINUX_KERNEL): $(LINUX_DIR)/.configured
73
74 kernel-headers: $(LINUX_DIR)/.configured
75
76 kernel-headers-source: $(DL_DIR)/$(LINUX_SOURCE)
77
78 kernel-headers-clean: clean
79 rm -f $(LINUX_KERNEL)
80 rm -rf $(LINUX_DIR)
81
82 kernel-headers-dirclean:
83 rm -rf $(LINUX_DIR)
84
85 endif
This page took 0.053117 seconds and 5 git commands to generate.