direct-io.hg

view xenolinux-2.4.21-pre4-sparse/Makefile @ 297:8d97a5bf81d2

bitkeeper revision 1.122.1.14 (3e70fa03agHmgzj9cO0FmaGzS2RcPg)

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