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

