ia64/xen-unstable

view xenolinux-2.4.16-sparse/Makefile @ 72:7c6228c9e98f

bitkeeper revision 1.7.3.47 (3e0ae5b3dvzaVNlhYDw9iW4oIXXB3A)

debug
author lynx@idefix.cl.cam.ac.uk
date Thu Dec 26 11:19:15 2002 +0000 (2002-12-26)
parents 1ef2026299c3
children 243ed70f18a7
line source
1 VERSION = 2
2 PATCHLEVEL = 4
3 SUBLEVEL = 16
4 EXTRAVERSION = -kdb-xeno
6 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
8 HW_ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
9 ifndef ARCH
10 ARCH := $(HW_ARCH)
11 endif
12 KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//")
14 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
15 else if [ -x /bin/bash ]; then echo /bin/bash; \
16 else echo sh; fi ; fi)
17 TOPDIR := $(shell /bin/pwd)
19 HPATH = $(TOPDIR)/include
20 FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
22 HOSTCC = gcc
23 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
25 CROSS_COMPILE =
27 #
28 # Include the make variables (CC, etc...)
29 #
31 AS = $(CROSS_COMPILE)as
32 LD = $(CROSS_COMPILE)ld
33 CC = $(CROSS_COMPILE)gcc
34 CPP = $(CC) -E
35 AR = $(CROSS_COMPILE)ar
36 NM = $(CROSS_COMPILE)nm
37 STRIP = $(CROSS_COMPILE)strip
38 OBJCOPY = $(CROSS_COMPILE)objcopy
39 OBJDUMP = $(CROSS_COMPILE)objdump
40 MAKEFILES = $(TOPDIR)/.config
41 GENKSYMS = /sbin/genksyms
42 DEPMOD = /sbin/depmod
43 KALLSYMS = /sbin/kallsyms
44 MODFLAGS = -DMODULE
45 CFLAGS_KERNEL =
46 PERL = perl
47 AWK = awk
48 TMPPREFIX =
50 export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
51 CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
52 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
54 all: do-it-all
56 #
57 # Make "config" the default target if there is no configuration file or
58 # "depend" the target if there is no top-level dependency information.
59 #
61 ifeq (.config,$(wildcard .config))
62 include .config
63 ifeq (.depend,$(wildcard .depend))
64 include .depend
65 do-it-all: Version vmlinux
66 else
67 CONFIGURATION = depend
68 do-it-all: depend
69 endif
70 else
71 CONFIGURATION = config
72 do-it-all: config
73 endif
75 #
76 # INSTALL_PATH specifies where to place the updated kernel and system map
77 # images. Uncomment if you want to place them anywhere other than root.
78 #
80 #export INSTALL_PATH=/boot
82 #
83 # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
84 # relocations required by build roots. This is not defined in the
85 # makefile but the arguement can be passed to make if needed.
86 #
88 MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
89 export MODLIB
91 #
92 # standard CFLAGS
93 #
95 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
96 CPPFLAGS += $(patsubst %,-I%,$(CROSS_COMPILE_INC))
98 CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
99 -fno-strict-aliasing -fno-common
100 ifndef CONFIG_FRAME_POINTER
101 CFLAGS += -fomit-frame-pointer
102 endif
103 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
105 #
106 # ROOT_DEV specifies the default root-device when making the image.
107 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
108 # the default of FLOPPY is used by 'build'.
109 # This is i386 specific.
110 #
112 export ROOT_DEV = CURRENT
114 #
115 # If you want to preset the SVGA mode, uncomment the next line and
116 # set SVGA_MODE to whatever number you want.
117 # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
118 # The number is the same as you would ordinarily press at bootup.
119 # This is i386 specific.
120 #
122 export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
124 #
125 # If you want the RAM disk device, define this to be the size in blocks.
126 # This is i386 specific.
127 #
129 #export RAMDISK = -DRAMDISK=512
131 CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
132 NETWORKS =net/network.o
134 LIBS =$(TOPDIR)/lib/lib.a
135 SUBDIRS =kernel drivers mm fs net ipc lib
137 ifeq ($(CONFIG_KDB),y)
138 CORE_FILES += kdb/kdb.o
139 SUBDIRS += kdb
140 endif
142 DRIVERS-n :=
143 DRIVERS-y :=
144 DRIVERS-m :=
145 DRIVERS- :=
147 DRIVERS-$(CONFIG_ACPI) += drivers/acpi/acpi.o
148 DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
149 DRIVERS-y += drivers/char/char.o \
150 drivers/block/block.o \
151 drivers/misc/misc.o \
152 drivers/net/net.o \
153 drivers/media/media.o
154 DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
155 DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o
156 DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
157 DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a
158 DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
159 DRIVERS-$(CONFIG_APPLETALK) += drivers/net/appletalk/appletalk.o
160 DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
161 DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
162 DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
163 DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
164 DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
165 DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
166 DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
167 DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
168 DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
170 ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
171 DRIVERS-y += drivers/cdrom/driver.o
172 endif
174 DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
175 DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
176 DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
177 DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
178 DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
179 DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
180 DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
181 DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
182 DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
183 DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
184 DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
185 DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o
186 DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
187 DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
188 DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
189 DRIVERS-$(CONFIG_VT) += drivers/video/video.o
190 DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
191 DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
192 DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
193 DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
194 DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
195 DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
196 DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
197 DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
198 DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
199 DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
200 DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
201 DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.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 $(TMPPREFIX).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_gram.c \
219 drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
220 drivers/scsi/aic7xxx/aicasm/y.tab.h \
221 drivers/scsi/aic7xxx/aicasm/aicasm \
222 drivers/scsi/53c700-mem.c \
223 net/khttpd/make_times_h \
224 net/khttpd/times.h \
225 submenu*
226 # directories removed with 'make clean'
227 CLEAN_DIRS = \
228 modules
230 # files removed with 'make mrproper'
231 MRPROPER_FILES = \
232 include/linux/autoconf.h include/linux/version.h \
233 drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
234 drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
235 drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
236 drivers/net/hamradio/soundmodem/gentbl \
237 drivers/sound/*_boot.h drivers/sound/.*.boot \
238 drivers/sound/msndinit.c \
239 drivers/sound/msndperm.c \
240 drivers/sound/pndsperm.c \
241 drivers/sound/pndspini.c \
242 drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
243 .version .config* config.in config.old \
244 scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
245 scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
246 .menuconfig.log \
247 include/asm \
248 kdb/gen-kdb_cmds.c \
249 .hdepend scripts/mkdep scripts/split-include scripts/docproc \
250 $(TOPDIR)/include/linux/modversions.h \
251 kernel.spec
253 # directories removed with 'make mrproper'
254 MRPROPER_DIRS = \
255 include/config \
256 $(TOPDIR)/include/linux/modules
259 include arch/$(ARCH)/Makefile
261 export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
263 export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
265 .S.s:
266 $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
267 .S.o:
268 $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
270 Version: dummy
271 @rm -f include/linux/compile.h
273 boot: vmlinux
274 @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
276 LD_VMLINUX := $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
277 --start-group \
278 $(CORE_FILES) \
279 $(DRIVERS) \
280 $(NETWORKS) \
281 $(LIBS) \
282 --end-group
283 ifeq ($(CONFIG_KALLSYMS),y)
284 LD_VMLINUX_KALLSYMS := $(TMPPREFIX).tmp_kallsyms3.o
285 else
286 LD_VMLINUX_KALLSYMS :=
287 endif
289 vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
290 @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" kallsyms
292 .PHONY: kallsyms
294 kallsyms:
295 ifeq ($(CONFIG_KALLSYMS),y)
296 @echo kallsyms pass 1
297 $(LD_VMLINUX) -o $(TMPPREFIX).tmp_vmlinux1
298 @$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux1 > $(TMPPREFIX).tmp_kallsyms1.o
299 @echo kallsyms pass 2
300 @$(LD_VMLINUX) $(TMPPREFIX).tmp_kallsyms1.o -o $(TMPPREFIX).tmp_vmlinux2
301 @$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux2 > $(TMPPREFIX).tmp_kallsyms2.o
302 @echo kallsyms pass 3
303 @$(LD_VMLINUX) $(TMPPREFIX).tmp_kallsyms2.o -o $(TMPPREFIX).tmp_vmlinux3
304 @$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux3 > $(TMPPREFIX).tmp_kallsyms3.o
305 endif
306 $(LD_VMLINUX) $(LD_VMLINUX_KALLSYMS) -o $(TMPPREFIX)vmlinux
307 ifneq ($(TMPPREFIX),)
308 mv $(TMPPREFIX)vmlinux vmlinux
309 endif
310 $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
311 @rm -f $(TMPPREFIX).tmp_vmlinux* $(TMPPREFIX).tmp_kallsyms*
313 symlinks:
314 rm -f include/asm
315 ( cd include ; ln -sf asm-$(ARCH) asm)
316 @if [ ! -d include/linux/modules ]; then \
317 mkdir include/linux/modules; \
318 fi
320 oldconfig: symlinks
321 $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
323 xconfig: symlinks
324 $(MAKE) -C scripts kconfig.tk
325 wish -f scripts/kconfig.tk
327 menuconfig: include/linux/version.h symlinks
328 $(MAKE) -C scripts/lxdialog all
329 $(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
331 config: symlinks
332 $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
334 include/config/MARKER: scripts/split-include include/linux/autoconf.h
335 scripts/split-include include/linux/autoconf.h include/config
336 @ touch include/config/MARKER
338 linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
340 $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
341 $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
343 $(TOPDIR)/include/linux/version.h: include/linux/version.h
344 $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
346 newversion:
347 . scripts/mkversion > .tmpversion
348 @mv -f .tmpversion .version
350 include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
351 @echo -n \#define UTS_VERSION \"\#`cat .version` > .ver
352 @if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver; fi
353 @if [ -f .name ]; then echo -n \-`cat .name` >> .ver; fi
354 @echo ' '`date`'"' >> .ver
355 @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
356 @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
357 @echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> .ver
358 @if [ -x /bin/dnsdomainname ]; then \
359 echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname`\"; \
360 elif [ -x /bin/domainname ]; then \
361 echo \#define LINUX_COMPILE_DOMAIN \"`domainname`\"; \
362 else \
363 echo \#define LINUX_COMPILE_DOMAIN ; \
364 fi >> .ver
365 @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
366 @mv -f .ver $@
368 include/linux/version.h: ./Makefile
369 @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
370 @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
371 @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
372 @mv -f .ver $@
374 init/version.o: init/version.c include/linux/compile.h include/config/MARKER
375 $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(HW_ARCH)"' -c -o init/version.o init/version.c
377 init/main.o: init/main.c include/config/MARKER
378 $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $<
380 fs lib mm ipc kernel drivers net: dummy
381 $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
383 TAGS: dummy
384 etags `find include/asm-$(ARCH) -name '*.h'`
385 find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs etags -a
386 find $(SUBDIRS) init -name '*.[ch]' | xargs etags -a
388 # Exuberant ctags works better with -I
389 tags: dummy
390 CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
391 ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
392 find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
393 find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
395 ifdef CONFIG_MODULES
396 ifdef CONFIG_MODVERSIONS
397 MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
398 endif
400 .PHONY: modules
401 modules: $(patsubst %, _mod_%, $(SUBDIRS))
403 .PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
404 $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
405 $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
407 .PHONY: modules_install
408 modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
410 .PHONY: _modinst_
411 _modinst_:
412 @rm -rf $(MODLIB)/kernel
413 @rm -f $(MODLIB)/build
414 @mkdir -p $(MODLIB)/kernel
415 @ln -s $(TOPDIR) $(MODLIB)/build
417 # If System.map exists, run depmod. This deliberately does not have a
418 # dependency on System.map since that would run the dependency tree on
419 # vmlinux. This depmod is only for convenience to give the initial
420 # boot a modules.dep even before / is mounted read-write. However the
421 # boot script depmod is the master version.
422 ifeq "$(strip $(INSTALL_MOD_PATH))" ""
423 depmod_opts :=
424 else
425 depmod_opts := -b $(INSTALL_MOD_PATH) -r
426 endif
427 .PHONY: _modinst_post
428 _modinst_post: _modinst_post_pcmcia
429 # if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
431 # Backwards compatibilty symlinks for people still using old versions
432 # of pcmcia-cs with hard coded pathnames on insmod. Remove
433 # _modinst_post_pcmcia for kernel 2.4.1.
434 .PHONY: _modinst_post_pcmcia
435 _modinst_post_pcmcia:
436 cd $(MODLIB); \
437 mkdir -p pcmcia; \
438 find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
440 .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
441 $(patsubst %, _modinst_%, $(SUBDIRS)) :
442 $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
444 # modules disabled....
446 else
447 modules modules_install: dummy
448 @echo
449 @echo "The present kernel configuration has modules disabled."
450 @echo "Type 'make config' and enable loadable module support."
451 @echo "Then build a kernel with module support enabled."
452 @echo
453 @exit 1
454 endif
456 clean: archclean
457 find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
458 | grep -v lxdialog/ | xargs rm -f
459 rm -f $(CLEAN_FILES)
460 rm -rf $(CLEAN_DIRS)
461 $(MAKE) -C Documentation/DocBook clean
463 mrproper: clean archmrproper
464 find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
465 rm -f $(MRPROPER_FILES)
466 rm -rf $(MRPROPER_DIRS)
467 $(MAKE) -C Documentation/DocBook mrproper
469 distclean: mrproper
470 rm -f core `find . \( -not -type d \) -and \
471 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
472 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
473 -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
475 backup: mrproper
476 cd .. && tar cf - linux/ | gzip -9 > backup.gz
477 sync
479 sgmldocs:
480 chmod 755 $(TOPDIR)/scripts/docgen
481 chmod 755 $(TOPDIR)/scripts/gen-all-syms
482 chmod 755 $(TOPDIR)/scripts/kernel-doc
483 $(MAKE) -C $(TOPDIR)/Documentation/DocBook books
485 psdocs: sgmldocs
486 $(MAKE) -C Documentation/DocBook ps
488 pdfdocs: sgmldocs
489 $(MAKE) -C Documentation/DocBook pdf
491 htmldocs: sgmldocs
492 $(MAKE) -C Documentation/DocBook html
494 sums:
495 find . -type f -print | sort | xargs sum > .SUMS
497 dep-files: scripts/mkdep archdep include/linux/version.h
498 scripts/mkdep -- init/*.c > .depend
499 scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
500 $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
501 ifdef CONFIG_MODVERSIONS
502 $(MAKE) update-modverfile
503 endif
505 ifdef CONFIG_MODVERSIONS
506 MODVERFILE := $(TOPDIR)/include/linux/modversions.h
507 else
508 MODVERFILE :=
509 endif
510 export MODVERFILE
512 depend dep: dep-files
514 checkconfig:
515 find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
517 checkhelp:
518 find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
520 checkincludes:
521 find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
523 ifdef CONFIGURATION
524 ..$(CONFIGURATION):
525 @echo
526 @echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
527 @echo
528 $(MAKE) $(CONFIGURATION)
529 @echo
530 @echo "Successful. Try re-making (ignore the error that follows)"
531 @echo
532 exit 1
534 #dummy: ..$(CONFIGURATION)
535 dummy:
537 else
539 dummy:
541 endif
543 include Rules.make
545 #
546 # This generates dependencies for the .h files.
547 #
549 scripts/mkdep: scripts/mkdep.c
550 $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
552 scripts/split-include: scripts/split-include.c
553 $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
555 #
556 # RPM target
557 #
558 # If you do a make spec before packing the tarball you can rpm -ta it
559 #
560 spec:
561 . scripts/mkspec >kernel.spec
563 #
564 # Build a tar ball, generate an rpm from it and pack the result
565 # There arw two bits of magic here
566 # 1) The use of /. to avoid tar packing just the symlink
567 # 2) Removing the .dep files as they have source paths in them that
568 # will become invalid
569 #
570 rpm: clean spec
571 find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
572 set -e; \
573 cd $(TOPDIR)/.. ; \
574 ln -sf $(TOPDIR) $(KERNELPATH) ; \
575 tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
576 rm $(KERNELPATH) ; \
577 cd $(TOPDIR) ; \
578 . scripts/mkversion > .version ; \
579 rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
580 rm $(TOPDIR)/../$(KERNELPATH).tar.gz