linux-old/Makefile
<<
>>
Prefs
   1VERSION = 2
   2PATCHLEVEL = 4
   3SUBLEVEL = 19
   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_PPC) += 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_I2O) += drivers/message/i2o/i2o.o
 184DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
 185DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
 186DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
 187DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
 188DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
 189DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
 190DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
 191
 192DRIVERS := $(DRIVERS-y)
 193
 194
 195# files removed with 'make clean'
 196CLEAN_FILES = \
 197        kernel/ksyms.lst include/linux/compile.h \
 198        vmlinux System.map \
 199        .tmp* \
 200        drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
 201        drivers/char/conmakehash \
 202        drivers/char/drm/*-mod.c \
 203        drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
 204        drivers/zorro/devlist.h drivers/zorro/gen-devlist \
 205        drivers/sound/bin2hex drivers/sound/hex2hex \
 206        drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
 207        drivers/scsi/aic7xxx/aicasm/aicasm \
 208        drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
 209        drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
 210        drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
 211        drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
 212        drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
 213        drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
 214        drivers/scsi/aic7xxx/aicasm/aicdb.h \
 215        drivers/scsi/aic7xxx/aicasm/y.tab.h \
 216        drivers/scsi/53c700_d.h \
 217        net/khttpd/make_times_h \
 218        net/khttpd/times.h \
 219        submenu*
 220# directories removed with 'make clean'
 221CLEAN_DIRS = \
 222        modules
 223
 224# files removed with 'make mrproper'
 225MRPROPER_FILES = \
 226        include/linux/autoconf.h include/linux/version.h \
 227        drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
 228        drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
 229        drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
 230        drivers/net/hamradio/soundmodem/gentbl \
 231        drivers/sound/*_boot.h drivers/sound/.*.boot \
 232        drivers/sound/msndinit.c \
 233        drivers/sound/msndperm.c \
 234        drivers/sound/pndsperm.c \
 235        drivers/sound/pndspini.c \
 236        drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
 237        .version .config* config.in config.old \
 238        scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
 239        scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
 240        .menuconfig.log \
 241        include/asm \
 242        .hdepend scripts/mkdep scripts/split-include scripts/docproc \
 243        $(TOPDIR)/include/linux/modversions.h \
 244        kernel.spec
 245
 246# directories removed with 'make mrproper'
 247MRPROPER_DIRS = \
 248        include/config \
 249        $(TOPDIR)/include/linux/modules
 250
 251
 252include arch/$(ARCH)/Makefile
 253
 254# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
 255# from user space headers.  Some UML code requires user space headers, in the
 256# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
 257# other kernel code should include user space headers, if you need
 258# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
 259# then your code is broken!  KAO.
 260
 261kbuild_2_4_nostdinc     := -nostdinc $(shell $(CC) -print-search-dirs | sed -ne 's/install: \(.*\)/-I \1include/gp')
 262export kbuild_2_4_nostdinc
 263
 264export  CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
 265
 266export  NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
 267
 268.S.s:
 269        $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
 270.S.o:
 271        $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
 272
 273Version: dummy
 274        @rm -f include/linux/compile.h
 275
 276boot: vmlinux
 277        @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
 278
 279vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
 280        $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
 281                --start-group \
 282                $(CORE_FILES) \
 283                $(DRIVERS) \
 284                $(NETWORKS) \
 285                $(LIBS) \
 286                --end-group \
 287                -o vmlinux
 288        $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
 289
 290symlinks:
 291        rm -f include/asm
 292        ( cd include ; ln -sf asm-$(ARCH) asm)
 293        @if [ ! -d include/linux/modules ]; then \
 294                mkdir include/linux/modules; \
 295        fi
 296
 297oldconfig: symlinks
 298        $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
 299
 300xconfig: symlinks
 301        $(MAKE) -C scripts kconfig.tk
 302        wish -f scripts/kconfig.tk
 303
 304menuconfig: include/linux/version.h symlinks
 305        $(MAKE) -C scripts/lxdialog all
 306        $(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
 307
 308config: symlinks
 309        $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
 310
 311include/config/MARKER: scripts/split-include include/linux/autoconf.h
 312        scripts/split-include include/linux/autoconf.h include/config
 313        @ touch include/config/MARKER
 314
 315linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
 316
 317$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
 318        $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
 319
 320$(TOPDIR)/include/linux/version.h: include/linux/version.h
 321$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
 322
 323newversion:
 324        . scripts/mkversion > .tmpversion
 325        @mv -f .tmpversion .version
 326
 327uts_len         := 64
 328uts_truncate    := sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
 329
 330include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
 331        @echo -n \#`cat .version` > .ver1
 332        @if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
 333        @if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
 334        @LANG=C echo ' '`date` >> .ver1
 335        @echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
 336        @LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
 337        @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
 338        @echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
 339        @([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
 340         ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
 341         echo > .ver1
 342        @echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
 343        @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
 344        @mv -f .ver $@
 345        @rm -f .ver1
 346
 347include/linux/version.h: ./Makefile
 348        @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
 349          (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
 350        @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
 351        @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
 352        @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
 353        @mv -f .ver $@
 354
 355comma   := ,
 356
 357init/version.o: init/version.c include/linux/compile.h include/config/MARKER
 358        $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
 359
 360init/main.o: init/main.c include/config/MARKER
 361        $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
 362
 363init/do_mounts.o: init/do_mounts.c include/config/MARKER
 364        $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
 365
 366fs lib mm ipc kernel drivers net: dummy
 367        $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
 368
 369TAGS: dummy
 370        { find include/asm-${ARCH} -name '*.h' -print ; \
 371        find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
 372        find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | etags -
 373
 374# Exuberant ctags works better with -I
 375tags: dummy
 376        CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
 377        ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
 378        find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
 379        find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
 380
 381ifdef CONFIG_MODULES
 382ifdef CONFIG_MODVERSIONS
 383MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
 384endif
 385
 386.PHONY: modules
 387modules: $(patsubst %, _mod_%, $(SUBDIRS))
 388
 389.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
 390$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
 391        $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
 392
 393.PHONY: modules_install
 394modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
 395
 396.PHONY: _modinst_
 397_modinst_:
 398        @rm -rf $(MODLIB)/kernel
 399        @rm -f $(MODLIB)/build
 400        @mkdir -p $(MODLIB)/kernel
 401        @ln -s $(TOPDIR) $(MODLIB)/build
 402
 403# If System.map exists, run depmod.  This deliberately does not have a
 404# dependency on System.map since that would run the dependency tree on
 405# vmlinux.  This depmod is only for convenience to give the initial
 406# boot a modules.dep even before / is mounted read-write.  However the
 407# boot script depmod is the master version.
 408ifeq "$(strip $(INSTALL_MOD_PATH))" ""
 409depmod_opts     :=
 410else
 411depmod_opts     := -b $(INSTALL_MOD_PATH) -r
 412endif
 413.PHONY: _modinst_post
 414_modinst_post: _modinst_post_pcmcia
 415        if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
 416
 417# Backwards compatibilty symlinks for people still using old versions
 418# of pcmcia-cs with hard coded pathnames on insmod.  Remove
 419# _modinst_post_pcmcia for kernel 2.4.1.
 420.PHONY: _modinst_post_pcmcia
 421_modinst_post_pcmcia:
 422        cd $(MODLIB); \
 423        mkdir -p pcmcia; \
 424        find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
 425
 426.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
 427$(patsubst %, _modinst_%, $(SUBDIRS)) :
 428        $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
 429
 430# modules disabled....
 431
 432else
 433modules modules_install: dummy
 434        @echo
 435        @echo "The present kernel configuration has modules disabled."
 436        @echo "Type 'make config' and enable loadable module support."
 437        @echo "Then build a kernel with module support enabled."
 438        @echo
 439        @exit 1
 440endif
 441
 442clean:  archclean
 443        find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
 444                | grep -v lxdialog/ | xargs rm -f
 445        rm -f $(CLEAN_FILES)
 446        rm -rf $(CLEAN_DIRS)
 447        $(MAKE) -C Documentation/DocBook clean
 448
 449mrproper: clean archmrproper
 450        find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
 451        rm -f $(MRPROPER_FILES)
 452        rm -rf $(MRPROPER_DIRS)
 453        $(MAKE) -C Documentation/DocBook mrproper
 454
 455distclean: mrproper
 456        rm -f core `find . \( -not -type d \) -and \
 457                \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
 458                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
 459                -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
 460
 461backup: mrproper
 462        cd .. && tar cf - linux/ | gzip -9 > backup.gz
 463        sync
 464
 465sgmldocs: 
 466        chmod 755 $(TOPDIR)/scripts/docgen
 467        chmod 755 $(TOPDIR)/scripts/gen-all-syms
 468        chmod 755 $(TOPDIR)/scripts/kernel-doc
 469        $(MAKE) -C $(TOPDIR)/Documentation/DocBook books
 470
 471psdocs: sgmldocs
 472        $(MAKE) -C Documentation/DocBook ps
 473
 474pdfdocs: sgmldocs
 475        $(MAKE) -C Documentation/DocBook pdf
 476
 477htmldocs: sgmldocs
 478        $(MAKE) -C Documentation/DocBook html
 479
 480mandocs:
 481        chmod 755 $(TOPDIR)/scripts/kernel-doc
 482        chmod 755 $(TOPDIR)/scripts/split-man
 483        $(MAKE) -C Documentation/DocBook man
 484
 485sums:
 486        find . -type f -print | sort | xargs sum > .SUMS
 487
 488dep-files: scripts/mkdep archdep include/linux/version.h
 489        scripts/mkdep -- init/*.c > .depend
 490        scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
 491        $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
 492ifdef CONFIG_MODVERSIONS
 493        $(MAKE) update-modverfile
 494endif
 495
 496ifdef CONFIG_MODVERSIONS
 497MODVERFILE := $(TOPDIR)/include/linux/modversions.h
 498else
 499MODVERFILE :=
 500endif
 501export  MODVERFILE
 502
 503depend dep: dep-files
 504
 505checkconfig:
 506        find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
 507
 508checkhelp:
 509        find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
 510
 511checkincludes:
 512        find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
 513
 514ifdef CONFIGURATION
 515..$(CONFIGURATION):
 516        @echo
 517        @echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
 518        @echo
 519        $(MAKE) $(CONFIGURATION)
 520        @echo
 521        @echo "Successful. Try re-making (ignore the error that follows)"
 522        @echo
 523        exit 1
 524
 525#dummy: ..$(CONFIGURATION)
 526dummy:
 527
 528else
 529
 530dummy:
 531
 532endif
 533
 534include Rules.make
 535
 536#
 537# This generates dependencies for the .h files.
 538#
 539
 540scripts/mkdep: scripts/mkdep.c
 541        $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
 542
 543scripts/split-include: scripts/split-include.c
 544        $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
 545
 546#
 547# RPM target
 548#
 549#       If you do a make spec before packing the tarball you can rpm -ta it
 550#
 551spec:
 552        . scripts/mkspec >kernel.spec
 553
 554#
 555#       Build a tar ball, generate an rpm from it and pack the result
 556#       There arw two bits of magic here
 557#       1) The use of /. to avoid tar packing just the symlink
 558#       2) Removing the .dep files as they have source paths in them that
 559#          will become invalid
 560#
 561rpm:    clean spec
 562        find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
 563        set -e; \
 564        cd $(TOPDIR)/.. ; \
 565        ln -sf $(TOPDIR) $(KERNELPATH) ; \
 566        tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
 567        rm $(KERNELPATH) ; \
 568        cd $(TOPDIR) ; \
 569        . scripts/mkversion > .version ; \
 570        rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
 571        rm $(TOPDIR)/../$(KERNELPATH).tar.gz
 572
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.