ia64/xen-unstable

view xenolinux-2.4.22-sparse/Makefile @ 747:885d2d2dbb61

bitkeeper revision 1.447 (3f6b4a5bx66eWPkM9ZVWGugRdLunrg)

typos
author iap10@labyrinth.cl.cam.ac.uk
date Fri Sep 19 18:26:35 2003 +0000 (2003-09-19)
parents 86f8a7112ba1
children 8e10a7fe0e35 8056e86b0cf7
line source
1 VERSION = 2
2 PATCHLEVEL = 4
3 SUBLEVEL = 22
4 EXTRAVERSION = -xeno
6 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
8 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
10 # Xeno hack XXX
11 ARCH := xeno
12 SUBARCH := i386
14 KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
16 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
17 else if [ -x /bin/bash ]; then echo /bin/bash; \
18 else echo sh; fi ; fi)
19 TOPDIR := $(shell /bin/pwd)
21 HPATH = $(TOPDIR)/include
22 FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
24 HOSTCC = gcc
25 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
27 CROSS_COMPILE =
29 #
30 # Include the make variables (CC, etc...)
31 #
33 AS = $(CROSS_COMPILE)as
34 LD = $(CROSS_COMPILE)ld
35 CC = $(CROSS_COMPILE)gcc
36 CPP = $(CC) -E
37 AR = $(CROSS_COMPILE)ar
38 NM = $(CROSS_COMPILE)nm
39 STRIP = $(CROSS_COMPILE)strip
40 OBJCOPY = $(CROSS_COMPILE)objcopy
41 OBJDUMP = $(CROSS_COMPILE)objdump
42 MAKEFILES = $(TOPDIR)/.config
43 GENKSYMS = /sbin/genksyms
44 DEPMOD = /sbin/depmod
45 MODFLAGS = -DMODULE
46 CFLAGS_KERNEL =
47 PERL = perl
48 AWK = awk
49 RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
50 else echo rpm; fi)
52 export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
53 CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
54 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
56 all: do-it-all
58 #
59 # Make "config" the default target if there is no configuration file or
60 # "depend" the target if there is no top-level dependency information.
61 #
63 ifeq (.config,$(wildcard .config))
64 include .config
65 ifeq (.depend,$(wildcard .depend))
66 include .depend
67 do-it-all: Version vmlinux
68 else
69 CONFIGURATION = depend
70 do-it-all: depend
71 endif
72 else
73 CONFIGURATION = config
74 do-it-all: config
75 endif
77 #
78 # INSTALL_PATH specifies where to place the updated kernel and system map
79 # images. Uncomment if you want to place them anywhere other than root.
80 #
82 #export INSTALL_PATH=/boot
84 #
85 # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
86 # relocations required by build roots. This is not defined in the
87 # makefile but the arguement can be passed to make if needed.
88 #
90 MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
91 export MODLIB
93 #
94 # standard CFLAGS
95 #
97 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
99 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
100 -fno-strict-aliasing -fno-common
101 ifndef CONFIG_FRAME_POINTER
102 CFLAGS += -fomit-frame-pointer
103 endif
104 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
106 #
107 # ROOT_DEV specifies the default root-device when making the image.
108 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
109 # the default of FLOPPY is used by 'build'.
110 # This is i386 specific.
111 #
113 export ROOT_DEV = CURRENT
115 #
116 # If you want to preset the SVGA mode, uncomment the next line and
117 # set SVGA_MODE to whatever number you want.
118 # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
119 # The number is the same as you would ordinarily press at bootup.
120 # This is i386 specific.
121 #
123 export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
125 #
126 # If you want the RAM disk device, define this to be the size in blocks.
127 # This is i386 specific.
128 #
130 #export RAMDISK = -DRAMDISK=512
132 CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
133 NETWORKS =net/network.o
135 LIBS =$(TOPDIR)/lib/lib.a
136 SUBDIRS =kernel drivers mm fs net ipc lib crypto
138 DRIVERS-n :=
139 DRIVERS-y :=
140 DRIVERS-m :=
141 DRIVERS- :=
143 DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
144 DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
145 DRIVERS-y += drivers/char/char.o \
146 drivers/block/block.o \
147 drivers/misc/misc.o \
148 drivers/net/net.o
149 DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
150 DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
151 DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
152 DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
153 DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
154 DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
155 DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
156 DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
157 DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
158 DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
159 DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
160 DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
161 DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
162 DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
163 DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
165 ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
166 DRIVERS-y += drivers/cdrom/driver.o
167 endif
169 DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
170 DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
171 DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
172 DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
173 DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
174 DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
175 DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
176 DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
177 DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
178 DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
179 DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
180 DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
181 DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
182 DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
183 DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
184 DRIVERS-$(CONFIG_VT) += drivers/video/video.o
185 DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
186 DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
187 DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
188 DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
189 DRIVERS-y +=drivers/media/media.o
190 DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
191 DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
192 DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
193 DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
194 DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
195 DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
196 DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
197 DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
198 DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
199 DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
200 DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
201 DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
203 DRIVERS := $(DRIVERS-y)
206 # files removed with 'make clean'
207 CLEAN_FILES = \
208 kernel/ksyms.lst include/linux/compile.h \
209 vmlinux System.map \
210 .tmp* \
211 drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
212 drivers/char/conmakehash \
213 drivers/char/drm/*-mod.c \
214 drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
215 drivers/zorro/devlist.h drivers/zorro/gen-devlist \
216 drivers/sound/bin2hex drivers/sound/hex2hex \
217 drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
218 drivers/scsi/aic7xxx/aicasm/aicasm \
219 drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
220 drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
221 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
222 drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
223 drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
224 drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
225 drivers/scsi/aic7xxx/aicasm/aicdb.h \
226 drivers/scsi/aic7xxx/aicasm/y.tab.h \
227 drivers/scsi/53c700_d.h \
228 net/khttpd/make_times_h \
229 net/khttpd/times.h \
230 submenu*
231 # directories removed with 'make clean'
232 CLEAN_DIRS = \
233 modules
235 # files removed with 'make mrproper'
236 MRPROPER_FILES = \
237 include/linux/autoconf.h include/linux/version.h \
238 lib/crc32table.h lib/gen_crc32table \
239 drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
240 drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
241 drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
242 drivers/net/hamradio/soundmodem/gentbl \
243 drivers/sound/*_boot.h drivers/sound/.*.boot \
244 drivers/sound/msndinit.c \
245 drivers/sound/msndperm.c \
246 drivers/sound/pndsperm.c \
247 drivers/sound/pndspini.c \
248 drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
249 .version .config* config.in config.old \
250 scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
251 scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
252 .menuconfig.log \
253 include/asm \
254 .hdepend scripts/mkdep scripts/split-include scripts/docproc \
255 $(TOPDIR)/include/linux/modversions.h \
256 kernel.spec
258 # directories removed with 'make mrproper'
259 MRPROPER_DIRS = \
260 include/config \
261 $(TOPDIR)/include/linux/modules
264 include arch/$(ARCH)/Makefile
266 # Extra cflags for kbuild 2.4. The default is to forbid includes by kernel code
267 # from user space headers. Some UML code requires user space headers, in the
268 # UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make. No
269 # other kernel code should include user space headers, if you need
270 # 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
271 # then your code is broken! KAO.
273 kbuild_2_4_nostdinc := -nostdinc -iwithprefix include
274 export kbuild_2_4_nostdinc
276 export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
278 export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
280 .S.s:
281 $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
282 .S.o:
283 $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
285 Version: dummy
286 @rm -f include/linux/compile.h
288 boot: vmlinux
289 @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
291 vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
292 $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
293 --start-group \
294 $(CORE_FILES) \
295 $(DRIVERS) \
296 $(NETWORKS) \
297 $(LIBS) \
298 --end-group \
299 -o vmlinux
300 $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
302 symlinks:
303 rm -f include/asm
304 ( cd include ; ln -sf asm-$(ARCH) asm)
305 @if [ ! -d include/linux/modules ]; then \
306 mkdir include/linux/modules; \
307 fi
309 oldconfig: symlinks
310 $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
312 xconfig: symlinks
313 $(MAKE) -C scripts kconfig.tk
314 wish -f scripts/kconfig.tk
316 menuconfig: include/linux/version.h symlinks
317 $(MAKE) -C scripts/lxdialog all
318 $(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
320 config: symlinks
321 $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
323 include/config/MARKER: scripts/split-include include/linux/autoconf.h
324 scripts/split-include include/linux/autoconf.h include/config
325 @ touch include/config/MARKER
327 linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
329 $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
330 $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
332 $(TOPDIR)/include/linux/version.h: include/linux/version.h
333 $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
335 newversion:
336 . scripts/mkversion > .tmpversion
337 @mv -f .tmpversion .version
339 uts_len := 64
340 uts_truncate := sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
342 include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
343 @echo -n \#`cat .version` > .ver1
344 @if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
345 @if [ -f .name ]; then echo -n \-`cat .name` >> .ver1; fi
346 @LANG=C echo ' '`date` >> .ver1
347 @echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
348 @LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
349 @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
350 @echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
351 @([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
352 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
353 echo > .ver1
354 @echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
355 @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
356 @mv -f .ver $@
357 @rm -f .ver1
359 include/linux/version.h: ./Makefile
360 @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
361 (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
362 @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
363 @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
364 @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
365 @mv -f .ver $@
367 comma := ,
369 init/version.o: init/version.c include/linux/compile.h include/config/MARKER
370 $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
372 init/main.o: init/main.c include/config/MARKER
373 $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
375 init/do_mounts.o: init/do_mounts.c include/config/MARKER
376 $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
378 fs lib mm ipc kernel drivers net: dummy
379 $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
381 TAGS: dummy
382 { find include/asm-${ARCH} -name '*.h' -print ; \
383 find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
384 find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
386 # Exuberant ctags works better with -I
387 tags: dummy
388 CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
389 ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
390 find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
391 find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
393 ifdef CONFIG_MODULES
394 ifdef CONFIG_MODVERSIONS
395 MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
396 endif
398 .PHONY: modules
399 modules: $(patsubst %, _mod_%, $(SUBDIRS))
401 .PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
402 $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
403 $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
405 .PHONY: modules_install
406 modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
408 .PHONY: _modinst_
409 _modinst_:
410 @rm -rf $(MODLIB)/kernel
411 @rm -f $(MODLIB)/build
412 @mkdir -p $(MODLIB)/kernel
413 @ln -s $(TOPDIR) $(MODLIB)/build
415 # If System.map exists, run depmod. This deliberately does not have a
416 # dependency on System.map since that would run the dependency tree on
417 # vmlinux. This depmod is only for convenience to give the initial
418 # boot a modules.dep even before / is mounted read-write. However the
419 # boot script depmod is the master version.
420 ifeq "$(strip $(INSTALL_MOD_PATH))" ""
421 depmod_opts :=
422 else
423 depmod_opts := -b $(INSTALL_MOD_PATH) -r
424 endif
425 .PHONY: _modinst_post
426 _modinst_post: _modinst_post_pcmcia
427 # if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
429 # Backwards compatibilty symlinks for people still using old versions
430 # of pcmcia-cs with hard coded pathnames on insmod. Remove
431 # _modinst_post_pcmcia for kernel 2.4.1.
432 .PHONY: _modinst_post_pcmcia
433 _modinst_post_pcmcia:
434 cd $(MODLIB); \
435 mkdir -p pcmcia; \
436 find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
438 .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
439 $(patsubst %, _modinst_%, $(SUBDIRS)) :
440 $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
442 # modules disabled....
444 else
445 modules modules_install: dummy
446 @echo
447 @echo "The present kernel configuration has modules disabled."
448 @echo "Type 'make config' and enable loadable module support."
449 @echo "Then build a kernel with module support enabled."
450 @echo
451 @exit 1
452 endif
454 clean: archclean
455 find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
456 | grep -v lxdialog/ | xargs rm -f
457 rm -f $(CLEAN_FILES)
458 rm -rf $(CLEAN_DIRS)
459 $(MAKE) -C Documentation/DocBook clean
461 mrproper: clean archmrproper
462 find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
463 rm -f $(MRPROPER_FILES)
464 rm -rf $(MRPROPER_DIRS)
465 $(MAKE) -C Documentation/DocBook mrproper
467 distclean: mrproper
468 rm -f core `find . \( -not -type d \) -and \
469 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
470 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
471 -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
473 backup: mrproper
474 cd .. && tar cf - linux/ | gzip -9 > backup.gz
475 sync
477 sgmldocs:
478 chmod 755 $(TOPDIR)/scripts/docgen
479 chmod 755 $(TOPDIR)/scripts/gen-all-syms
480 chmod 755 $(TOPDIR)/scripts/kernel-doc
481 $(MAKE) -C $(TOPDIR)/Documentation/DocBook books
483 psdocs: sgmldocs
484 $(MAKE) -C Documentation/DocBook ps
486 pdfdocs: sgmldocs
487 $(MAKE) -C Documentation/DocBook pdf
489 htmldocs: sgmldocs
490 $(MAKE) -C Documentation/DocBook html
492 mandocs:
493 chmod 755 $(TOPDIR)/scripts/kernel-doc
494 chmod 755 $(TOPDIR)/scripts/split-man
495 $(MAKE) -C Documentation/DocBook man
497 sums:
498 find . -type f -print | sort | xargs sum > .SUMS
500 dep-files: scripts/mkdep archdep include/linux/version.h
501 rm -f .depend .hdepend
502 $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
503 ifdef CONFIG_MODVERSIONS
504 $(MAKE) update-modverfile
505 endif
506 scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
507 scripts/mkdep -- init/*.c > .depend
509 ifdef CONFIG_MODVERSIONS
510 MODVERFILE := $(TOPDIR)/include/linux/modversions.h
511 else
512 MODVERFILE :=
513 endif
514 export MODVERFILE
516 depend dep: dep-files
518 checkconfig:
519 find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
521 checkhelp:
522 find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
524 checkincludes:
525 find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
527 ifdef CONFIGURATION
528 ..$(CONFIGURATION):
529 @echo
530 @echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
531 @echo
532 $(MAKE) $(CONFIGURATION)
533 @echo
534 @echo "Successful. Try re-making (ignore the error that follows)"
535 @echo
536 exit 1
538 #dummy: ..$(CONFIGURATION)
539 dummy:
541 else
543 dummy:
545 endif
547 include Rules.make
549 #
550 # This generates dependencies for the .h files.
551 #
553 scripts/mkdep: scripts/mkdep.c
554 $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
556 scripts/split-include: scripts/split-include.c
557 $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
559 #
560 # RPM target
561 #
562 # If you do a make spec before packing the tarball you can rpm -ta it
563 #
564 spec:
565 . scripts/mkspec >kernel.spec
567 #
568 # Build a tar ball, generate an rpm from it and pack the result
569 # There arw two bits of magic here
570 # 1) The use of /. to avoid tar packing just the symlink
571 # 2) Removing the .dep files as they have source paths in them that
572 # will become invalid
573 #
574 rpm: clean spec
575 find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
576 set -e; \
577 cd $(TOPDIR)/.. ; \
578 ln -sf $(TOPDIR) $(KERNELPATH) ; \
579 tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
580 rm $(KERNELPATH) ; \
581 cd $(TOPDIR) ; \
582 . scripts/mkversion > .version ; \
583 $(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
584 rm $(TOPDIR)/../$(KERNELPATH).tar.gz