From 99234b21391dee5a634eaf62d6b9904c80ff66d6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 23 Nov 2007 15:40:48 -0500 Subject: [PATCH] - Linus: drop support for old-style Makefiles entirely. Big. - Linus: check b_end_io at the IO submission path - Linus: fix "ptep_mkdirty()" (so that swapoff() works correctly) - fix fault case in copy_from_user() with a constant size, where ((size & 3) == 3) --- Makefile | 8 +- Rules.make | 51 +++-- arch/i386/Makefile | 3 +- arch/i386/kernel/Makefile | 5 - arch/i386/lib/Makefile | 12 +- arch/i386/math-emu/Makefile | 4 +- arch/i386/mm/Makefile | 3 +- drivers/Makefile | 8 - drivers/block/Makefile | 30 +-- drivers/block/ll_rw_blk.c | 2 + drivers/block/paride/Makefile | 3 - drivers/cdrom/Makefile | 20 +- drivers/char/Makefile | 98 +-------- drivers/char/agp/Makefile | 20 +- drivers/char/drm/Makefile | 26 +-- drivers/char/pcmcia/Makefile | 5 - drivers/char/rio/Makefile | 7 +- drivers/ide/Makefile | 42 +--- drivers/md/Makefile | 15 -- drivers/misc/Makefile | 7 - drivers/net/Makefile | 128 +---------- drivers/net/appletalk/Makefile | 8 - drivers/net/arcnet/Makefile | 8 - drivers/net/fc/Makefile | 3 - drivers/net/hamradio/Makefile | 22 +- drivers/net/hamradio/soundmodem/Makefile | 42 +--- drivers/net/irda/Makefile | 14 -- drivers/net/pcmcia/Makefile | 9 - drivers/net/sk98lin/Makefile | 16 +- drivers/net/skfp/Makefile | 16 +- drivers/net/tokenring/Makefile | 8 - drivers/net/tulip/Makefile | 5 +- drivers/net/wan/Makefile | 33 +-- drivers/net/wan/lmc/Makefile | 19 +- drivers/parport/Makefile | 20 +- drivers/pci/Makefile | 21 +- drivers/pcmcia/Makefile | 40 ++-- drivers/pnp/Makefile | 24 +- drivers/pnp/quirks.c | 2 +- drivers/scsi/Makefile | 18 -- drivers/scsi/pcmcia/Makefile | 20 -- drivers/sound/Makefile | 65 +----- drivers/sound/dmasound/Makefile | 17 -- drivers/sound/emu10k1/Makefile | 16 +- drivers/usb/Makefile | 30 +-- drivers/usb/serial/Makefile | 14 -- drivers/usb/storage/Makefile | 15 -- drivers/video/Makefile | 55 +---- drivers/video/matrox/Makefile | 37 ---- drivers/video/riva/Makefile | 5 +- drivers/video/sis/Makefile | 6 +- fs/Makefile | 13 -- fs/adfs/Makefile | 5 +- fs/affs/Makefile | 5 +- fs/autofs/Makefile | 27 +-- fs/autofs4/Makefile | 28 +-- fs/bfs/Makefile | 5 +- fs/buffer.c | 13 +- fs/coda/Makefile | 7 +- fs/cramfs/Makefile | 4 +- fs/cramfs/inflate/Makefile | 4 +- fs/devfs/Makefile | 5 +- fs/devpts/Makefile | 5 +- fs/efs/Makefile | 5 +- fs/ext2/Makefile | 5 +- fs/fat/Makefile | 8 +- fs/hfs/Makefile | 5 +- fs/hpfs/Makefile | 5 +- fs/isofs/Makefile | 8 +- fs/jffs/Makefile | 4 +- fs/lockd/Makefile | 14 +- fs/minix/Makefile | 5 +- fs/msdos/Makefile | 8 +- fs/ncpfs/Makefile | 5 +- fs/nfs/Makefile | 13 +- fs/nfsd/Makefile | 10 +- fs/nls/Makefile | 3 +- fs/ntfs/Makefile | 5 +- fs/openpromfs/Makefile | 5 +- fs/partitions/Makefile | 8 +- fs/proc/Makefile | 11 +- fs/qnx4/Makefile | 5 +- fs/ramfs/Makefile | 5 +- fs/romfs/Makefile | 5 +- fs/smbfs/Makefile | 5 +- fs/sysv/Makefile | 5 +- fs/udf/Makefile | 5 +- fs/ufs/Makefile | 5 +- fs/umsdos/Makefile | 4 +- fs/vfat/Makefile | 8 +- include/asm-i386/pgtable.h | 2 +- include/asm-i386/uaccess.h | 2 +- ipc/Makefile | 7 +- kernel/Makefile | 22 +- lib/Makefile | 8 +- mm/Makefile | 7 +- mm/swapfile.c | 3 +- net/802/Makefile | 25 ++- net/Makefile | 11 - net/appletalk/Makefile | 11 +- net/atm/Makefile | 40 +--- net/ax25/Makefile | 19 +- net/bridge/Makefile | 4 +- net/core/Makefile | 30 +-- net/decnet/Makefile | 15 +- net/econet/Makefile | 4 +- net/ethernet/Makefile | 4 +- net/ipv4/Makefile | 56 +---- net/ipv4/netfilter/Makefile | 268 +++++------------------ net/ipv6/Makefile | 11 +- net/ipv6/netfilter/Makefile | 187 +++------------- net/ipx/Makefile | 21 +- net/irda/Makefile | 61 ++---- net/irda/compressors/Makefile | 13 +- net/irda/ircomm/Makefile | 26 +-- net/irda/irlan/Makefile | 9 +- net/irda/irnet/Makefile | 10 +- net/khttpd/Makefile | 6 +- net/lapb/Makefile | 7 +- net/netlink/Makefile | 13 +- net/netrom/Makefile | 9 +- net/packet/Makefile | 11 +- net/rose/Makefile | 9 +- net/sched/Makefile | 84 +++---- net/sunrpc/Makefile | 19 +- net/unix/Makefile | 9 +- net/wanrouter/Makefile | 8 +- net/x25/Makefile | 9 +- 128 files changed, 604 insertions(+), 1856 deletions(-) diff --git a/Makefile b/Makefile index 00615a37aef3..dcf976d50666 100644 --- a/Makefile +++ b/Makefile @@ -123,8 +123,7 @@ DRIVERS =drivers/block/block.o \ drivers/char/char.o \ drivers/misc/misc.o \ drivers/net/net.o \ - drivers/media/media.o \ - drivers/parport/parport.a + drivers/media/media.o LIBS =$(TOPDIR)/lib/lib.a SUBDIRS =kernel drivers mm fs net ipc lib @@ -133,6 +132,7 @@ DRIVERS-y := DRIVERS-m := DRIVERS- := +DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a @@ -148,11 +148,11 @@ DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394.a ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),) -DRIVERS-y += drivers/cdrom/cdrom.a +DRIVERS-y += drivers/cdrom/driver.o endif DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o -DRIVERS-$(CONFIG_PCI) += drivers/pci/pci.a +DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o DRIVERS-$(CONFIG_PCMCIA_NETCARD) += drivers/net/pcmcia/pcmcia_net.o diff --git a/Rules.make b/Rules.make index e12777d2ab65..192709a617bc 100644 --- a/Rules.make +++ b/Rules.make @@ -22,15 +22,17 @@ unexport O_TARGET unexport O_OBJS unexport L_OBJS unexport M_OBJS -# intermediate objects that form part of a module -unexport MI_OBJS unexport ALL_MOBJS -# objects that export symbol tables -unexport OX_OBJS -unexport LX_OBJS -unexport MX_OBJS -unexport MIX_OBJS -unexport SYMTAB_OBJS + +unexport obj-y +unexport obj-m +unexport obj-n +unexport obj- +unexport export-objs +unexport subdir-y +unexport subdir-m +unexport subdir-n +unexport subdir- # # Get things started. @@ -38,6 +40,11 @@ unexport SYMTAB_OBJS first_rule: sub_dirs $(MAKE) all_targets +SUB_DIRS := $(subdir-y) +MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m)) +ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-)) + + # # Common rules # @@ -85,16 +92,15 @@ all_targets: $(O_TARGET) $(L_TARGET) # Rule to compile a set of .o files into one .o file # ifdef O_TARGET -ALL_O = $(OX_OBJS) $(O_OBJS) -$(O_TARGET): $(ALL_O) +$(O_TARGET): $(obj-y) rm -f $@ - ifneq "$(strip $(ALL_O))" "" - $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(ALL_O), $^) + ifneq "$(strip $(obj-y))" "" + $(LD) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^) else - $(AR) rcs $@ $(filter $(ALL_O), $^) + $(AR) rcs $@ endif @ ( \ - echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(ALL_O))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(ALL_O))))' ; \ + echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_LDFLAGS) $(obj-y))),$$(strip $$(subst $$(comma),:,$$(EXTRA_LDFLAGS) $$(obj-y))))' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'endif' \ ) > $(dir $@)/.$(notdir $@).flags @@ -104,16 +110,17 @@ endif # O_TARGET # Rule to compile a set of .o files into one .a file # ifdef L_TARGET -$(L_TARGET): $(LX_OBJS) $(L_OBJS) +$(L_TARGET): $(obj-y) rm -f $@ - $(AR) $(EXTRA_ARFLAGS) rcs $@ $(LX_OBJS) $(L_OBJS) + $(AR) $(EXTRA_ARFLAGS) rcs $@ $(LX_OBJS) $(obj-y) @ ( \ - echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_ARFLAGS) $(LX_OBJS) $(L_OBJS))),$$(strip $$(subst $$(comma),:,$$(EXTRA_ARFLAGS) $$(LX_OBJS) $$(L_OBJS))))' ; \ + echo 'ifeq ($(strip $(subst $(comma),:,$(EXTRA_ARFLAGS) $(obj-y))),$$(strip $$(subst $$(comma),:,$$(EXTRA_ARFLAGS) $$(obj-y))))' ; \ echo 'FILES_FLAGS_UP_TO_DATE += $@' ; \ echo 'endif' \ ) > $(dir $@)/.$(notdir $@).flags endif + # # This make dependencies quickly # @@ -142,7 +149,7 @@ endif # # A rule to make modules # -ALL_MOBJS = $(MX_OBJS) $(M_OBJS) +ALL_MOBJS = $(filter-out $(obj-y), $(obj-m)) ifneq "$(strip $(ALL_MOBJS))" "" PDWN=$(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh) endif @@ -160,7 +167,7 @@ $(patsubst %,_modinst_%,$(MOD_DIRS)) : dummy endif .PHONY: modules -modules: $(ALL_MOBJS) $(MIX_OBJS) $(MI_OBJS) dummy \ +modules: $(ALL_MOBJS) dummy \ $(patsubst %,_modsubdir_%,$(MOD_DIRS)) .PHONY: _modinst__ @@ -193,7 +200,10 @@ script: # ifdef CONFIG_MODULES -SYMTAB_OBJS = $(LX_OBJS) $(OX_OBJS) $(MX_OBJS) $(MIX_OBJS) +multi-used := $(filter $(list-multi), $(obj-y) $(obj-m)) +multi-objs := $(foreach m, $(multi-used), $($(basename $(m))-objs)) +active-objs := $(sort $(multi-objs) $(obj-y) $(obj-m)) +SYMTAB_OBJS := $(filter $(export-objs), $(active-objs)) ifdef CONFIG_MODVERSIONS ifneq "$(strip $(SYMTAB_OBJS))" "" @@ -308,7 +318,6 @@ FILES_FLAGS_CHANGED := $(strip \ $(O_TARGET) $(O_OBJS) $(OX_OBJS) \ $(L_TARGET) $(L_OBJS) $(LX_OBJS) \ $(M_OBJS) $(MX_OBJS) \ - $(MI_OBJS) $(MIX_OBJS) \ )) # A kludge: .S files don't get flag dependencies (yet), diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 7ef695981674..64828b335557 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile @@ -85,12 +85,13 @@ endif HEAD := arch/i386/kernel/head.o arch/i386/kernel/init_task.o SUBDIRS += arch/i386/kernel arch/i386/mm arch/i386/lib + CORE_FILES := arch/i386/kernel/kernel.o arch/i386/mm/mm.o $(CORE_FILES) LIBS := $(TOPDIR)/arch/i386/lib/lib.a $(LIBS) $(TOPDIR)/arch/i386/lib/lib.a ifdef CONFIG_MATH_EMULATION SUBDIRS += arch/i386/math-emu -DRIVERS += arch/i386/math-emu/math.a +SUBDIRS += arch/i386/math-emu/math.o endif arch/i386/kernel: dummy diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index a8ea61306782..a41ef4fda465 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -46,9 +46,4 @@ ifneq ($(CONFIG_ACPI_INTERPRETER),y) obj-$(CONFIG_ACPI) += acpi.o endif -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make diff --git a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile index abafc528dabe..bfb9ae050046 100644 --- a/arch/i386/lib/Makefile +++ b/arch/i386/lib/Makefile @@ -6,16 +6,12 @@ $(CC) $(AFLAGS) -c $< -o $*.o L_TARGET = lib.a -L_OBJS = checksum.o old-checksum.o delay.o \ + +obj-y = checksum.o old-checksum.o delay.o \ usercopy.o getuser.o putuser.o iodebug.o \ memcpy.o -ifdef CONFIG_X86_USE_3DNOW -L_OBJS += mmx.o -endif - -ifdef CONFIG_HAVE_DEC_LOCK -L_OBJS += dec_and_lock.o -endif +obj-$(CONFIG_X86_USE_3DNOW) += mmx.o +obj-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o include $(TOPDIR)/Rules.make diff --git a/arch/i386/math-emu/Makefile b/arch/i386/math-emu/Makefile index 5564d87125f4..9b489779ce83 100644 --- a/arch/i386/math-emu/Makefile +++ b/arch/i386/math-emu/Makefile @@ -2,7 +2,7 @@ # Makefile for wm-FPU-emu # -L_TARGET := math.a +O_TARGET := math.o #DEBUG = -DDEBUGGING DEBUG = @@ -27,7 +27,7 @@ A_OBJS =reg_u_add.o reg_u_div.o reg_u_mul.o reg_u_sub.o \ div_Xsig.o polynom_Xsig.o round_Xsig.o \ shr_Xsig.o mul_Xsig.o -L_OBJS =$(C_OBJS) $(A_OBJS) +obj-y =$(C_OBJS) $(A_OBJS) include $(TOPDIR)/Rules.make diff --git a/arch/i386/mm/Makefile b/arch/i386/mm/Makefile index cee7d4e6d129..73e25bd3022a 100644 --- a/arch/i386/mm/Makefile +++ b/arch/i386/mm/Makefile @@ -8,6 +8,7 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := mm.o -O_OBJS := init.o fault.o ioremap.o extable.o + +obj-y := init.o fault.o ioremap.o extable.o include $(TOPDIR)/Rules.make diff --git a/drivers/Makefile b/drivers/Makefile index 9b5c9ec6ddf9..462ceea7b940 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -47,13 +47,5 @@ subdir-$(CONFIG_ACPI) += acpi # Subdirectories that should be entered when MAKING_MODULES=1, even if set to 'y'. both-m := $(filter $(mod-subdirs), $(subdir-y)) -# Translate to Rules.make lists. -SUB_DIRS := $(subdir-y) -MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m)) -ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-)) - -# net/hamradio is already in ALL_SUB_DIRS of drivers/net/Makefile -ALL_SUB_DIRS := $(filter-out net/hamradio, $(ALL_SUB_DIRS)) - include $(TOPDIR)/Rules.make diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 8ce7af56dbe1..a98418e00263 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -8,10 +8,6 @@ # In the future, some of these should be built conditionally. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) paride - O_TARGET := block.o export-objs := ll_rw_blk.o blkpg.o loop.o DAC960.o @@ -36,30 +32,6 @@ obj-$(CONFIG_BLK_DEV_DAC960) += DAC960.o obj-$(CONFIG_BLK_DEV_NBD) += nbd.o -ifeq ($(CONFIG_PARIDE),y) -SUB_DIRS += paride -MOD_IN_SUB_DIRS += paride -else - ifeq ($(CONFIG_PARIDE),m) - MOD_IN_SUB_DIRS += paride - endif -endif - - -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) +subdir-$(CONFIG_PARIDE) += paride include $(TOPDIR)/Rules.make diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 20e363b8e62d..520751f2dc54 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -885,6 +885,8 @@ void generic_make_request (int rw, struct buffer_head * bh) { int major = MAJOR(bh->b_rdev); request_queue_t *q; + + if (!bh->b_end_io) BUG(); if (blk_size[major]) { unsigned long maxsector = (blk_size[major][MINOR(bh->b_rdev)] << 1) + 1; unsigned int sector, count; diff --git a/drivers/block/paride/Makefile b/drivers/block/paride/Makefile index 86dbc0a8942c..76248b4a9c36 100644 --- a/drivers/block/paride/Makefile +++ b/drivers/block/paride/Makefile @@ -28,7 +28,4 @@ obj-$(CONFIG_PARIDE_ON20) += on20.o obj-$(CONFIG_PARIDE_ON26) += on26.o obj-$(CONFIG_PARIDE_KTTI) += ktti.o -L_OBJS := $(obj-y) -M_OBJS := $(obj-m) - include $(TOPDIR)/Rules.make diff --git a/drivers/cdrom/Makefile b/drivers/cdrom/Makefile index 225c230e8c9d..21f402d49ef0 100644 --- a/drivers/cdrom/Makefile +++ b/drivers/cdrom/Makefile @@ -3,6 +3,7 @@ # 30 Jan 1998, Michael Elizabeth Chastain, # Rewritten to use lists instead of if-statements. +O_TARGET := driver.o # All of the (potential) objects that export symbols. @@ -42,25 +43,6 @@ obj-$(CONFIG_SBPCD4) += sbpcd4.o cdrom.o obj-$(CONFIG_SJCD) += sjcd.o obj-$(CONFIG_CDU535) += sonycd535.o - - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) - - - -# Translate to Rules.make lists. - -L_TARGET := cdrom.a - -L_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) -LX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - - - # Hand off to Rules.make. include $(TOPDIR)/Rules.make diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 993f0f2e14ca..fd2da8725b62 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -9,28 +9,13 @@ # parent makes.. # -O_OBJS := -OX_OBJS := -M_OBJS := -MX_OBJS := - -# Object file lists. - -obj-y := -obj-m := -obj-n := -obj- := - -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) ftape joystick pcmcia rio drm agp - # # This file contains the font map for the default (hardware) font # FONTMAPFILE = cp437.uni O_TARGET := char.o + obj-y += tty_io.o n_tty.o tty_ioctl.o mem.o raw.o pty.o misc.o random.o # All of the (potential) objects that export symbols. @@ -135,13 +120,8 @@ obj-$(CONFIG_SERIAL167) += serial167.o obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -ifeq ($(CONFIG_RIO),y) - SUB_DIRS += rio -else - ifeq ($(CONFIG_RIO),m) - MOD_SUB_DIRS += rio - endif -endif +subdir-$(CONFIG_RIO) += rio +subdir-$(CONFIG_INPUT) += joystick obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o @@ -149,12 +129,6 @@ obj-$(CONFIG_PRINTER) += lp.o ifeq ($(CONFIG_INPUT),y) obj-y += joystick/js.o -SUB_DIRS += joystick -MOD_SUB_DIRS += joystick -else - ifeq ($(CONFIG_INPUT),m) - MOD_SUB_DIRS += joystick - endif endif obj-$(CONFIG_BUSMOUSE) += busmouse.o @@ -178,16 +152,13 @@ obj-$(CONFIG_INTEL_RNG) += i810_rng.o obj-$(CONFIG_QIC02_TAPE) += tpqic02.o +subdir-$(CONFIG_FTAPE) += ftape +subdir-$(CONFIG_DRM) += drm +subdir-$(CONFIG_PCMCIA) += pcmcia +subdir-$(CONFIG_agp) += agp + ifeq ($(CONFIG_FTAPE),y) obj-y += ftape/ftape.o -SUB_DIRS += ftape -ifneq ($(CONFIG_ZFTAPE),n) -MOD_SUB_DIRS += ftape -endif -else - ifeq ($(CONFIG_FTAPE),m) - MOD_SUB_DIRS += ftape - endif endif obj-$(CONFIG_H8) += h8.o @@ -196,33 +167,6 @@ obj-$(CONFIG_DZ) += dz.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o -ifeq ($(CONFIG_DRM),y) - SUB_DIRS += drm - MOD_SUB_DIRS += drm -else - ifeq ($(CONFIG_DRM),m) - MOD_SUB_DIRS += drm - endif -endif - -ifeq ($(CONFIG_PCMCIA),y) - SUB_DIRS += pcmcia - MOD_IN_SUB_DIRS += pcmcia -else - ifeq ($(CONFIG_PCMCIA),m) - MOD_IN_SUB_DIRS += pcmcia - endif -endif - -ifeq ($(CONFIG_AGP), y) - SUB_DIRS += agp - MOD_SUB_DIRS += agp -else - ifeq ($(CONFIG_AGP), m) - MOD_SUB_DIRS += agp - endif -endif - # Only one watchdog can succeed. We probe the hardware watchdog # drivers first, then the softdog driver. This means if your hardware # watchdog dies or is 'borrowed' for some reason the software watchdog @@ -240,32 +184,6 @@ obj-$(CONFIG_I810_TCO) += i810-tco.o obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -# Take multi-part drivers out of obj-y and put components in. - -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make fastdep: diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile index d20869b0e4b2..3e726b31431d 100644 --- a/drivers/char/agp/Makefile +++ b/drivers/char/agp/Makefile @@ -5,18 +5,14 @@ O_TARGET := agp.o -ifeq ($(CONFIG_AGP),y) - O_OBJS += agpgart_fe.o - OX_OBJS += agpgart_be.o -else - ifeq ($(CONFIG_AGP), m) - MI_OBJS += agpgart_fe.o - MIX_OBJS += agpgart_be.o - M_OBJS += agpgart.o - endif -endif +export-objs := agpgart_be.o + +multi-objs := agpgart.o +agpgart-objs := agpgart_fe.o agpgart_be.o + +obj-$(CONFIG_AGP) += agpgart.o include $(TOPDIR)/Rules.make -agpgart.o: agpgart_be.o agpgart_fe.o - $(LD) $(LD_RFLAG) -r -o $@ agpgart_be.o agpgart_fe.o +agpgart.o: $(agpgart-objs) + $(LD) $(LD_RFLAG) -r -o $@ $(agpgart-objs) diff --git a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile index b1b8d9768ee1..995aa7d50292 100644 --- a/drivers/char/drm/Makefile +++ b/drivers/char/drm/Makefile @@ -6,6 +6,7 @@ # drm.o is a fake target -- it is never built # The real targets are in the module-list O_TARGET := drm.o + module-list := gamma.o tdfx.o r128.o ffb.o mga.o i810.o export-objs := $(patsubst %.o,%_drv.o,$(module-list)) @@ -44,29 +45,16 @@ mga-objs := $(lib-objs) mga_drv.o mga_dma.o mga_context.o mga_bufs.o \ mga_state.o i810-objs := $(lib-objs) i810_drv.o i810_dma.o i810_context.o i810_bufs.o -obj-$(CONFIG_DRM_GAMMA) += gamma.o $(gamma-objs) -obj-$(CONFIG_DRM_TDFX) += tdfx.o $(tdfx-objs) -obj-$(CONFIG_DRM_R128) += r128.o $(r128-objs) -obj-$(CONFIG_DRM_FFB) += ffb.o $(ffb-objs) +obj-$(CONFIG_DRM_GAMMA) += gamma.o +obj-$(CONFIG_DRM_TDFX) += tdfx.o +obj-$(CONFIG_DRM_R128) += r128.o +obj-$(CONFIG_DRM_FFB) += ffb.o ifneq ($CONFIG_AGP),) -obj-$(CONFIG_DRM_MGA) += mga.o $(mga-objs) -obj-$(CONFIG_DRM_I810) += i810.o $(i810-objs) +obj-$(CONFIG_DRM_MGA) += mga.o +obj-$(CONFIG_DRM_I810) += i810.o endif -# Take module names out of obj-y and int-m - -obj-y := $(filter-out $(module-list), $(obj-y)) -int-m := $(filter-out $(module-list), $(obj-m)) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter $(module-list), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make gamma.o: $(gamma-objs) diff --git a/drivers/char/pcmcia/Makefile b/drivers/char/pcmcia/Makefile index a83e1f9138e8..897469fec85b 100644 --- a/drivers/char/pcmcia/Makefile +++ b/drivers/char/pcmcia/Makefile @@ -18,9 +18,4 @@ obj- := obj-$(CONFIG_PCMCIA_SERIAL_CS) += serial_cs.o obj-$(CONFIG_PCMCIA_SERIAL_CB) += serial_cb.o -O_OBJS := $(obj-y) -OX_OBJS := -M_OBJS := $(obj-m) -MX_OBJS := - include $(TOPDIR)/Rules.make diff --git a/drivers/char/rio/Makefile b/drivers/char/rio/Makefile index d6d696577aa7..6191d271c5ea 100644 --- a/drivers/char/rio/Makefile +++ b/drivers/char/rio/Makefile @@ -13,10 +13,9 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := rio.o -O_OBJS := rio_linux.o rioinit.o rioboot.o riocmd.o rioctrl.o riointr.o \ + +obj-y := rio_linux.o rioinit.o rioboot.o riocmd.o rioctrl.o riointr.o \ rioparam.o riopcicopy.o rioroute.o riotable.o riotty.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make - -rio.o: $(O_OBJS) \ No newline at end of file diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index f85ab2aa409c..c2d8a56448bf 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -8,16 +8,23 @@ # In the future, some of these should be built conditionally. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - O_TARGET := idedriver.o +export-objs := ide.o ide-features.o +list-multi := ide-mod.o ide-probe-mod.o + obj-y := obj-m := ide-obj-y := +obj-$(CONFIG_BLK_DEV_HD) += hd.o +obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o +obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o +obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o +obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o +obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o +obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o + ide-obj-$(CONFIG_BLK_DEV_AEC62XX) += aec62xx.o ide-obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o ide-obj-$(CONFIG_BLK_DEV_ALI15X3) += alim15x3.o @@ -31,7 +38,6 @@ ide-obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o ide-obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o ide-obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o ide-obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o -obj-$(CONFIG_BLK_DEV_HD) += hd.o ide-obj-$(CONFIG_BLK_DEV_HPT34X) += hpt34x.o ide-obj-$(CONFIG_BLK_DEV_HPT366) += hpt366.o ide-obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o @@ -59,35 +65,9 @@ ide-obj-$(CONFIG_BLK_DEV_VIA82CXXX) += via82cxxx.o ide-obj-$(CONFIG_PROC_FS) += ide-proc.o -export-objs := ide.o ide-features.o -list-multi := ide-mod.o ide-probe-mod.o ide-mod-objs := $(export-objs) $(ide-obj-y) ide-probe-mod-objs := ide-probe.o ide-geometry.o -obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o -obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o -obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o -obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o -obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o -obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o - -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make ide-mod.o: $(ide-mod-objs) diff --git a/drivers/md/Makefile b/drivers/md/Makefile index c37ce84dbac1..ab816b8f9d49 100644 --- a/drivers/md/Makefile +++ b/drivers/md/Makefile @@ -3,19 +3,11 @@ # O_TARGET := mddev.o -SUB_DIRS := -ALL_SUB_DIRS := -MOD_SUB_DIRS := export-objs := md.o xor.o list-multi := lvm-mod.o lvm-mod-objs := lvm.o lvm-snap.o -obj-y := -obj-m := -obj-n := -obj- := - # Note: link order is important. All raid personalities # and xor.o must come before md.o, as they each initialise # themselves, and md.o may use the personalities when it @@ -30,13 +22,6 @@ obj-$(CONFIG_MD_RAID5) += raid5.o xor.o obj-$(CONFIG_BLK_DEV_MD) += md.o obj-$(CONFIG_BLK_DEV_LVM) += lvm-mod.o -# Translate to Rules.make lists. -active-objs := $(sort $(obj-y) $(obj-m)) - -O_OBJS := $(obj-y) -M_OBJS := $(obj-m) -MIX_OBJS := $(filter $(export-objs), $(active-objs)) - include $(TOPDIR)/Rules.make lvm-mod.o: $(lvm-mod-objs) diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 5c46e8ef8400..b77e846ef0aa 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -9,14 +9,7 @@ # parent makes.. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - O_TARGET := misc.o -M_OBJS := -O_OBJS := -OX_OBJS := include $(TOPDIR)/Rules.make diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 61c14198b6aa..6168418fbce9 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -3,106 +3,37 @@ # Makefile for the Linux network (ethercard) device drivers. # -O_OBJS := -M_OBJS := -MX_OBJS := - -# Object file lists. - obj-y := obj-m := obj-n := obj- := -SUB_DIRS := -MOD_SUB_DIRS := -MOD_IN_SUB_DIRS := -ALL_SUB_DIRS := $(SUB_DIRS) fc hamradio irda pcmcia tokenring wan sk98lin \ - arcnet skfp tulip appletalk - O_TARGET := net.o # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := 8390.o arlan.o aironet4500_core.o aironet4500_card.o ppp_async.o \ - ppp_generic.o slhc.o pppox.o - -ifeq ($(CONFIG_PCMCIA),y) - SUB_DIRS += pcmcia - MOD_IN_SUB_DIRS += pcmcia -else - ifeq ($(CONFIG_PCMCIA),m) - MOD_IN_SUB_DIRS += pcmcia - endif -endif + ppp_generic.o slhc.o pppox.o auto_irq.o ifeq ($(CONFIG_TULIP),y) - SUB_DIRS += tulip obj-y += tulip/tulip.o -else - ifeq ($(CONFIG_TULIP),m) - MOD_SUB_DIRS += tulip - endif -endif - -ifeq ($(CONFIG_IRDA),y) -SUB_DIRS += irda -MOD_IN_SUB_DIRS += irda -else - ifeq ($(CONFIG_IRDA),m) - MOD_IN_SUB_DIRS += irda - endif -endif - -ifeq ($(CONFIG_TR),y) -SUB_DIRS += tokenring -MOD_IN_SUB_DIRS += tokenring -else - ifeq ($(CONFIG_TR),m) - MOD_IN_SUB_DIRS += tokenring - endif -endif - -ifeq ($(CONFIG_WAN),y) -SUB_DIRS += wan -MOD_IN_SUB_DIRS += wan -else - ifeq ($(CONFIG_WAN),m) - MOD_IN_SUB_DIRS += wan - endif -endif - -ifeq ($(CONFIG_NET_FC),y) -SUB_DIRS += fc -MOD_IN_SUB_DIRS += fc -else - ifeq ($(CONFIG_NET_FC),m) - MOD_IN_SUB_DIRS += fc - endif endif ifeq ($(CONFIG_ISDN_PPP),y) obj-$(CONFIG_ISDN) += slhc.o endif -ifeq ($(CONFIG_ARCNET),y) -SUB_DIRS += arcnet -MOD_IN_SUB_DIRS += arcnet -else - ifeq ($(CONFIG_ARCNET),m) - MOD_IN_SUB_DIRS += arcnet - endif -endif - -ifeq ($(CONFIG_APPLETALK),y) -SUB_DIRS += appletalk -MOD_IN_SUB_DIRS += appletalk -else - ifeq ($(CONFIG_APPLETALK),m) - MOD_IN_SUB_DIRS += appletalk - endif -endif +subdir-$(CONFIG_PCMCIA) += pcmcia +subdir-$(CONFIG_TULIP) += tulip +subdir-$(CONFIG_IRDA) += irda +subdir-$(CONFIG_TR) += tokenring +subdir-$(CONFIG_WAN) += wan +subdir-$(CONFIG_NET_FC) += fc +subdir-$(CONFIG_ARCNET) += arcnet +subdir-$(CONFIG_APPLETALK) += appletalk +subdir-$(CONFIG_SK98LIN) += sk98lin +subdir-$(CONFIG_SKFP) += skfp # # link order important here @@ -140,21 +71,11 @@ obj-$(CONFIG_NATSEMI) += natsemi.o obj-$(CONFIG_STNIC) += stnic.o 8390.o ifeq ($(CONFIG_SK98LIN),y) -SUB_DIRS += sk98lin obj-y += sk98lin/sk98lin.o -else - ifeq ($(CONFIG_SK98LIN),m) - MOD_IN_SUB_DIRS += sk98lin - endif endif ifeq ($(CONFIG_SKFP),y) - SUB_DIRS += skfp obj-y += skfp/skfp.o -else - ifeq ($(CONFIG_SKFP),m) - MOD_IN_SUB_DIRS += skfp - endif endif obj-$(CONFIG_VIA_RHINE) += via-rhine.o @@ -281,33 +202,8 @@ obj-$(CONFIG_TUN) += tun.o # HIPPI adapters # - -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -# Take multi-part drivers out of obj-y and put components in. - -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - ifneq ($(ARCH),s390) -OX_OBJS += auto_irq.o +obj-y += auto_irq.o endif include $(TOPDIR)/Rules.make diff --git a/drivers/net/appletalk/Makefile b/drivers/net/appletalk/Makefile index 4fde3cc479a4..f142745095c5 100644 --- a/drivers/net/appletalk/Makefile +++ b/drivers/net/appletalk/Makefile @@ -6,10 +6,6 @@ # unless it's something special (ie not a .c file). # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - obj-y := obj-n := obj-m := @@ -21,10 +17,6 @@ obj-$(CONFIG_COPS) += cops.o obj-$(CONFIG_LTPC) += ltpc.o O_TARGET := appletalk.o -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) include $(TOPDIR)/Rules.make diff --git a/drivers/net/arcnet/Makefile b/drivers/net/arcnet/Makefile index 2fad8153112e..e0263d9fd624 100644 --- a/drivers/net/arcnet/Makefile +++ b/drivers/net/arcnet/Makefile @@ -5,10 +5,6 @@ # unless it's something special (ie not a .c file). # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - obj-y := obj-n := obj-m := @@ -27,9 +23,5 @@ obj-$(CONFIG_ARCNET_COM20020_ISA) += com20020-isa.o obj-$(CONFIG_ARCNET_COM20020_PCI) += com20020-pci.o L_TARGET := arcnet.a -L_OBJS := $(filter-out $(export-objs), $(obj-y)) -LX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) include $(TOPDIR)/Rules.make diff --git a/drivers/net/fc/Makefile b/drivers/net/fc/Makefile index a36b9f85576e..c521ce4b7173 100644 --- a/drivers/net/fc/Makefile +++ b/drivers/net/fc/Makefile @@ -9,7 +9,4 @@ O_TARGET := fc.o obj-$(CONFIG_IPHASE5526) += iph5526.o -O_OBJS := $(obj-y) -M_OBJS := $(obj-m) - include $(TOPDIR)/Rules.make diff --git a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile index 3c5e330b52f2..57304cc4729e 100644 --- a/drivers/net/hamradio/Makefile +++ b/drivers/net/hamradio/Makefile @@ -11,10 +11,6 @@ # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) soundmodem - O_TARGET := hamradio.o export-objs = hdlcdrv.o @@ -34,22 +30,10 @@ obj-$(CONFIG_BAYCOM_PAR) += baycom_par.o hdlcdrv.o obj-$(CONFIG_BAYCOM_EPP) += baycom_epp.o hdlcdrv.o obj-$(CONFIG_SOUNDMODEM) += hdlcdrv.o +subdir-$(CONFIG_SOUNDMODEM) += soundmodem + ifeq ($(CONFIG_SOUNDMODEM),y) -SUB_DIRS += soundmodem -O_OBJS += soundmodem/soundmodem.o -else - ifeq ($(CONFIG_SOUNDMODEM),m) - MOD_SUB_DIRS += soundmodem - endif +obj-y += soundmodem/soundmodem.o endif -# Files that are both resident and modular: remove from modular. -obj-m := $(filter-out $(obj-y), $(obj-m)) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make diff --git a/drivers/net/hamradio/soundmodem/Makefile b/drivers/net/hamradio/soundmodem/Makefile index a5adf62d02cb..959701ab15bb 100644 --- a/drivers/net/hamradio/soundmodem/Makefile +++ b/drivers/net/hamradio/soundmodem/Makefile @@ -11,36 +11,18 @@ O_TARGET := soundmodem.o -O_OBJS := sm.o -ifeq ($(CONFIG_SOUNDMODEM_SBC),y) -O_OBJS += sm_sbc.o -endif -ifeq ($(CONFIG_SOUNDMODEM_WSS),y) -O_OBJS += sm_wss.o -endif -ifeq ($(CONFIG_SOUNDMODEM_AFSK1200),y) -O_OBJS += sm_afsk1200.o -endif -ifeq ($(CONFIG_SOUNDMODEM_AFSK2400_7),y) -O_OBJS += sm_afsk2400_7.o -endif -ifeq ($(CONFIG_SOUNDMODEM_AFSK2400_8),y) -O_OBJS += sm_afsk2400_8.o -endif -ifeq ($(CONFIG_SOUNDMODEM_AFSK2666),y) -O_OBJS += sm_afsk2666.o -endif -ifeq ($(CONFIG_SOUNDMODEM_HAPN4800),y) -O_OBJS += sm_hapn4800.o -endif -ifeq ($(CONFIG_SOUNDMODEM_PSK4800),y) -O_OBJS += sm_psk4800.o -endif -ifeq ($(CONFIG_SOUNDMODEM_FSK9600),y) -O_OBJS += sm_fsk9600.o -endif - -M_OBJS := $(O_TARGET) +obj-y := sm.o +obj-$(CONFIG_SOUNDMODEM_SBC) += sm_sbc.o +obj-$(CONFIG_SOUNDMODEM_WSS) += sm_wss.o +obj-$(CONFIG_SOUNDMODEM_AFSK1200) += sm_afsk1200.o +obj-$(CONFIG_SOUNDMODEM_AFSK2400_7) += sm_afsk2400_7.o +obj-$(CONFIG_SOUNDMODEM_AFSK2400_8) += sm_afsk2400_8.o +obj-$(CONFIG_SOUNDMODEM_AFSK2666) += sm_afsk2666.o +obj-$(CONFIG_SOUNDMODEM_HAPN4800) += sm_hapn4800.o +obj-$(CONFIG_SOUNDMODEM_PSK4800) += sm_psk4800.o +obj-$(CONFIG_SOUNDMODEM_FSK9600) += sm_fsk9600.o + +obj-m := $(O_TARGET) all: all_targets .PHONY: all diff --git a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile index f923bf0123d3..976f1c101a0d 100644 --- a/drivers/net/irda/Makefile +++ b/drivers/net/irda/Makefile @@ -5,10 +5,6 @@ # Rewritten to use lists instead of if-statements. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - O_TARGET := irda.o export-objs = irport.o @@ -27,14 +23,4 @@ obj-$(CONFIG_GIRBIL_DONGLE) += girbil.o obj-$(CONFIG_LITELINK_DONGLE) += litelink.o obj-$(CONFIG_OLD_BELKIN_DONGLE) += old_belkin.o - -# Files that are both resident and modular: remove from modular. -obj-m := $(filter-out $(obj-y), $(obj-m)) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make diff --git a/drivers/net/pcmcia/Makefile b/drivers/net/pcmcia/Makefile index acb40aa1b837..baf9c19ae167 100644 --- a/drivers/net/pcmcia/Makefile +++ b/drivers/net/pcmcia/Makefile @@ -4,10 +4,6 @@ # Makefile for the Linux PCMCIA network device drivers. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - O_TARGET := pcmcia_net.o obj-y := @@ -39,11 +35,6 @@ obj-$(CONFIG_PCMCIA_XIRTULIP) += xircom_tulip_cb.o obj-$(CONFIG_PCMCIA_IBMTR) += ibmtr_cs.o -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(filter-out $(export-objs), $(obj-m)) -MX_OBJS := $(filter $(export-objs), $(obj-m)) - include $(TOPDIR)/Rules.make .ibmtr.o: ../tokenring/ibmtr.c diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile index fbf1a6d6b778..c4164122f9ae 100644 --- a/drivers/net/sk98lin/Makefile +++ b/drivers/net/sk98lin/Makefile @@ -3,20 +3,12 @@ # Makefile for the SysKonnect SK-98xx device driver. # -ifeq ($(CONFIG_SK98LIN),y) - O_TARGET := sk98lin.o - O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ - ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \ - skxmac2.o skcsum.o -else - ifeq ($(CONFIG_SK98LIN),m) - M_OBJS := sk98lin.o - O_TARGET := sk98lin.o - O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ +O_TARGET := sk98lin.o + +obj-y := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \ skxmac2.o skcsum.o - endif -endif +obj-m := $(O_TARGET) # DBGDEF = \ # -DDEBUG diff --git a/drivers/net/skfp/Makefile b/drivers/net/skfp/Makefile index 5f681ca170ae..f8cc4b23a69d 100644 --- a/drivers/net/skfp/Makefile +++ b/drivers/net/skfp/Makefile @@ -2,22 +2,12 @@ # Makefile for the SysKonnect FDDI PCI adapter driver # -ifeq ($(CONFIG_SKFP),y) - O_TARGET := skfp.o - O_OBJS = skfddi.o hwmtm.o fplustm.o smt.o cfm.o \ +O_TARGET := skfp.o +obj-y := skfddi.o hwmtm.o fplustm.o smt.o cfm.o \ ecm.o pcmplc.o pmf.o queue.o rmt.o \ smtdef.o smtinit.o smttimer.o srf.o lnkstat.o \ smtparse.o hwt.o drvfbi.o ess.o -else - ifeq ($(CONFIG_SKFP),m) - M_OBJS := skfp.o - O_TARGET := skfp.o - O_OBJS = skfddi.o hwmtm.o fplustm.o smt.o cfm.o \ - ecm.o pcmplc.o pmf.o queue.o rmt.o \ - smtdef.o smtinit.o smttimer.o srf.o lnkstat.o \ - smtparse.o hwt.o drvfbi.o ess.o - endif -endif +obj-m := skfp.o # NOTE: # Compiling this driver produces some warnings (and some more are diff --git a/drivers/net/tokenring/Makefile b/drivers/net/tokenring/Makefile index 1fa4547c43a8..e25959e32c71 100644 --- a/drivers/net/tokenring/Makefile +++ b/drivers/net/tokenring/Makefile @@ -6,10 +6,6 @@ # unless it's something special (ie not a .c file). # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - obj-y := obj-n := obj-m := @@ -26,9 +22,5 @@ obj-$(CONFIG_TMSPCI) += tmspci.o obj-$(CONFIG_SMCTR) += smctr.o L_TARGET := tr.a -L_OBJS := $(filter-out $(export-objs), $(obj-y)) -LX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) include $(TOPDIR)/Rules.make diff --git a/drivers/net/tulip/Makefile b/drivers/net/tulip/Makefile index 6e1368e32073..96cd0b3f154b 100644 --- a/drivers/net/tulip/Makefile +++ b/drivers/net/tulip/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := tulip.o -O_OBJS := 21142.o eeprom.o interrupt.o media.o pnic.o timer.o tulip_core.o -M_OBJS := $(O_TARGET) + +obj-y := 21142.o eeprom.o interrupt.o media.o pnic.o timer.o tulip_core.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile index 061badd125e2..6f37f81cb195 100644 --- a/drivers/net/wan/Makefile +++ b/drivers/net/wan/Makefile @@ -6,8 +6,6 @@ # SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) lmc O_TARGET := wan.o @@ -38,14 +36,10 @@ obj-$(CONFIG_LANMEDIA) += syncppp.o obj-$(CONFIG_SYNCLINK_SYNCPPP) += syncppp.o obj-$(CONFIG_X25_ASY) += x25_asy.o +subdir-$(CONFIG_LANMEDIA) += lmc + ifeq ($(CONFIG_LANMEDIA),y) - SUB_DIRS += lmc - MOD_IN_SUB_DIRS += lmc obj-y += lmc/lmc.o -else - ifeq ($(CONFIG_LANMEDIA),m) - MOD_IN_SUB_DIRS += lmc - endif endif obj-$(CONFIG_DLCI) += dlci.o @@ -55,29 +49,6 @@ obj-$(CONFIG_CYCLADES_SYNC) += cycx_drv.o cyclomx.o obj-$(CONFIG_LAPBETHER) += lapbether.o obj-$(CONFIG_SBNI) += sbni.o - -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make wanpipe.o: $(wanpipe-objs) diff --git a/drivers/net/wan/lmc/Makefile b/drivers/net/wan/lmc/Makefile index fbfd22489565..222435477d43 100644 --- a/drivers/net/wan/lmc/Makefile +++ b/drivers/net/wan/lmc/Makefile @@ -4,24 +4,11 @@ # Specifically the 1000,1200,5200,5245 # -ifeq ($(CONFIG_LANMEDIA),y) - O_TARGET := lmc.o - O_OBJS = lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o -else - ifeq ($(CONFIG_LANMEDIA),m) - M_OBJS := lmc.o - O_TARGET := lmc.o - O_OBJS = lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o - endif -endif +O_TARGET := lmc.o -# -# Base debugging and event log (doubles lmc.o size) -# -# DBGDEF = \ -# -DDEBUG +obj-y := lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o +obj-m := lmc.o -# # Like above except every packet gets echoed to KERN_DEBUG # in hex # diff --git a/drivers/parport/Makefile b/drivers/parport/Makefile index f2f7b1d7069f..db514ff8c164 100644 --- a/drivers/parport/Makefile +++ b/drivers/parport/Makefile @@ -9,7 +9,7 @@ # Rewritten to use lists instead of if-statements. # -L_TARGET := parport.a +O_TARGET := driver.o export-objs := init.o parport_pc.o @@ -28,24 +28,6 @@ obj-$(CONFIG_PARPORT_ATARI) += parport_atari.o obj-$(CONFIG_PARPORT_SUNBPP) += parport_sunbpp.o obj-$(CONFIG_PARPORT_GSC) += parport_gsc.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -L_OBJS := $(filter-out $(export-objs), $(obj-y)) -LX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make parport.o: $(parport-objs) diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index c2e6ebdf9f68..a4e79a6159e5 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -9,22 +9,21 @@ # parent makefile. # -L_TARGET := pci.a +O_TARGET := driver.o -# Nasty trick as we need to link files with no references from the outside. -O_TARGET := pci_core.o -L_OBJS := pci_core.o -O_OBJS := quirks.o -OX_OBJS := pci.o +export-objs := pci.o -ifdef CONFIG_PROC_FS -O_OBJS += proc.o -endif +obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o setup-res.o +obj-$(CONFIG_PROC_FS) += proc.o -L_OBJS += compat.o names.o setup-res.o setup-bus.o setup-irq.o +# +# Some architectures use the generic PCI setup functions +# +obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o +obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o ifndef CONFIG_X86 -L_OBJS += syscall.o +obj-y += syscall.o endif include $(TOPDIR)/Rules.make diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 6491ac4b0a55..b1fc61f68917 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -8,42 +8,40 @@ # Note 2! The CFLAGS definitions are now inherited from the # parent makes.. -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) +O_TARGET := pcmcia.o + +export-objs := ds.o cs.o cb_enabler.o yenta.o pci_socket.o + +multi-list = pcmcia_core.o yenta_socket.o + +yenta_socket-objs := pci_socket.o yenta.o +pcmcia_core-objs := cistpl.o rsrc_mgr.o bulkmem.o cs.o +ifeq ($(CONFIG_CARDBUS),y) + pcmcia_core-objs += cardbus.o +endif ifeq ($(CONFIG_PCMCIA),y) - O_OBJS := cistpl.o rsrc_mgr.o bulkmem.o - OX_OBJS := ds.o cs.o - O_TARGET := pcmcia.o + obj-y := cistpl.o rsrc_mgr.o bulkmem.o ds.o cs.o ifeq ($(CONFIG_CARDBUS),y) - O_OBJS += cardbus.o - OX_OBJS += cb_enabler.o yenta.o pci_socket.o + obj-y += cardbus.o cb_enabler.o yenta.o pci_socket.o endif ifeq ($(CONFIG_I82365),y) - O_OBJS += i82365.o + obj-y += i82365.o endif ifeq ($(CONFIG_TCIC),y) - O_OBJS += tcic.o + obj-y += tcic.o endif else ifeq ($(CONFIG_PCMCIA),m) - M_OBJS := pcmcia_core.o - MX_OBJS := ds.o - MIX_OBJS := cs.o - CORE_OBJS := cistpl.o rsrc_mgr.o bulkmem.o cs.o + obj-m := pcmcia_core.o ds.o ifeq ($(CONFIG_I82365),y) - M_OBJS += i82365.o + obj-m += i82365.o endif ifeq ($(CONFIG_TCIC),y) - M_OBJS += tcic.o + obj-m += tcic.o endif ifeq ($(CONFIG_CARDBUS),y) - M_OBJS += yenta_socket.o - CORE_OBJS += cardbus.o - CARDBUS_OBJS := pci_socket.o yenta.o - OX_OBJS += pci_socket.o yenta.o - MX_OBJS += cb_enabler.o + obj-m += yenta_socket.o cb_enabler.o endif endif endif diff --git a/drivers/pnp/Makefile b/drivers/pnp/Makefile index d9b6fe96b051..0ba0d0346887 100644 --- a/drivers/pnp/Makefile +++ b/drivers/pnp/Makefile @@ -8,30 +8,20 @@ # Note 2! The CFLAGS definitions are now inherited from the # parent makes.. -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) +O_TARGET := pnp.o -PROC_OBJS := +export-objs := isapnp.o +multi-objs := isa-pnp.o ifdef CONFIG_PROC_FS PROC_OBJS += isapnp_proc.o endif -ifeq ($(CONFIG_ISAPNP),m) - M_OBJS := isa-pnp.o - MIX_OBJS := isapnp.o - MI_OBJS := quirks.o $(PROC_OBJS) -endif - -ifeq ($(CONFIG_ISAPNP),y) - O_TARGET := pnp.o - OX_OBJS := isapnp.o - O_OBJS := quirks.o $(PROC_OBJS) -endif +isa-pnp-objs := isapnp.o quirks.o $(PROC_OBJS) +obj-$(CONFIG_ISAPNP) += isa-pnp.o include $(TOPDIR)/Rules.make -isa-pnp.o: $(MIX_OBJS) $(MI_OBJS) - $(LD) $(LD_RFLAG) -r -o $@ $(MIX_OBJS) $(MI_OBJS) +isa-pnp.o: $(isa-pnp-objs) + $(LD) $(LD_RFLAG) -r -o $@ $(isa-pnp-objs) diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 02766fa0d800..871858523fbd 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -94,7 +94,7 @@ static void __init quirk_sb16audio_resources(struct pci_dev *dev) changed = 1; } if(changed) - printk(KERN_INFO "ISAPnP: SB audio device quirk - increasing port range\n"); + printk(KERN_INFO "isapnp: SB audio device quirk - increasing port range\n"); return; } diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index 6f262b998657..36ef8ea7fe0c 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -129,24 +129,6 @@ sr_mod-objs := sr.o sr_ioctl.o sr_vendor.o initio-objs := ini9100u.o i91uscsi.o a100u2w-objs := inia100.o i60uscsi.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make diff --git a/drivers/scsi/pcmcia/Makefile b/drivers/scsi/pcmcia/Makefile index 2e0c1323df8a..f56553102fc6 100644 --- a/drivers/scsi/pcmcia/Makefile +++ b/drivers/scsi/pcmcia/Makefile @@ -4,10 +4,6 @@ # Makefile for the Linux PCMCIA SCSI drivers. # -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) - obj-y := obj-m := obj-n := @@ -34,22 +30,6 @@ apa1480-objs := apa1480_stub.o aic7xxx.o fdomain-objs := fdomain_stub.o fdomain.o qlogic-objs := qlogic_stub.o qlogicfas.o -# Extract lists of the multi-part drivers. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(filter-out $(export-objs), $(obj-m)) -MX_OBJS := $(filter $(export-objs), $(obj-m)) -MI_OBJS := $(filter-out $(export-objs), $(int-m)) -MIX_OBJS := $(filter $(export-objs), $(int-m)) - include $(TOPDIR)/Rules.make aha152x_cs.o: $(aha152x-objs) diff --git a/drivers/sound/Makefile b/drivers/sound/Makefile index 0a29d73d0e1e..e7ee317e6743 100644 --- a/drivers/sound/Makefile +++ b/drivers/sound/Makefile @@ -4,14 +4,6 @@ # Rewritten to use lists instead of if-statements. - -# My subdirectories. - -SUB_DIRS := -MOD_SUB_DIRS := -MOD_IN_SUB_DIRS := -ALL_SUB_DIRS := $(SUB_DIRS) emu10k1 - # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. @@ -20,17 +12,6 @@ export-objs := ad1848.o audio_syms.o midi_syms.o mpu401.o \ sound_core.o sound_syms.o uart401.o \ nm256_audio.o ac97.o ac97_codec.o - - -# Object file lists. - -obj-y := -obj-m := -obj-n := -obj- := - - - # Each configuration option enables a list of files. obj-$(CONFIG_SOUND) += soundcore.o @@ -83,23 +64,16 @@ obj-$(CONFIG_SOUND_CS4281) += cs4281.o obj-$(CONFIG_SOUND_MAESTRO) += maestro.o obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o +subdir-$(CONFIG_SOUND_EMU10K1) += emu10k1 + ifeq ($(CONFIG_SOUND_EMU10K1),y) - SUB_DIRS += emu10k1 obj-y += emu10k1/emu10k1.o -else - ifeq ($(CONFIG_SOUND_EMU10K1),m) - MOD_SUB_DIRS += emu10k1 - endif endif +subdir-$(CONFIG_DMASOUND) += dmasound + ifeq ($(CONFIG_DMASOUND),y) - SUB_DIRS += dmasound - MOD_IN_SUB_DIRS += dmasound obj-y += dmasound/dmasound.o -else - ifeq ($(CONFIG_DMASOUND),m) - MOD_IN_SUB_DIRS += dmasound - endif endif @@ -124,39 +98,8 @@ vidc_mod-objs := vidc.o vidc_fill.o wavefront-objs := wavfront.o wf_midi.o yss225.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - - - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - - -# Take multi-part drivers out of obj-y and put components in. - -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - - - -# Translate to Rules.make lists. - O_TARGET := sounddrivers.o -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) -MI_OBJS := $(sort $(filter-out $(export-objs), $(int-m))) -MIX_OBJS := $(sort $(filter $(export-objs), $(int-m))) - include $(TOPDIR)/Rules.make diff --git a/drivers/sound/dmasound/Makefile b/drivers/sound/dmasound/Makefile index 535146de2431..09f8c09b3362 100644 --- a/drivers/sound/dmasound/Makefile +++ b/drivers/sound/dmasound/Makefile @@ -7,12 +7,6 @@ # # Note 2! The CFLAGS definitions are now in the main makefile... -O_TARGET := -O_OBJS := -OX_OBJS := -M_OBJS := -MX_OBJS := - export-objs := dmasound_core.o obj-$(CONFIG_DMASOUND_ATARI) += dmasound_core.o dmasound_atari.o @@ -20,17 +14,6 @@ obj-$(CONFIG_DMASOUND_AWACS) += dmasound_core.o dmasound_awacs.o obj-$(CONFIG_DMASOUND_PAULA) += dmasound_core.o dmasound_paula.o obj-$(CONFIG_DMASOUND_Q40) += dmasound_core.o dmasound_q40.o -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - ifeq ($(CONFIG_DMASOUND),y) O_TARGET = dmasound.o endif diff --git a/drivers/sound/emu10k1/Makefile b/drivers/sound/emu10k1/Makefile index 0ae31514085e..17945f53b3eb 100644 --- a/drivers/sound/emu10k1/Makefile +++ b/drivers/sound/emu10k1/Makefile @@ -2,20 +2,12 @@ # # 12 Apr 2000 Rui Sousa -ifeq ($(CONFIG_SOUND_EMU10K1),y) - O_TARGET := emu10k1.o - O_OBJS = audio.o cardmi.o cardmo.o cardwi.o cardwo.o ecard.o \ - emuadxmg.o hwaccess.o irqmgr.o main.o midi.o mixer.o \ - recmgr.o timer.o voicemgr.o -else - ifeq ($(CONFIG_SOUND_EMU10K1),m) - M_OBJS := emu10k1.o - O_TARGET := emu10k1.o - O_OBJS = audio.o cardmi.o cardmo.o cardwi.o cardwo.o ecard.o \ +O_TARGET := emu10k1.o + +obj-y := audio.o cardmi.o cardmo.o cardwi.o cardwo.o ecard.o \ emuadxmg.o hwaccess.o irqmgr.o main.o midi.o mixer.o \ recmgr.o timer.o voicemgr.o - endif -endif +obj-m := $(O_TARGET) ifdef DEBUG EXTRA_CFLAGS += -DEMU10K1_DEBUG diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 217fa9f2c229..c53a93b26353 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -4,15 +4,9 @@ # Subdirs. -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -ALL_SUB_DIRS := $(SUB_DIRS) serial storage - # The target object and module list name. O_TARGET := usbdrv.o -M_OBJS := -O_OBJS := # Objects that export symbols. @@ -68,35 +62,17 @@ obj-$(CONFIG_USB_NET1080) += net1080.o # Object files in subdirectories +subdir-$(CONFIG_USB_SERIAL) += serial +subdir-$(CONFIG_USB_STORAGE) += storage + ifeq ($(CONFIG_USB_SERIAL),y) - SUB_DIRS += serial obj-y += serial/usb-serial.o -else - ifeq ($(CONFIG_USB_SERIAL),m) - MOD_SUB_DIRS += serial - endif endif ifeq ($(CONFIG_USB_STORAGE),y) - SUB_DIRS += storage obj-y += storage/storage.o -else - ifeq ($(CONFIG_USB_STORAGE),m) - MOD_SUB_DIRS += storage - endif endif -# Translate to Rules.make lists. -multi-used := $(filter $(list-multi), $(obj-y) $(obj-m)) -multi-objs := $(foreach m, $(multi-used), $($(basename $(m))-objs)) -active-objs := $(sort $(multi-objs) $(obj-y) $(obj-m)) - -O_OBJS := $(obj-y) -M_OBJS := $(obj-m) -MIX_OBJS := $(filter $(export-objs), $(active-objs)) - -# The global Rules.make. - include $(TOPDIR)/Rules.make # Link rules for multi-part drivers. diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile index 97b5516aab29..1f73146c56c1 100644 --- a/drivers/usb/serial/Makefile +++ b/drivers/usb/serial/Makefile @@ -3,16 +3,9 @@ # O_TARGET := usb-serial.o -M_OBJS := -O_OBJS := # Object file lists. -obj-y := -obj-m := -obj-n := -obj- := - obj-$(CONFIG_USB_SERIAL) += usbserial.o obj-$(CONFIG_USB_SERIAL_VISOR) += visor.o obj-$(CONFIG_USB_SERIAL_WHITEHEAT) += whiteheat.o @@ -28,12 +21,5 @@ obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o # Objects that export symbols. export-objs := usbserial.o -# Translate to Rules.make lists. - -O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) -OX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile index f0f177d2cedf..411233648848 100644 --- a/drivers/usb/storage/Makefile +++ b/drivers/usb/storage/Makefile @@ -23,21 +23,6 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_DPCM) += dpcm.o usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \ initializers.o $(usb-storage-obj-y) -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Take multi-part drivers out of obj-y and put components in. -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. -O_OBJS := $(obj-y) -M_OBJS := $(obj-m) -MI_OBJS := $(int-m) - include $(TOPDIR)/Rules.make usb-storage.o: $(usb-storage-objs) diff --git a/drivers/video/Makefile b/drivers/video/Makefile index c0fa1668f86f..14c6a4453680 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -2,11 +2,6 @@ # 5 Aug 1999, James Simmons, # Rewritten to use lists instead of if-statements. -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -MOD_IN_SUB_DIRS := -ALL_SUB_DIRS := $(SUB_DIRS) matrox riva - O_TARGET := video.o O_OBJS := M_OBJS := @@ -22,12 +17,6 @@ export-objs := fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \ fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o fbcon-vga8-planes.o \ matrox/matroxfb.o cyber2000fb.o fbcon-hga.o -# Object file lists. -obj-y := -obj-m := -obj-n := -obj- := - # Each configuration option enables a list of files. obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o @@ -90,35 +79,21 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o +subdir-$(CONFIG_FB_MATROX) += matrox ifeq ($(CONFIG_FB_MATROX),y) -SUB_DIRS += matrox obj-y += matrox/matrox.o -MOD_SUB_DIRS += matrox -else - ifeq ($(CONFIG_FB_MATROX),m) - MOD_SUB_DIRS += matrox - endif endif +subdir-$(CONFIG_FB_RIVA) += riva ifeq ($(CONFIG_FB_RIVA),y) -SUB_DIRS += riva obj-y += riva/rivafb.o -else - ifeq ($(CONFIG_FB_RIVA),m) - MOD_SUB_DIRS += riva - endif endif +subdir-$(CONFIG_FB_SIS) += sis ifeq ($(CONFIG_FB_SIS),y) -SUB_DIRS += sis obj-y += sis/sisfb.o -else - ifeq ($(CONFIG_FB_SIS),m) - MOD_SUB_DIRS += sis - endif endif - obj-$(CONFIG_FB_SUN3) += sun3fb.o obj-$(CONFIG_FB_BWTWO) += bwtwofb.o obj-$(CONFIG_FB_HGA) += hgafb.o @@ -145,30 +120,6 @@ obj-$(CONFIG_FBCON_MFB) += fbcon-mfb.o obj-$(CONFIG_FBCON_VGA) += fbcon-vga.o obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -# Take multi-part drivers out of obj-y and put components in. - -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make clean: diff --git a/drivers/video/matrox/Makefile b/drivers/video/matrox/Makefile index fcf02722b627..912414b5c265 100644 --- a/drivers/video/matrox/Makefile +++ b/drivers/video/matrox/Makefile @@ -2,56 +2,19 @@ # 5 Aug 1999, James Simmons, # Rewritten to use lists instead of if-statements. -SUB_DIRS := -MOD_SUB_DIRS := $(SUB_DIRS) -MOD_IN_SUB_DIRS := -ALL_SUB_DIRS := $(SUB_DIRS) - O_TARGET := matrox.o -O_OBJS := -M_OBJS := # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o -# Object file lists. -obj-y := -obj-m := -obj-n := -obj- := - # Each configuration option enables a list of files. obj-$(CONFIG_FB_MATROX) += matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o obj-$(CONFIG_FB_MATROX_I2C) += i2c-matroxfb.o obj-$(CONFIG_FB_MATROX_MAVEN) += matroxfb_maven.o matroxfb_crtc2.o -# Extract lists of the multi-part drivers. -# The 'int-*' lists are the intermediate files used to build the multi's. - -multi-y := $(filter $(list-multi), $(obj-y)) -multi-m := $(filter $(list-multi), $(obj-m)) -int-y := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs))) -int-m := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs))) - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) -int-m := $(filter-out $(int-y), $(int-m)) - -# Take multi-part drivers out of obj-y and put components in. - -obj-y := $(filter-out $(list-multi), $(obj-y)) $(int-y) - -# Translate to Rules.make lists. - -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - include $(TOPDIR)/Rules.make clean: diff --git a/drivers/video/riva/Makefile b/drivers/video/riva/Makefile index 87502e25c3c7..07d87e752838 100644 --- a/drivers/video/riva/Makefile +++ b/drivers/video/riva/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := rivafb.o -O_OBJS := fbdev.o riva_hw.o -M_OBJS := $(O_TARGET) + +obj-y := fbdev.o riva_hw.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/drivers/video/sis/Makefile b/drivers/video/sis/Makefile index 2e657f107cff..9a4a2341740f 100644 --- a/drivers/video/sis/Makefile +++ b/drivers/video/sis/Makefile @@ -3,9 +3,9 @@ # O_TARGET := sisfb.o -O_OBJS := sis_main.o sis_300.o sis_301.o -#O_OBJS := sis_300.o -M_OBJS := $(O_TARGET) + +obj-y := sis_main.o sis_300.o sis_301.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/Makefile b/fs/Makefile index 5bed63c84b57..d63fd61bda9e 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -75,17 +75,4 @@ obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o)) -# Subdirectories that should be entered when MAKING_MODULES=1, even if set to 'y'. -both-m := $(filter $(mod-subdirs), $(subdir-y)) - -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - -SUB_DIRS := $(subdir-y) -MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m)) -ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-)) - include $(TOPDIR)/Rules.make diff --git a/fs/adfs/Makefile b/fs/adfs/Makefile index 6ce002004d5f..f1a279dde883 100644 --- a/fs/adfs/Makefile +++ b/fs/adfs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := adfs.o -O_OBJS := dir.o dir_f.o dir_fplus.o file.o inode.o map.o super.o -M_OBJS := $(O_TARGET) + +obj-y := dir.o dir_f.o dir_fplus.o file.o inode.o map.o super.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/affs/Makefile b/fs/affs/Makefile index c0def3c92f1e..122c4be7b46c 100644 --- a/fs/affs/Makefile +++ b/fs/affs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := affs.o -O_OBJS := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o -M_OBJS := $(O_TARGET) + +obj-y := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/autofs/Makefile b/fs/autofs/Makefile index 1681c3d31e83..5c8dbcfe38a0 100644 --- a/fs/autofs/Makefile +++ b/fs/autofs/Makefile @@ -5,31 +5,8 @@ # O_TARGET := autofs.o -O_OBJS := dir.o dirhash.o init.o inode.o root.o symlink.o waitq.o -M_OBJS := $(O_TARGET) +obj-y := dir.o dirhash.o init.o inode.o root.o symlink.o waitq.o +obj-m := $(O_TARGET) -ifdef TOPDIR -# -# Part of the kernel code -# include $(TOPDIR)/Rules.make -else -# -# Standalone (handy for development) -# -include ../Makefile.rules - -CFLAGS += -D__KERNEL__ -DMODULE $(KFLAGS) -I../include -I$(KINCLUDE) $(MODFLAGS) - -all: $(O_TARGET) - -$(O_TARGET): $(O_OBJS) - $(LD) -r -o $(O_TARGET) $(O_OBJS) - -install: $(O_TARGET) - install -c $(O_TARGET) /lib/modules/`uname -r`/fs - -clean: - rm -f *.o *.s -endif diff --git a/fs/autofs4/Makefile b/fs/autofs4/Makefile index 3e3f2cc22471..1eb09f0bf1b1 100644 --- a/fs/autofs4/Makefile +++ b/fs/autofs4/Makefile @@ -5,31 +5,9 @@ # O_TARGET := autofs4.o -O_OBJS := init.o inode.o root.o symlink.o waitq.o expire.o -M_OBJS := $(O_TARGET) +obj-y := init.o inode.o root.o symlink.o waitq.o expire.o -ifdef TOPDIR -# -# Part of the kernel code -# -include $(TOPDIR)/Rules.make -else -# -# Standalone (handy for development) -# -include ../Makefile.rules +obj-m := $(O_TARGET) -CFLAGS += -D__KERNEL__ -DMODULE $(KFLAGS) -I../include -I$(KINCLUDE) $(MODFLAGS) - -all: $(O_TARGET) - -$(O_TARGET): $(O_OBJS) - $(LD) -r -o $(O_TARGET) $(O_OBJS) - -install: $(O_TARGET) - install -c $(O_TARGET) /lib/modules/`uname -r`/fs - -clean: - rm -f *.o *.s -endif +include $(TOPDIR)/Rules.make diff --git a/fs/bfs/Makefile b/fs/bfs/Makefile index 0aeda0cca2eb..ff4d375dd539 100644 --- a/fs/bfs/Makefile +++ b/fs/bfs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main Makefile... O_TARGET := bfs.o -O_OBJS := inode.o file.o dir.o -M_OBJS := $(O_TARGET) + +obj-y := inode.o file.o dir.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/buffer.c b/fs/buffer.c index 8e2a382c3713..922407f2b9fc 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -758,13 +758,6 @@ void init_buffer(struct buffer_head *bh, bh_end_io_t *handler, void *private) bh->b_private = private; } -static void end_buffer_io_bad(struct buffer_head *bh, int uptodate) -{ - mark_buffer_uptodate(bh, uptodate); - unlock_buffer(bh); - BUG(); -} - static void end_buffer_io_async(struct buffer_head * bh, int uptodate) { static spinlock_t page_uptodate_lock = SPIN_LOCK_UNLOCKED; @@ -995,7 +988,7 @@ repeat: * and it is clean. */ if (bh) { - init_buffer(bh, end_buffer_io_bad, NULL); + init_buffer(bh, NULL, NULL); bh->b_dev = dev; bh->b_blocknr = block; bh->b_state = 1 << BH_Mapped; @@ -1305,7 +1298,7 @@ try_again: set_bh_page(bh, page, offset); bh->b_list = BUF_CLEAN; - bh->b_end_io = end_buffer_io_bad; + bh->b_end_io = NULL; } return head; /* @@ -1426,7 +1419,7 @@ static void create_empty_buffers(struct page *page, kdev_t dev, unsigned long bl do { bh->b_dev = dev; bh->b_blocknr = 0; - bh->b_end_io = end_buffer_io_bad; + bh->b_end_io = NULL; tail = bh; bh = bh->b_this_page; } while (bh); diff --git a/fs/coda/Makefile b/fs/coda/Makefile index 1faa42235c42..e169867eeaf1 100644 --- a/fs/coda/Makefile +++ b/fs/coda/Makefile @@ -3,9 +3,10 @@ # O_TARGET := coda.o -O_OBJS := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o coda_linux.o\ - symlink.o pioctl.o sysctl.o -M_OBJS := $(O_TARGET) + +obj-y := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o coda_linux.o\ + symlink.o pioctl.o sysctl.o +obj-m := $(O_TARGET) # If you want debugging output, please uncomment the following line. diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile index 9f71d0814d45..3db73d8acf88 100644 --- a/fs/cramfs/Makefile +++ b/fs/cramfs/Makefile @@ -4,9 +4,9 @@ O_TARGET := cramfs.o -O_OBJS := inode.o uncompress.o inflate/zlib.o +obj-y := inode.o uncompress.o inflate/zlib.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/cramfs/inflate/Makefile b/fs/cramfs/inflate/Makefile index 92feb8325b45..5d89dc3c9b32 100644 --- a/fs/cramfs/inflate/Makefile +++ b/fs/cramfs/inflate/Makefile @@ -28,7 +28,7 @@ O_TARGET := zlib.o -O_OBJS := adler32.o infblock.o infcodes.o inffast.o inflate.o \ - inftrees.o infutil.o uncompr.o +obj-y := adler32.o infblock.o infcodes.o inffast.o inflate.o \ + inftrees.o infutil.o uncompr.o include $(TOPDIR)/Rules.make diff --git a/fs/devfs/Makefile b/fs/devfs/Makefile index 23f1904108d7..b551ffd093b0 100644 --- a/fs/devfs/Makefile +++ b/fs/devfs/Makefile @@ -8,7 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := devfs.o -OX_OBJS := base.o util.o + +export-objs := base.o util.o + +obj-y := base.o util.o # Special case to support building documentation ifndef TOPDIR diff --git a/fs/devpts/Makefile b/fs/devpts/Makefile index 2e0c75d749f4..8ab293007dc8 100644 --- a/fs/devpts/Makefile +++ b/fs/devpts/Makefile @@ -3,8 +3,9 @@ # O_TARGET := devpts.o -O_OBJS := root.o inode.o -M_OBJS := $(O_TARGET) +obj-y := root.o inode.o + +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/efs/Makefile b/fs/efs/Makefile index e41be23f1f1d..9352c722b925 100644 --- a/fs/efs/Makefile +++ b/fs/efs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := efs.o -O_OBJS := super.o inode.o namei.o dir.o file.o symlink.o -M_OBJS := $(O_TARGET) + +obj-y := super.o inode.o namei.o dir.o file.o symlink.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/ext2/Makefile b/fs/ext2/Makefile index 7321f45c8f68..aa8560f079b4 100644 --- a/fs/ext2/Makefile +++ b/fs/ext2/Makefile @@ -8,8 +8,9 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := ext2.o -O_OBJS := acl.o balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ + +obj-y := acl.o balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ ioctl.o namei.o super.o symlink.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/fat/Makefile b/fs/fat/Makefile index 339250c7cb48..76368ae525d8 100644 --- a/fs/fat/Makefile +++ b/fs/fat/Makefile @@ -8,8 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := fat.o -O_OBJS := buffer.o cache.o dir.o file.o inode.o misc.o tables.o cvf.o -OX_OBJS := fatfs_syms.o -M_OBJS := $(O_TARGET) + +export-objs := fatfs_syms.o + +obj-y := buffer.o cache.o dir.o file.o inode.o misc.o tables.o cvf.o fatfs_syms.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/hfs/Makefile b/fs/hfs/Makefile index 238bbba81a7f..fd5a7589c6ae 100644 --- a/fs/hfs/Makefile +++ b/fs/hfs/Makefile @@ -8,11 +8,12 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := hfs.o -O_OBJS := balloc.o bdelete.o bfind.o bins_del.o binsert.o bitmap.o bitops.o \ + +obj-y := balloc.o bdelete.o bfind.o bins_del.o binsert.o bitmap.o bitops.o \ bnode.o brec.o btree.o catalog.o dir.o dir_cap.o dir_dbl.o \ dir_nat.o extent.o file.o file_cap.o file_hdr.o inode.o mdb.o \ part_tbl.o string.o super.o sysdep.o trans.o version.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/hpfs/Makefile b/fs/hpfs/Makefile index 2ebaece024b6..b2394dedd851 100644 --- a/fs/hpfs/Makefile +++ b/fs/hpfs/Makefile @@ -1,5 +1,6 @@ O_TARGET := hpfs.o -O_OBJS := alloc.o anode.o buffer.o dentry.o dir.o dnode.o ea.o file.o inode.o map.o name.o namei.o super.o -M_OBJS := $(O_TARGET) + +obj-y := alloc.o anode.o buffer.o dentry.o dir.o dnode.o ea.o file.o inode.o map.o name.o namei.o super.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/isofs/Makefile b/fs/isofs/Makefile index b6cbdc6afae7..186492b5b801 100644 --- a/fs/isofs/Makefile +++ b/fs/isofs/Makefile @@ -8,12 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := isofs.o -O_OBJS := namei.o inode.o dir.o util.o rock.o -ifdef CONFIG_JOLIET -O_OBJS += joliet.o -endif +obj-y := namei.o inode.o dir.o util.o rock.o +obj-$(CONFIG_JOLIET) += joliet.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/jffs/Makefile b/fs/jffs/Makefile index 541816171acd..29bc24d6fcb6 100644 --- a/fs/jffs/Makefile +++ b/fs/jffs/Makefile @@ -30,7 +30,7 @@ endif endif O_TARGET := jffs.o -M_OBJS := $(O_TARGET) -O_OBJS := jffs_fm.o intrep.o $(INODE_O) +obj-m := $(O_TARGET) +obj-y := jffs_fm.o intrep.o $(INODE_O) include $(TOPDIR)/Rules.make diff --git a/fs/lockd/Makefile b/fs/lockd/Makefile index ceab1f466787..98f4ae53112b 100644 --- a/fs/lockd/Makefile +++ b/fs/lockd/Makefile @@ -8,14 +8,14 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := lockd.o -O_OBJS := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \ - svcproc.o svcsubs.o mon.o xdr.o -ifdef CONFIG_LOCKD_V4 - O_OBJS += xdr4.o svc4proc.o -endif +export-objs := lockd_syms.o -OX_OBJS := lockd_syms.o -M_OBJS := $(O_TARGET) +obj-y := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \ + svcproc.o svcsubs.o mon.o xdr.o lockd_syms.o + +obj-$(CONFIG_LOCKD_V4) += xdr4.o svc4proc.o + +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/minix/Makefile b/fs/minix/Makefile index 13841d16a84b..135056181633 100644 --- a/fs/minix/Makefile +++ b/fs/minix/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := minix.o -O_OBJS := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o -M_OBJS := $(O_TARGET) + +obj-y := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/msdos/Makefile b/fs/msdos/Makefile index 01a5ebdc1855..a0424c507247 100644 --- a/fs/msdos/Makefile +++ b/fs/msdos/Makefile @@ -8,8 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := msdos.o -O_OBJS := namei.o -OX_OBJS := msdosfs_syms.o -M_OBJS := $(O_TARGET) + +export-objs := msdosfs_syms.o + +obj-y := namei.o msdosfs_syms.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/ncpfs/Makefile b/fs/ncpfs/Makefile index 2fb40609c391..f30dfb67128d 100644 --- a/fs/ncpfs/Makefile +++ b/fs/ncpfs/Makefile @@ -8,9 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := ncpfs.o -O_OBJS := dir.o file.o inode.o ioctl.o mmap.o ncplib_kernel.o sock.o \ + +obj-y := dir.o file.o inode.o ioctl.o mmap.o ncplib_kernel.o sock.o \ symlink.o ncpsign_kernel.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) # If you want debugging output, please uncomment the following line # EXTRA_CFLAGS += -DDEBUG_NCP=1 diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile index 52283d234be3..45fa641689f0 100644 --- a/fs/nfs/Makefile +++ b/fs/nfs/Makefile @@ -8,16 +8,13 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := nfs.o -O_OBJS := inode.o file.o read.o write.o dir.o symlink.o proc.o \ + +obj-y := inode.o file.o read.o write.o dir.o symlink.o proc.o \ nfs2xdr.o flushd.o unlink.o -ifdef CONFIG_ROOT_NFS - O_OBJS += nfsroot.o mount_clnt.o -endif -ifdef CONFIG_NFS_V3 - O_OBJS += nfs3proc.o nfs3xdr.o -endif +obj-$(CONFIG_ROOT_NFS) += nfsroot.o mount_clnt.o +obj-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/nfsd/Makefile b/fs/nfsd/Makefile index 152a8b0b218f..17775d0fbf16 100644 --- a/fs/nfsd/Makefile +++ b/fs/nfsd/Makefile @@ -8,13 +8,13 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := nfsd.o -O_OBJS := nfssvc.o nfsctl.o nfsproc.o nfsfh.o vfs.o \ + +obj-y := nfssvc.o nfsctl.o nfsproc.o nfsfh.o vfs.o \ export.o auth.o lockd.o nfscache.o nfsxdr.o \ stats.o -ifdef CONFIG_NFSD_V3 - O_OBJS += nfs3proc.o nfs3xdr.o -endif -M_OBJS := $(O_TARGET) +obj-$(CONFIG_NFSD_V3) += nfs3proc.o nfs3xdr.o + +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/nls/Makefile b/fs/nls/Makefile index 893d3e1e9618..194a3df8c1f3 100644 --- a/fs/nls/Makefile +++ b/fs/nls/Makefile @@ -52,8 +52,7 @@ obj-$(CONFIG_NLS_KOI8_R) += nls_koi8-r.o obj-$(CONFIG_NLS_ABC) += nls_abc.o obj-$(CONFIG_NLS_UTF8) += nls_utf8.o -OX_OBJS = $(obj-y) -M_OBJS = $(obj-m) +export-objs = $(obj-y) O_TARGET = nls.o diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile index 9e7ab2eaf248..66c1b17a427d 100644 --- a/fs/ntfs/Makefile +++ b/fs/ntfs/Makefile @@ -1,8 +1,9 @@ # Rules for making the NTFS driver O_TARGET := ntfs.o -O_OBJS := fs.o sysctl.o support.o util.o inode.o dir.o super.o attr.o -M_OBJS := $(O_TARGET) + +obj-y := fs.o sysctl.o support.o util.o inode.o dir.o super.o attr.o +obj-m := $(O_TARGET) EXTRA_CFLAGS = -DNTFS_IN_LINUX_KERNEL -DNTFS_VERSION=\"000607\" include $(TOPDIR)/Rules.make diff --git a/fs/openpromfs/Makefile b/fs/openpromfs/Makefile index a97a5615db86..f9d8cd339c3a 100644 --- a/fs/openpromfs/Makefile +++ b/fs/openpromfs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := openpromfs.o -O_OBJS := inode.o -M_OBJS := $(O_TARGET) + +obj-y := inode.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/partitions/Makefile b/fs/partitions/Makefile index ed64f7c56496..e082843c1269 100644 --- a/fs/partitions/Makefile +++ b/fs/partitions/Makefile @@ -8,7 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := partitions.o -OX_OBJS := check.o + +export-objs := check.o + +obj-y := check.o obj-$(CONFIG_ACORN_PARTITION) += acorn.o obj-$(CONFIG_AMIGA_PARTITION) += amiga.o @@ -21,8 +24,5 @@ obj-$(CONFIG_SUN_PARTITION) += sun.o obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o obj-$(CONFIG_IBM_PARTITION) += ibm.o -O_OBJS += $(obj-y) -M_OBJS += $(obj-m) - include $(TOPDIR)/Rules.make diff --git a/fs/proc/Makefile b/fs/proc/Makefile index ad890255eba0..de98f494e8d2 100644 --- a/fs/proc/Makefile +++ b/fs/proc/Makefile @@ -8,13 +8,14 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := proc.o -O_OBJS := inode.o root.o base.o generic.o array.o \ - kmsg.o proc_tty.o proc_misc.o kcore.o -OX_OBJS := procfs_syms.o -M_OBJS := + +export-objs := procfs_syms.o + +obj-y := inode.o root.o base.o generic.o array.o \ + kmsg.o proc_tty.o proc_misc.o kcore.o procfs_syms.o ifeq ($(CONFIG_PROC_DEVICETREE),y) -O_OBJS += proc_devtree.o +obj-y += proc_devtree.o endif include $(TOPDIR)/Rules.make diff --git a/fs/qnx4/Makefile b/fs/qnx4/Makefile index 943eb122361a..a3a3c5a7da14 100644 --- a/fs/qnx4/Makefile +++ b/fs/qnx4/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := qnx4.o -O_OBJS := inode.o dir.o namei.o file.o bitmap.o truncate.o fsync.o -M_OBJS := $(O_TARGET) + +obj-y := inode.o dir.o namei.o file.o bitmap.o truncate.o fsync.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/ramfs/Makefile b/fs/ramfs/Makefile index f57d5966c67f..44ff24f061fc 100644 --- a/fs/ramfs/Makefile +++ b/fs/ramfs/Makefile @@ -4,8 +4,7 @@ O_TARGET := ramfs.o -O_OBJS := inode.o - -M_OBJS := $(O_TARGET) +obj-y := inode.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/romfs/Makefile b/fs/romfs/Makefile index 80579f8b8c0c..65a88e40b587 100644 --- a/fs/romfs/Makefile +++ b/fs/romfs/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := romfs.o -O_OBJS := inode.o -M_OBJS := $(O_TARGET) + +obj-y := inode.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/smbfs/Makefile b/fs/smbfs/Makefile index 825b0156a441..db76849bee47 100644 --- a/fs/smbfs/Makefile +++ b/fs/smbfs/Makefile @@ -8,8 +8,9 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := smbfs.o -O_OBJS := proc.o dir.o cache.o sock.o inode.o file.o ioctl.o getopt.o -M_OBJS := $(O_TARGET) + +obj-y := proc.o dir.o cache.o sock.o inode.o file.o ioctl.o getopt.o +obj-m := $(O_TARGET) # If you want debugging output, you may add these flags to the EXTRA_CFLAGS # SMBFS_PARANOIA should normally be enabled. diff --git a/fs/sysv/Makefile b/fs/sysv/Makefile index 394af0b4d1db..9eed30c9cfd3 100644 --- a/fs/sysv/Makefile +++ b/fs/sysv/Makefile @@ -8,7 +8,8 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := sysv.o -O_OBJS := ialloc.o balloc.o inode.o file.o dir.o namei.o fsync.o truncate.o -M_OBJS := $(O_TARGET) + +obj-y := ialloc.o balloc.o inode.o file.o dir.o namei.o fsync.o truncate.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/udf/Makefile b/fs/udf/Makefile index b1fcbed1f6f7..97122f8f5d2d 100644 --- a/fs/udf/Makefile +++ b/fs/udf/Makefile @@ -8,9 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile.. O_TARGET := udf.o -O_OBJS := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \ + +obj-y := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \ partition.o super.o truncate.o symlink.o fsync.o \ crc.o directory.o misc.o udftime.o unicode.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/ufs/Makefile b/fs/ufs/Makefile index 39d0d39ef90f..4e74b2459bac 100644 --- a/fs/ufs/Makefile +++ b/fs/ufs/Makefile @@ -8,8 +8,9 @@ # Note 2! The CFLAGS definitions are now in the main makefile. O_TARGET := ufs.o -O_OBJS := balloc.o cylinder.o dir.o file.o ialloc.o inode.o \ + +obj-y := balloc.o cylinder.o dir.o file.o ialloc.o inode.o \ namei.o super.o symlink.o truncate.o util.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/umsdos/Makefile b/fs/umsdos/Makefile index c14c1b615476..a894146ba59b 100644 --- a/fs/umsdos/Makefile +++ b/fs/umsdos/Makefile @@ -8,9 +8,9 @@ # Note 2: the CFLAGS definitions are now in the main makefile. O_TARGET := umsdos.o -O_OBJS := dir.o inode.o ioctl.o mangle.o namei.o rdir.o emd.o +obj-y := dir.o inode.o ioctl.o mangle.o namei.o rdir.o emd.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/fs/vfat/Makefile b/fs/vfat/Makefile index df903636f434..55e0ea9151d6 100644 --- a/fs/vfat/Makefile +++ b/fs/vfat/Makefile @@ -8,8 +8,10 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := vfat.o -O_OBJS := namei.o -OX_OBJS := vfatfs_syms.o -M_OBJS := $(O_TARGET) + +export-objs := vfatfs_syms.o + +obj-y := namei.o vfatfs_syms.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 5d7d5717a63c..bf32a74498ec 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -284,7 +284,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return p static inline int ptep_test_and_clear_dirty(pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); } static inline int ptep_test_and_clear_young(pte_t *ptep) { return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); } static inline void ptep_set_wrprotect(pte_t *ptep) { clear_bit(_PAGE_BIT_RW, ptep); } -static inline void ptep_mkdirty(pte_t *ptep) { set_bit(_PAGE_BIT_RW, ptep); } +static inline void ptep_mkdirty(pte_t *ptep) { set_bit(_PAGE_BIT_DIRTY, ptep); } /* * Conversion functions: convert a page and protection to a page entry, diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 67347daea1ec..906845849359 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -511,7 +511,7 @@ do { \ " stosb\n" \ " popl %%eax\n" \ " incl %0\n" \ - " jmp 2b\n" \ + " jmp 3b\n" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ " .align 4\n" \ diff --git a/ipc/Makefile b/ipc/Makefile index 4e947582b4b2..c358aa2a4c7e 100644 --- a/ipc/Makefile +++ b/ipc/Makefile @@ -8,10 +8,9 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := ipc.o -O_OBJS := util.o -ifdef CONFIG_SYSVIPC -O_OBJS += msg.o sem.o shm.o -endif +obj-y := util.o + +obj-$(CONFIG_SYSVIPC) += msg.o sem.o shm.o include $(TOPDIR)/Rules.make diff --git a/kernel/Makefile b/kernel/Makefile index 311d66cb85cf..131f2e177f61 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -8,23 +8,17 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := kernel.o -O_OBJS = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ - module.o exit.o itimer.o info.o time.o softirq.o resource.o \ - sysctl.o acct.o capability.o ptrace.o timer.o user.o - -OX_OBJS += signal.o sys.o kmod.o context.o -ifeq ($(CONFIG_UID16),y) -O_OBJS += uid16.o -endif +export-objs = signal.o sys.o kmod.o context.o -ifeq ($(CONFIG_MODULES),y) -OX_OBJS += ksyms.o -endif +obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ + module.o exit.o itimer.o info.o time.o softirq.o resource.o \ + sysctl.o acct.o capability.o ptrace.o timer.o user.o \ + signal.o sys.o kmod.o context.o -ifeq ($(CONFIG_PM),y) -OX_OBJS += pm.o -endif +obj-$(CONFIG_UID16) += uid16.o +obj-$(CONFIG_MODULES) += ksyms.o +obj-$(CONFIG_PM) += pm.o ifneq ($(CONFIG_IA64),y) # According to Alan Modra , the -fno-omit-frame-pointer is diff --git a/lib/Makefile b/lib/Makefile index 1f9068e4d3f4..3702c5684bc6 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -7,11 +7,13 @@ # L_TARGET := lib.a -L_OBJS := errno.o ctype.o string.o vsprintf.o brlock.o -LX_OBJS := cmdline.o + +export-objs := cmdline.o + +obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o ifneq ($(CONFIG_HAVE_DEC_LOCK),y) - L_OBJS += dec_and_lock.o + obj-y += dec_and_lock.o endif include $(TOPDIR)/Rules.make diff --git a/mm/Makefile b/mm/Makefile index d74cdec48281..ac7598ea91bb 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -8,12 +8,11 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := mm.o -O_OBJS := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \ + +obj-y := memory.o mmap.o filemap.o mprotect.o mlock.o mremap.o \ vmalloc.o slab.o bootmem.o swap.o vmscan.o page_io.o \ page_alloc.o swap_state.o swapfile.o numa.o oom_kill.o -ifeq ($(CONFIG_HIGHMEM),y) -O_OBJS += highmem.o -endif +obj-$(CONFIG_HIGHMEM) += highmem.o include $(TOPDIR)/Rules.make diff --git a/mm/swapfile.c b/mm/swapfile.c index 688e2fcddb49..f384ae7985d2 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -370,6 +370,7 @@ static int try_to_unuse(unsigned int type) swap_free(entry); return -ENOMEM; } + delete_from_swap_cache(page); read_lock(&tasklist_lock); for_each_task(p) unuse_process(p->mm, entry, page); @@ -377,8 +378,6 @@ static int try_to_unuse(unsigned int type) shm_unuse(entry, page); /* Now get rid of the extra reference to the temporary page we've been using. */ - if (PageSwapCache(page)) - delete_from_swap_cache(page); page_cache_release(page); /* * Check for and clear any overflowed swap map counts. diff --git a/net/802/Makefile b/net/802/Makefile index 66f8af658d64..03e484b50ec6 100644 --- a/net/802/Makefile +++ b/net/802/Makefile @@ -8,34 +8,38 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := 802.o -O_OBJS = p8023.o +export-objs = llc_macinit.o p8022.o psnap.o + +obj-y = p8023.o + +obj-$(CONFIG_SYSCTL) += sysctl_net_802.o +obj-$(CONFIG_LLC) += llc_sendpdu.o llc_utility.o cl2llc.o llc_macinit.o ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_802.o +obj-y += sysctl_net_802.o endif ifeq ($(CONFIG_LLC),y) -SUB_DIRS += transit -O_OBJS += llc_sendpdu.o llc_utility.o cl2llc.o -OX_OBJS += llc_macinit.o +subdir-y += transit +obj-y += llc_sendpdu.o llc_utility.o cl2llc.o llc_macinit.o SNAP = y endif ifdef CONFIG_TR -O_OBJS += tr.o +obj-y += tr.o SNAP=y endif ifdef CONFIG_NET_FC -O_OBJS += fc.o +obj-y += fc.o endif ifdef CONFIG_FDDI -O_OBJS += fddi.o +obj-y += fddi.o endif ifdef CONFIG_HIPPI -O_OBJS += hippi.o +obj-y += hippi.o endif ifdef CONFIG_IPX @@ -47,10 +51,9 @@ ifdef CONFIG_ATALK endif ifeq ($(SNAP),y) -OX_OBJS += p8022.o psnap.o +obj-y += p8022.o psnap.o endif - include $(TOPDIR)/Rules.make cl2llc.c: cl2llc.pre diff --git a/net/Makefile b/net/Makefile index ddfdab2a5bf1..6db7acbf068b 100644 --- a/net/Makefile +++ b/net/Makefile @@ -56,15 +56,4 @@ endif # Subdirectories that should be entered when MAKING_MODULES=1, even if set to 'y'. both-m := $(filter $(mod-subdirs), $(subdir-y)) -# Translate to Rules.make lists. -O_OBJS := $(filter-out $(export-objs), $(obj-y)) -OX_OBJS := $(filter $(export-objs), $(obj-y)) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) - -SUB_DIRS := $(subdir-y) -MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m)) -ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-)) - - include $(TOPDIR)/Rules.make diff --git a/net/appletalk/Makefile b/net/appletalk/Makefile index 4adbc858cc8a..99e57580a934 100644 --- a/net/appletalk/Makefile +++ b/net/appletalk/Makefile @@ -8,14 +8,13 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := appletalk.o -O_OBJS := aarp.o -M_OBJS := $(O_TARGET) -OX_OBJS += ddp.o +export-objs = ddp.o -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_atalk.o -endif +obj-y := aarp.o ddp.o +obj-m := $(O_TARGET) + +obj-$(CONFIG_SYSCTL) += sysctl_net_atalk.o include $(TOPDIR)/Rules.make diff --git a/net/atm/Makefile b/net/atm/Makefile index c21cdcad1621..40d63cc87401 100644 --- a/net/atm/Makefile +++ b/net/atm/Makefile @@ -11,13 +11,15 @@ include ../../.config O_TARGET= atm.o -ifeq ($(CONFIG_ATM),y) +export-objs = common.o atm_misc.o raw.o resources.o ipcommon.o proc.o lane_mpoa_init.o -O_OBJS = addr.o pvc.o signaling.o svc.o -OX_OBJS = common.o atm_misc.o raw.o resources.o +multi-list = mpoa.o +mpoa-objs = mpc.o mpoa_caches.o mpoa_proc.o + +obj-$(CONFIG_ATM) = addr.o pvc.o signaling.o svc.o common.o atm_misc.o raw.o resources.o ifeq ($(CONFIG_ATM_CLIP),y) -O_OBJS += clip.o +obj-y += clip.o NEED_IPCOM = ipcommon.o endif @@ -25,34 +27,16 @@ ifeq ($(CONFIG_NET_SCH_ATM),y) NEED_IPCOM = ipcommon.o endif -OX_OBJS += $(NEED_IPCOM) +obj-y += $(NEED_IPCOM) ifeq ($(CONFIG_PROC_FS),y) -OX_OBJS += proc.o -endif - -ifeq ($(CONFIG_ATM_LANE),y) -O_OBJS += lec.o -OX_OBJS += lane_mpoa_init.o -else - ifeq ($(CONFIG_ATM_LANE),m) - OX_OBJS += lane_mpoa_init.o - M_OBJS += lec.o - endif -endif - -ifeq ($(CONFIG_ATM_MPOA),y) -O_OBJS += mpc.o mpoa_caches.o mpoa_proc.o -else - ifeq ($(CONFIG_ATM_MPOA),m) - M_OBJS += mpoa.o - endif -endif - +obj-y += proc.o endif +obj-$(CONFIG_ATM_LANE) += lec.o lane_mpoa_init.o +obj-$(CONFIG_ATM_MPOA) += mpoa.o include $(TOPDIR)/Rules.make -mpoa.o: mpc.o mpoa_caches.o mpoa_proc.o - $(LD) -r -o mpoa.o mpc.o mpoa_caches.o mpoa_proc.o +mpoa.o: $(mpoa-objs) + $(LD) -r -o mpoa.o $(mpoa-objs) diff --git a/net/ax25/Makefile b/net/ax25/Makefile index b89b517c72b1..3791850770a1 100644 --- a/net/ax25/Makefile +++ b/net/ax25/Makefile @@ -9,20 +9,17 @@ O_TARGET := ax25.o -O_OBJS := ax25_addr.o ax25_dev.o ax25_iface.o ax25_in.o ax25_ip.o ax25_out.o \ - ax25_route.o ax25_std_in.o ax25_std_subr.o ax25_std_timer.o \ - ax25_subr.o ax25_timer.o ax25_uid.o -M_OBJS := $(O_TARGET) -OX_OBJS += af_ax25.o +export-objs := af_ax25.o + +obj-y := ax25_addr.o ax25_dev.o ax25_iface.o ax25_in.o ax25_ip.o ax25_out.o \ + ax25_route.o ax25_std_in.o ax25_std_subr.o ax25_std_timer.o \ + ax25_subr.o ax25_timer.o ax25_uid.o af_ax25.o -ifeq ($(CONFIG_AX25_DAMA_SLAVE),y) -O_OBJS += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o -endif +obj-m := $(O_TARGET) -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_ax25.o -endif +obj-$(CONFIG_AX25_DAMA_SLAVE) += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o +obj-$(CONFIG_SYSCTL) += sysctl_net_ax25.o include $(TOPDIR)/Rules.make diff --git a/net/bridge/Makefile b/net/bridge/Makefile index 082388fe5a01..4c2c72812499 100644 --- a/net/bridge/Makefile +++ b/net/bridge/Makefile @@ -8,9 +8,9 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := bridge.o -O_OBJS := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \ +obj-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \ br_ioctl.o br_notify.o br_stp.o br_stp_bpdu.o \ br_stp_if.o br_stp_timer.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/net/core/Makefile b/net/core/Makefile index af3c740917dc..9a0e8ff975dc 100644 --- a/net/core/Makefile +++ b/net/core/Makefile @@ -9,35 +9,23 @@ O_TARGET := core.o -O_OBJS := sock.o skbuff.o iovec.o datagram.o scm.o +export-objs := netfilter.o profile.o + +obj-y := sock.o skbuff.o iovec.o datagram.o scm.o ifeq ($(CONFIG_SYSCTL),y) ifeq ($(CONFIG_NET),y) -O_OBJS += sysctl_net_core.o -endif +obj-y += sysctl_net_core.o endif - -ifdef CONFIG_FILTER -O_OBJS += filter.o -endif - -ifdef CONFIG_NET - -O_OBJS += dev.o dev_mcast.o dst.o neighbour.o rtnetlink.o utils.o - -ifdef CONFIG_NETFILTER -OX_OBJS += netfilter.o endif -ifeq ($(CONFIG_NET_DIVERT),y) -O_OBJS += dv.o -endif +obj-$(CONFIG_FILTER) += filter.o -endif +obj-$(CONFIG_NET) += dev.o dev_mcast.o dst.o neighbour.o rtnetlink.o utils.o -ifdef CONFIG_NET_PROFILE -OX_OBJS += profile.o -endif +obj-$(CONFIG_NETFILTER) += netfilter.o +obj-$(CONFIG_NET_DIVERT) += dv.o +obj-$(CONFIG_NET_PROFILE) += profile.o include $(TOPDIR)/Rules.make diff --git a/net/decnet/Makefile b/net/decnet/Makefile index 03d35cc9c7fe..ac7a1a462ec0 100644 --- a/net/decnet/Makefile +++ b/net/decnet/Makefile @@ -1,18 +1,13 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := decnet.o -O_OBJS := af_decnet.o dn_nsp_in.o dn_nsp_out.o dn_route.o dn_dev.o dn_neigh.o dn_timer.o -M_OBJS := $(O_TARGET) +obj-y := af_decnet.o dn_nsp_in.o dn_nsp_out.o dn_route.o dn_dev.o dn_neigh.o dn_timer.o +obj-m := $(O_TARGET) -ifeq ($(CONFIG_DECNET_ROUTER),y) -O_OBJS += dn_fib.o dn_rules.o dn_table.o -endif +obj-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o +obj-$(CONFIG_DECNET_FW) += dn_fw.o -ifeq ($(CONFIG_DECNET_FW),y) -O_OBJS += dn_fw.o -endif - -O_OBJS += sysctl_net_decnet.o +obj-y += sysctl_net_decnet.o include $(TOPDIR)/Rules.make diff --git a/net/econet/Makefile b/net/econet/Makefile index 38d0d4b580c8..d51815b2cb53 100644 --- a/net/econet/Makefile +++ b/net/econet/Makefile @@ -9,7 +9,7 @@ O_TARGET := econet.o -O_OBJS := af_econet.o sysctl_net_ec.o -M_OBJS := $(O_TARGET) +obj-y := af_econet.o sysctl_net_ec.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/net/ethernet/Makefile b/net/ethernet/Makefile index 193d6af8b1a7..6764a1af7a21 100644 --- a/net/ethernet/Makefile +++ b/net/ethernet/Makefile @@ -23,9 +23,7 @@ ifdef CONFIG_ATALK OBJ2 := pe2.o endif -ifdef CONFIG_NET -O_OBJS := $(OBJS) $(OBJ2) -endif +obj-$(CONFIG_NET) := $(OBJS) $(OBJ2) include $(TOPDIR)/Rules.make diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index 1a6a53bc8837..f93dc211a2e3 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -8,57 +8,23 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := ipv4.o -IPV4_OBJS := utils.o route.o inetpeer.o proc.o protocol.o \ + +export-objs = ipip.o ip_gre.o + +obj-y := utils.o route.o inetpeer.o proc.o protocol.o \ ip_input.o ip_fragment.o ip_forward.o ip_options.o \ ip_output.o ip_sockglue.o \ tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o tcp_minisocks.o \ raw.o udp.o arp.o icmp.o devinet.o af_inet.o igmp.o \ sysctl_net_ipv4.o fib_frontend.o fib_semantics.o fib_hash.o -IPV4X_OBJS := - -M_OBJS := - -ifeq ($(CONFIG_IP_MULTIPLE_TABLES),y) -IPV4_OBJS += fib_rules.o -endif - -ifeq ($(CONFIG_IP_ROUTE_NAT),y) -IPV4_OBJS += ip_nat_dumb.o -endif - -ifeq ($(CONFIG_IP_MROUTE),y) -IPV4_OBJS += ipmr.o -endif - -ifeq ($(CONFIG_NET_IPIP),y) -IPV4X_OBJS += ipip.o -else - ifeq ($(CONFIG_NET_IPIP),m) - MX_OBJS += ipip.o - endif -endif - -ifeq ($(CONFIG_NET_IPGRE),y) -IPV4X_OBJS += ip_gre.o -else - ifeq ($(CONFIG_NET_IPGRE),m) - MX_OBJS += ip_gre.o - endif -endif - -ifeq ($(CONFIG_SYN_COOKIES),y) -IPV4_OBJS += syncookies.o -# module not supported, because it would be too messy. -endif - -ifeq ($(CONFIG_IP_PNP),y) -IPV4_OBJS += ipconfig.o -endif -ifdef CONFIG_INET -O_OBJS := $(IPV4_OBJS) -OX_OBJS := $(IPV4X_OBJS) -endif +obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o +obj-$(CONFIG_IP_ROUTE_NAT) += ip_nat_dumb.o +obj-$(CONFIG_IP_MROUTE) += ipmr.o +obj-$(CONFIG_NET_IPIP) += ipip.o +obj-$(CONFIG_NET_IPGRE) += ip_gre.o +obj-$(CONFIG_SYN_COOKIES) += syncookies.o +obj-$(CONFIG_IP_PNP) += ipconfig.o include $(TOPDIR)/Rules.make diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile index cb430624f87a..aa88d6530fe5 100644 --- a/net/ipv4/netfilter/Makefile +++ b/net/ipv4/netfilter/Makefile @@ -8,229 +8,59 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := netfilter.o -M_OBJS := -IP_NF_CONNTRACK_OBJ:=ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o - -IP_NF_NAT_OBJ:=ip_nat_core.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o - -# All the parts of conntrack and NAT required for compatibility layer. -IP_NF_COMPAT_LAYER:=ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(IP_NF_CONNTRACK_OBJ) $(IP_NF_NAT_OBJ) - -# Link order matters here. -ifeq ($(CONFIG_IP_NF_CONNTRACK),y) -OX_OBJS += ip_conntrack_standalone.o -O_OBJS += $(IP_NF_CONNTRACK_OBJ) -else - ifeq ($(CONFIG_IP_NF_CONNTRACK),m) - MI_OBJS += $(IP_NF_CONNTRACK_OBJ) - MIX_OBJS += ip_conntrack_standalone.o - M_OBJS += ip_conntrack.o - endif -endif - -ifeq ($(CONFIG_IP_NF_FTP),y) -OX_OBJS += ip_conntrack_ftp.o -else - ifeq ($(CONFIG_IP_NF_FTP),m) - MX_OBJS += ip_conntrack_ftp.o - endif -endif - -ifeq ($(CONFIG_IP_NF_IPTABLES),y) -OX_OBJS += ip_tables.o -else - ifeq ($(CONFIG_IP_NF_IPTABLES),m) - MX_OBJS += ip_tables.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_LIMIT),y) -O_OBJS += ipt_limit.o -else - ifeq ($(CONFIG_IP_NF_MATCH_LIMIT),m) - M_OBJS += ipt_limit.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_MARK),y) -O_OBJS += ipt_mark.o -else - ifeq ($(CONFIG_IP_NF_MATCH_MARK),m) - M_OBJS += ipt_mark.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_MAC),y) -O_OBJS += ipt_mac.o -else - ifeq ($(CONFIG_IP_NF_MATCH_MAC),m) - M_OBJS += ipt_mac.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_MULTIPORT),y) -O_OBJS += ipt_multiport.o -else - ifeq ($(CONFIG_IP_NF_MATCH_MULTIPORT),m) - M_OBJS += ipt_multiport.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_OWNER),y) -O_OBJS += ipt_owner.o -else - ifeq ($(CONFIG_IP_NF_MATCH_OWNER),m) - M_OBJS += ipt_owner.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_TOS),y) -O_OBJS += ipt_tos.o -else - ifeq ($(CONFIG_IP_NF_MATCH_TOS),m) - M_OBJS += ipt_tos.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_STATE),y) -O_OBJS += ipt_state.o -else - ifeq ($(CONFIG_IP_NF_MATCH_STATE),m) - M_OBJS += ipt_state.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MATCH_UNCLEAN),y) -O_OBJS += ipt_unclean.o -else - ifeq ($(CONFIG_IP_NF_MATCH_UNCLEAN),m) - M_OBJS += ipt_unclean.o - endif -endif - -ifeq ($(CONFIG_IP_NF_NAT),y) -O_OBJS += ip_nat_standalone.o ip_nat_rule.o $(IP_NF_NAT_OBJ) - ifeq ($(CONFIG_IP_NF_FTP),y) - O_OBJS += ip_nat_ftp.o - endif -else - ifeq ($(CONFIG_IP_NF_NAT),m) - MI_OBJS += ip_nat_rule.o $(IP_NF_NAT_OBJ) - MIX_OBJS += ip_nat_standalone.o - M_OBJS += iptable_nat.o - ifeq ($(CONFIG_IP_NF_FTP),m) - M_OBJS += ip_nat_ftp.o - endif - endif -endif - -ifeq ($(CONFIG_IP_NF_FILTER),y) -O_OBJS += iptable_filter.o -else - ifeq ($(CONFIG_IP_NF_FILTER),m) - M_OBJS += iptable_filter.o - endif -endif - -ifeq ($(CONFIG_IP_NF_MANGLE),y) -O_OBJS += iptable_mangle.o -else - ifeq ($(CONFIG_IP_NF_MANGLE),m) - M_OBJS += iptable_mangle.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_REJECT),y) -O_OBJS += ipt_REJECT.o -else - ifeq ($(CONFIG_IP_NF_TARGET_REJECT),m) - M_OBJS += ipt_REJECT.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_MIRROR),y) -O_OBJS += ipt_MIRROR.o -else - ifeq ($(CONFIG_IP_NF_TARGET_MIRROR),m) - M_OBJS += ipt_MIRROR.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_TOS),y) -O_OBJS += ipt_TOS.o -else - ifeq ($(CONFIG_IP_NF_TARGET_TOS),m) - M_OBJS += ipt_TOS.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_MARK),y) -O_OBJS += ipt_MARK.o -else - ifeq ($(CONFIG_IP_NF_TARGET_MARK),m) - M_OBJS += ipt_MARK.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_MASQUERADE),y) -O_OBJS += ipt_MASQUERADE.o -else - ifeq ($(CONFIG_IP_NF_TARGET_MASQUERADE),m) - M_OBJS += ipt_MASQUERADE.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_REDIRECT),y) -O_OBJS += ipt_REDIRECT.o -else - ifeq ($(CONFIG_IP_NF_TARGET_REDIRECT),m) - M_OBJS += ipt_REDIRECT.o - endif -endif - -ifeq ($(CONFIG_IP_NF_TARGET_LOG),y) -O_OBJS += ipt_LOG.o -else - ifeq ($(CONFIG_IP_NF_TARGET_LOG),m) - M_OBJS += ipt_LOG.o - endif -endif - -ifeq ($(CONFIG_IP_NF_COMPAT_IPCHAINS),y) -O_OBJS += ipchains_core.o $(IP_NF_COMPAT_LAYER) -else - ifeq ($(CONFIG_IP_NF_COMPAT_IPCHAINS),m) - M_OBJS += ipchains.o - endif -endif - -ifeq ($(CONFIG_IP_NF_COMPAT_IPFWADM),y) -O_OBJS += ipfwadm_core.o $(IP_NF_COMPAT_LAYER) -else - ifeq ($(CONFIG_IP_NF_COMPAT_IPFWADM),m) - M_OBJS += ipfwadm.o - endif -endif - -ifeq ($(CONFIG_IP_NF_QUEUE),y) -O_OBJS += ip_queue.o -else - ifeq ($(CONFIG_IP_NF_QUEUE),m) - M_OBJS += ip_queue.o - endif -endif +export-objs = ip_conntrack_standalone.o ip_conntrack_ftp.o ip_fw_compat.o ip_nat_standalone.o ip_tables.o + +# Multipart objects. +list-multi := ip_conntrack.o iptable_nat.o ipfwadm.o ipchains.o + +ip_conntrack-objs := ip_conntrack_standalone.o ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o +iptable_nat-objs := ip_nat_standalone.o ip_nat_rule.o ip_nat_core.o ip_nat_proto_unknown.o ip_nat_proto_tcp.o ip_nat_proto_udp.o ip_nat_proto_icmp.o +ip_nf_compat-objs := ipfwadm_core.o ip_fw_compat.o ip_fw_compat_redir.o ip_fw_compat_masq.o $(ip_conntrack-objs) $(iptable_nat-objs) +ipfwadm-objs := ipfwadm_core.o +ipchains-objs := ipchains_core.o + +obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o +obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o +obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o +obj-$(CONFIG_IP_NF_MATCH_LIMIT) += ipt_limit.o +obj-$(CONFIG_IP_NF_MATCH_MARK) += ipt_mark.o +obj-$(CONFIG_IP_NF_MATCH_MAC) += ipt_mac.o +obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o +obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o +obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o +obj-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state.o +obj-$(CONFIG_IP_NF_MATCH_UNCLEAN) += ipt_unclean.o +obj-$(CONFIG_IP_NF_NAT) += iptable_nat.o +obj-$(CONFIG_IP_NF_FTP) += ip_nat_ftp.o +obj-$(CONFIG_IP_NF_FILTER) += iptable_filter.o +obj-$(CONFIG_IP_NF_MANGLE) += iptable_mangle.o + +obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o +obj-$(CONFIG_IP_NF_TARGET_MIRROR) += ipt_MIRROR.o +obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o +obj-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK.o +obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o +obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o +obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o + +obj-$(CONFIG_IP_NF_COMPAT_IPCHAINS) += ipchains.o ip_nf_compat.o +obj-$(CONFIG_IP_NF_COMPAT_IPFWADM) += ipfwadm.o ip_nf_compat.o +obj-$(CONFIG_IP_NF_QUEUE) += ip_queue.o include $(TOPDIR)/Rules.make -ip_conntrack.o: ip_conntrack_standalone.o $(IP_NF_CONNTRACK_OBJ) - $(LD) -r -o $@ $(IP_NF_CONNTRACK_OBJ) ip_conntrack_standalone.o +ip_conntrack.o: $(ip_conntrack-objs) + $(LD) -r -o $@ $(ip_conntrack-objs) + +iptable_nat.o: $(iptable_nat-objs) + $(LD) -r -o $@ $(iptable_nat-objs) -iptable_nat.o: ip_nat_standalone.o ip_nat_rule.o $(IP_NF_NAT_OBJ) - $(LD) -r -o $@ ip_nat_standalone.o ip_nat_rule.o $(IP_NF_NAT_OBJ) +ipfwadm.o: $(ipfwadm-objs) + $(LD) -r -o $@ $(ipfwadm-objs) -ipfwadm.o: ipfwadm_core.o $(IP_NF_COMPAT_LAYER) - $(LD) -r -o $@ ipfwadm_core.o $(IP_NF_COMPAT_LAYER) +ipchains.o: $(ipchains-objs) + $(LD) -r -o $@ $(ipchains-objs) -ipchains.o: ipchains_core.o $(IP_NF_COMPAT_LAYER) - $(LD) -r -o $@ ipchains_core.o $(IP_NF_COMPAT_LAYER) +ip_nf_compat.o: $(ip_nf_compat-objs) + $(LD) -r -o $@ $(ip_nf_compat-objs) diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile index 23754e3d3c53..f9964e08562b 100644 --- a/net/ipv6/Makefile +++ b/net/ipv6/Makefile @@ -8,18 +8,15 @@ O_TARGET := ipv6.o -IPV6_OBJS := af_inet6.o ip6_output.o ip6_input.o addrconf.o sit.o \ + +obj-y := af_inet6.o ip6_output.o ip6_input.o addrconf.o sit.o \ route.o ip6_fib.o ipv6_sockglue.o ndisc.o udp.o raw.o \ protocol.o icmp.o mcast.o reassembly.o tcp_ipv6.o \ exthdrs.o sysctl_net_ipv6.o datagram.o proc.o \ ip6_flowlabel.o -M_OBJS := $(O_TARGET) - -#ifeq ($(CONFIG_IPV6_FIREWALL),y) -# IPV6_OBJS += ip6_fw.o -#endif +obj-m := $(O_TARGET) -O_OBJS := $(IPV6_OBJS) +#obj-$(CONFIG_IPV6_FIREWALL) += ip6_fw.o include $(TOPDIR)/Rules.make diff --git a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile index 5f89671a2537..3e8b8727c6af 100644 --- a/net/ipv6/netfilter/Makefile +++ b/net/ipv6/netfilter/Makefile @@ -8,172 +8,35 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := netfilter.o -M_OBJS := -IP6_NF_CONNTRACK_OBJ:=ip6_conntrack_core.o ip6_conntrack_proto_generic.o ip6_conntrack_proto_tcp.o ip6_conntrack_proto_udp.o ip6_conntrack_proto_icmp.o +multi-objs := ip6_conntrack.o +export-objs := ip6_conntrack_standalone.o -# Link order matters here. -ifeq ($(CONFIG_IP6_NF_CONNTRACK),y) -O_OBJS += ip6_conntrack_standalone.o $(IP6_NF_CONNTRACK_OBJ) -else - ifeq ($(CONFIG_IP6_NF_CONNTRACK),m) - MI_OBJS += $(IP6_NF_CONNTRACK_OBJ) - MIX_OBJS += ip6_conntrack_standalone.o - M_OBJS += ip6_conntrack.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_FTP),y) -O_OBJS += ip6_conntrack_ftp.o -else - ifeq ($(CONFIG_IP6_NF_FTP),m) - MX_OBJS += ip6_conntrack_ftp.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_IPTABLES),y) -O_OBJS += ip6_tables.o -else - ifeq ($(CONFIG_IP6_NF_IPTABLES),m) - MX_OBJS += ip6_tables.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_LIMIT),y) -O_OBJS += ip6t_limit.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_LIMIT),m) - M_OBJS += ip6t_limit.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_MARK),y) -O_OBJS += ip6t_mark.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_MARK),m) - M_OBJS += ip6t_mark.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_MAC),y) -O_OBJS += ip6t_mac.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_MAC),m) - M_OBJS += ip6t_mac.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_MULTIPORT),y) -O_OBJS += ip6t_multiport.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_MULTIPORT),m) - M_OBJS += ip6t_multiport.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_OWNER),y) -O_OBJS += ip6t_owner.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_OWNER),m) - M_OBJS += ip6t_owner.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_TOS),y) -O_OBJS += ip6t_tos.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_TOS),m) - M_OBJS += ip6t_tos.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_MATCH_STATE),y) -O_OBJS += ip6t_state.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_STATE),m) - M_OBJS += ip6t_state.o - endif -endif +ip6_conntrack-obj := ip6_conntrack_standalone.o ip6_conntrack_core.o ip6_conntrack_proto_generic.o ip6_conntrack_proto_tcp.o ip6_conntrack_proto_udp.o ip6_conntrack_proto_icmp.o -ifeq ($(CONFIG_IP6_NF_MATCH_UNCLEAN),y) -O_OBJS += ip6t_unclean.o -else - ifeq ($(CONFIG_IP6_NF_MATCH_UNCLEAN),m) - M_OBJS += ip6t_unclean.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_FILTER),y) -O_OBJS += ip6table_filter.o -else - ifeq ($(CONFIG_IP6_NF_FILTER),m) - M_OBJS += ip6table_filter.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_REJECT),y) -O_OBJS += ip6t_REJECT.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_REJECT),m) - M_OBJS += ip6t_REJECT.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_MIRROR),y) -O_OBJS += ip6t_MIRROR.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_MIRROR),m) - M_OBJS += ip6t_MIRROR.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_TOS),y) -O_OBJS += ip6t_TOS.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_TOS),m) - M_OBJS += ip6t_TOS.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_MARK),y) -O_OBJS += ip6t_MARK.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_MARK),m) - M_OBJS += ip6t_MARK.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_REDIRECT),y) -O_OBJS += ip6t_REDIRECT.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_REDIRECT),m) - M_OBJS += ip6t_REDIRECT.o - endif -endif - -ifeq ($(CONFIG_IP6_NF_TARGET_LOG),y) -O_OBJS += ip6t_LOG.o -else - ifeq ($(CONFIG_IP6_NF_TARGET_LOG),m) - M_OBJS += ip6t_LOG.o - endif -endif +# Link order matters here. +obj-$(CONFIG_IP6_NF_CONNTRACK) += ip6_conntrack.o +obj-$(CONFIG_IP6_NF_FTP) += ip6_conntrack_ftp.o +obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o +obj-$(CONFIG_IP6_NF_MATCH_LIMIT) += ip6t_limit.o +obj-$(CONFIG_IP6_NF_MATCH_MARK) += ip6t_mark.o +obj-$(CONFIG_IP6_NF_MATCH_MAC) += ip6t_mac.o +obj-$(CONFIG_IP6_NF_MATCH_MULTIPORT) += ip6t_multiport.o +obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o +obj-$(CONFIG_IP6_NF_MATCH_TOS) += ip6t_tos.o +obj-$(CONFIG_IP6_NF_MATCH_STATE) += ip6t_state.o +obj-$(CONFIG_IP6_NF_MATCH_UNCLEAN) += ip6t_unclean.o +obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o +obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o +obj-$(CONFIG_IP6_NF_TARGET_MIRROR) += ip6t_MIRROR.o +obj-$(CONFIG_IP6_NF_TARGET_TOS) += ip6t_TOS.o +obj-$(CONFIG_IP6_NF_TARGET_MARK) += ip6t_MARK.o +obj-$(CONFIG_IP6_NF_TARGET_REDIRECT) += ip6t_REDIRECT.o +obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o +obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o -ifeq ($(CONFIG_IP6_NF_QUEUE),y) -O_OBJS += ip6_queue.o -else - ifeq ($(CONFIG_IP6_NF_QUEUE),m) - M_OBJS += ip6_queue.o - endif -endif include $(TOPDIR)/Rules.make -ip6_conntrack.o: ip6_conntrack_standalone.o $(IP6_NF_CONNTRACK_OBJ) - $(LD) -r -o $@ $(IP6_NF_CONNTRACK_OBJ) ip6_conntrack_standalone.o - -ip6fwadm.o: ipfwadm_core.o $(IP6_NF_COMPAT_LAYER) - $(LD) -r -o $@ ip6fwadm_core.o $(IP6_NF_COMPAT_LAYER) - -ip6chains.o: ip6chains_core.o $(IP6_NF_COMPAT_LAYER) - $(LD) -r -o $@ ip6chains_core.o $(IP6_NF_COMPAT_LAYER) +ip6_conntrack.o: $(ip6_conntrack-obj) + $(LD) -r -o $@ $(ip6_conntrack-obj) diff --git a/net/ipx/Makefile b/net/ipx/Makefile index fb55995aeede..abb69cc9595c 100644 --- a/net/ipx/Makefile +++ b/net/ipx/Makefile @@ -10,25 +10,18 @@ # We only get in/to here if CONFIG_IPX = 'y' or 'm' O_TARGET := ipx.o -M_OBJS := -OX_OBJS := af_ipx.o -ifeq ($(CONFIG_IPX),m) - M_OBJS += $(O_TARGET) -endif +export-objs = af_ipx.o af_spx.o -ifeq ($(CONFIG_SYSCTL),y) - O_OBJS += sysctl_net_ipx.o -endif +obj-y := af_ipx.o -ifeq ($(CONFIG_SPX),y) -OX_OBJS += af_spx.o -else - ifeq ($(CONFIG_SPX),m) - MX_OBJS += af_spx.o - endif +ifeq ($(CONFIG_IPX),m) + obj-m += $(O_TARGET) endif +obj-$(CONFIG_SYSCTL) += sysctl_net_ipx.o +obj-$(CONFIG_SPX) += af_spx.o + include $(TOPDIR)/Rules.make tar: diff --git a/net/irda/Makefile b/net/irda/Makefile index 3ab07c88dec9..cb152e47a2b1 100644 --- a/net/irda/Makefile +++ b/net/irda/Makefile @@ -7,59 +7,39 @@ # # Note 2! The CFLAGS definition is now in the main makefile... -ALL_SUB_DIRS := irlan irnet ircomm compressors -SUB_DIRS := -MOD_SUB_DIRS := -OX_OBJS := - O_TARGET := irda.o -O_OBJS := iriap.o iriap_event.o irlmp.o irlmp_event.o irlmp_frame.o \ + +export-objs := irsyms.o + +obj-y := iriap.o iriap_event.o irlmp.o irlmp_event.o irlmp_frame.o \ irlap.o irlap_event.o irlap_frame.o timer.o qos.o irqueue.o \ irttp.o irda_device.o irias_object.o crc.o wrapper.o af_irda.o \ - discovery.o parameters.o -OX_OBJS := irsyms.o + discovery.o parameters.o irsyms.o ifeq ($(CONFIG_IRDA),m) -M_OBJS := $(O_TARGET) -endif - -ifeq ($(CONFIG_IRDA_COMPRESSION),y) -O_OBJS += irlap_comp.o +obj-m := $(O_TARGET) endif -ifeq ($(CONFIG_PROC_FS),y) -O_OBJS += irproc.o -endif +obj-$(CONFIG_IRDA_COMPRESSION) += irlap_comp.o +obj-$(CONFIG_PROC_FS) += irproc.o +obj-$(CONFIG_SYSCTL) += irsysctl.o +obj-$(CONFIG_IRLAN) += irlan/irlan.o -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += irsysctl.o -endif +subdir-$(CONFIG_IRLAN) += irlan +subdir-$(CONFIG_IRNET) += irnet +subdir-$(CONFIG_IRCOMM) += ircomm +subdir-$(CONFIG_IRDA_COMPRESSION) += compressors ifeq ($(CONFIG_IRLAN),y) -SUB_DIRS += irlan -O_OBJS += irlan/irlan.o -else - ifeq ($(CONFIG_IRLAN),m) - MOD_SUB_DIRS += irlan - endif +obj-y += irlan/irlan.o endif ifeq ($(CONFIG_IRNET),y) -SUB_DIRS += irnet -O_OBJS += irnet/irnet.o -else - ifeq ($(CONFIG_IRNET),m) - MOD_SUB_DIRS += irnet - endif -endif - -ifeq ($(CONFIG_IRDA_COMPRESSION),y) -SUB_DIRS += compressors -MOD_IN_SUB_DIRS += compressors +obj-y += irnet/irnet.o endif ifeq ($(CONFIG_IRDA_DEFLATE),y) -O_OBJS += compressors/irda_deflate.o +obj-y += compressors/irda_deflate.o else ifeq ($(CONFIG_IRDA_DEFLATE),m) MOD_TO_LIST += irda_deflate.o @@ -67,12 +47,7 @@ else endif ifeq ($(CONFIG_IRCOMM),y) -SUB_DIRS += ircomm -O_OBJS += ircomm/ircomm_and_tty.o -else - ifeq ($(CONFIG_IRCOMM),m) - MOD_SUB_DIRS += ircomm - endif +obj-y += ircomm/ircomm_and_tty.o endif include $(TOPDIR)/Rules.make diff --git a/net/irda/compressors/Makefile b/net/irda/compressors/Makefile index 6d233020fd76..470b229ce056 100644 --- a/net/irda/compressors/Makefile +++ b/net/irda/compressors/Makefile @@ -8,16 +8,11 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := -O_OBJS := -M_OBJS := -ifeq ($(CONFIG_IRDA_DEFLATE),y) -O_OBJS += irda_deflate.o -else - ifeq ($(CONFIG_IRDA_DEFLATE),m) - M_OBJS += irda_deflate.o - endif -endif +obj-y := +obj-m := + +obj-$(CONFIG_IRDA_DEFLATE) += irda_deflate.o include $(TOPDIR)/Rules.make diff --git a/net/irda/ircomm/Makefile b/net/irda/ircomm/Makefile index 89e3294fded5..fe0a6a8306c7 100644 --- a/net/irda/ircomm/Makefile +++ b/net/irda/ircomm/Makefile @@ -8,26 +8,18 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := ircomm_and_tty.o -O_OBJS := ircomm_param.o ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o -M_OBJS := ircomm.o ircomm-tty.o -MI_OBJS := ircomm_param.o ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o -OX_OBJS += +multi-objs := ircomm.o ircomm-tty.o +ircomm-objs := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o +ircomm-tty-objs := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o -# Special rule to build the composite modules - -ifeq ($(CONFIG_IRCOMM),m) -ircomm.o: $(MI_OBJS) - $(LD) $(LD_RFLAG) -r -o $@ ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o - -ircomm-tty.o: $(MI_OBJS) - $(LD) $(LD_RFLAG) -r -o $@ ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o - - -endif +obj-$(CONFIG_IRCOMM) += ircomm.o ircomm-tty.o include $(TOPDIR)/Rules.make -tar: - tar -cvf /dev/f1 . +ircomm.o: $(ircomm-objs) + $(LD) $(LD_RFLAG) -r -o $@ $(ircomm-objs) + +ircomm-tty.o: $(ircomm-tty-objs) + $(LD) $(LD_RFLAG) -r -o $@ $(ircomm-tty-objs) diff --git a/net/irda/irlan/Makefile b/net/irda/irlan/Makefile index 61285f23c17e..7ab6b6d37ef6 100644 --- a/net/irda/irlan/Makefile +++ b/net/irda/irlan/Makefile @@ -8,13 +8,8 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := irlan.o -O_OBJS := irlan_common.o irlan_eth.o irlan_event.o irlan_client.o irlan_provider.o irlan_filter.o irlan_provider_event.o irlan_client_event.o -M_OBJS := $(O_TARGET) -MI_OBJS := -OX_OBJS += +obj-y := irlan_common.o irlan_eth.o irlan_event.o irlan_client.o irlan_provider.o irlan_filter.o irlan_provider_event.o irlan_client_event.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make - -tar: - tar -cvf /dev/f1 . diff --git a/net/irda/irnet/Makefile b/net/irda/irnet/Makefile index 50554ac7290c..ea4c3d3a4275 100644 --- a/net/irda/irnet/Makefile +++ b/net/irda/irnet/Makefile @@ -9,14 +9,8 @@ MOD_LIST_NAME := IRDA_MODULES O_TARGET := irnet.o -#O_OBJS := irnet_ppp.o -O_OBJS := irnet_ppp.o irnet_irda.o -M_OBJS := $(O_TARGET) -MI_OBJS := -OX_OBJS += +obj-y := irnet_ppp.o irnet_irda.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make - -tar: - tar -cvf /dev/f1 . diff --git a/net/khttpd/Makefile b/net/khttpd/Makefile index b594de142d18..a7b2e022178b 100644 --- a/net/khttpd/Makefile +++ b/net/khttpd/Makefile @@ -9,17 +9,15 @@ O_TARGET := khttpd.o -M_OBJS := $(O_TARGET) -O_OBJS := main.o accept.o datasending.o logging.o misc.o rfc.o rfc_time.o security.o \ +obj-m := $(O_TARGET) +obj-y := main.o accept.o datasending.o logging.o misc.o rfc.o rfc_time.o security.o \ sockets.o sysctl.o userspace.o waitheaders.o - include $(TOPDIR)/Rules.make rfc_time.o: times.h - make_times_h: make_times_h.c $(HOSTCC) $(HOSTCFLAGS) -o make_times_h make_times_h.c diff --git a/net/lapb/Makefile b/net/lapb/Makefile index 434e79aa031d..10745d9048fb 100644 --- a/net/lapb/Makefile +++ b/net/lapb/Makefile @@ -9,10 +9,11 @@ O_TARGET := lapb.o -O_OBJS := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o -M_OBJS := $(O_TARGET) -OX_OBJS += lapb_iface.o +export-objs := lapb_iface.o + +obj-y := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o lapb_iface.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/net/netlink/Makefile b/net/netlink/Makefile index da89d0af0d94..15edc53014c6 100644 --- a/net/netlink/Makefile +++ b/net/netlink/Makefile @@ -9,17 +9,12 @@ O_TARGET := netlink.o -O_OBJS := -OX_OBJS := af_netlink.o +export-objs := af_netlink.o -M_OBJS := +obj-y := af_netlink.o -ifeq ($(CONFIG_NETLINK_DEV), y) - O_OBJS += netlink_dev.o -endif +obj-m := -ifeq ($(CONFIG_NETLINK_DEV), m) - M_OBJS += netlink_dev.o -endif +obj-$(CONFIG_NETLINK_DEV) += netlink_dev.o include $(TOPDIR)/Rules.make diff --git a/net/netrom/Makefile b/net/netrom/Makefile index 1afcfd8e738d..e44e36144fe6 100644 --- a/net/netrom/Makefile +++ b/net/netrom/Makefile @@ -8,13 +8,12 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := netrom.o -O_OBJS := af_netrom.o nr_dev.o nr_in.o nr_loopback.o nr_out.o nr_route.o \ + +obj-y := af_netrom.o nr_dev.o nr_in.o nr_loopback.o nr_out.o nr_route.o \ nr_subr.o nr_timer.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_netrom.o -endif +obj-$(CONFIG_SYSCTL) += sysctl_net_netrom.o include $(TOPDIR)/Rules.make diff --git a/net/packet/Makefile b/net/packet/Makefile index 95a98ed95371..f17e887c1597 100644 --- a/net/packet/Makefile +++ b/net/packet/Makefile @@ -9,15 +9,6 @@ O_TARGET := packet.o -O_OBJS := -M_OBJS := - -ifeq ($(CONFIG_PACKET),y) - O_OBJS += af_packet.o -else - ifeq ($(CONFIG_PACKET), m) - M_OBJS += af_packet.o - endif -endif +obj-$(CONFIG_PACKET) += af_packet.o include $(TOPDIR)/Rules.make diff --git a/net/rose/Makefile b/net/rose/Makefile index de3f1b257184..7799143b04ed 100644 --- a/net/rose/Makefile +++ b/net/rose/Makefile @@ -8,13 +8,12 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := rose.o -O_OBJS := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \ + +obj-y := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \ rose_out.o rose_route.o rose_subr.o rose_timer.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_rose.o -endif +obj-$(CONFIG_SYSCTL) += sysctl_net_rose.o include $(TOPDIR)/Rules.make diff --git a/net/sched/Makefile b/net/sched/Makefile index de1f71601a8d..95707af002a3 100644 --- a/net/sched/Makefile +++ b/net/sched/Makefile @@ -9,171 +9,171 @@ O_TARGET := sched.o -O_OBJS := sch_generic.o +obj-y := sch_generic.o ifeq ($(CONFIG_NET_SCHED), y) -O_OBJS += sch_api.o sch_fifo.o +obj-y += sch_api.o sch_fifo.o ifeq ($(CONFIG_NET_ESTIMATOR), y) -O_OBJS += estimator.o +obj-y += estimator.o endif ifeq ($(CONFIG_NET_CLS), y) -O_OBJS += cls_api.o +obj-y += cls_api.o ifeq ($(CONFIG_NET_CLS_POLICE), y) -O_OBJS += police.o +obj-y += police.o endif endif ifeq ($(CONFIG_NET_SCH_INGRESS), y) -O_OBJS += sch_ingress.o +obj-y += sch_ingress.o else ifeq ($(CONFIG_NET_SCH_INGRESS), m) - M_OBJS += sch_ingress.o + obj-m += sch_ingress.o endif endif ifeq ($(CONFIG_NET_SCH_CBQ), y) -O_OBJS += sch_cbq.o +obj-y += sch_cbq.o else ifeq ($(CONFIG_NET_SCH_CBQ), m) - M_OBJS += sch_cbq.o + obj-m += sch_cbq.o endif endif ifeq ($(CONFIG_NET_SCH_CSZ), y) -O_OBJS += sch_csz.o +obj-y += sch_csz.o else ifeq ($(CONFIG_NET_SCH_CSZ), m) - M_OBJS += sch_csz.o + obj-m += sch_csz.o endif endif ifeq ($(CONFIG_NET_SCH_HPFQ), y) -O_OBJS += sch_hpfq.o +obj-y += sch_hpfq.o else ifeq ($(CONFIG_NET_SCH_HPFQ), m) - M_OBJS += sch_hpfq.o + obj-m += sch_hpfq.o endif endif ifeq ($(CONFIG_NET_SCH_HFSC), y) -O_OBJS += sch_hfsc.o +obj-y += sch_hfsc.o else ifeq ($(CONFIG_NET_SCH_HFSC), m) - M_OBJS += sch_hfsc.o + obj-m += sch_hfsc.o endif endif ifeq ($(CONFIG_NET_SCH_SFQ), y) -O_OBJS += sch_sfq.o +obj-y += sch_sfq.o else ifeq ($(CONFIG_NET_SCH_SFQ), m) - M_OBJS += sch_sfq.o + obj-m += sch_sfq.o endif endif ifeq ($(CONFIG_NET_SCH_RED), y) -O_OBJS += sch_red.o +obj-y += sch_red.o else ifeq ($(CONFIG_NET_SCH_RED), m) - M_OBJS += sch_red.o + obj-m += sch_red.o endif endif ifeq ($(CONFIG_NET_SCH_TBF), y) -O_OBJS += sch_tbf.o +obj-y += sch_tbf.o else ifeq ($(CONFIG_NET_SCH_TBF), m) - M_OBJS += sch_tbf.o + obj-m += sch_tbf.o endif endif ifeq ($(CONFIG_NET_SCH_PRIO), y) -O_OBJS += sch_prio.o +obj-y += sch_prio.o else ifeq ($(CONFIG_NET_SCH_PRIO), m) - M_OBJS += sch_prio.o + obj-m += sch_prio.o endif endif ifeq ($(CONFIG_NET_SCH_TEQL), y) -O_OBJS += sch_teql.o +obj-y += sch_teql.o else ifeq ($(CONFIG_NET_SCH_TEQL), m) - M_OBJS += sch_teql.o + obj-m += sch_teql.o endif endif ifeq ($(CONFIG_NET_SCH_GRED), y) -O_OBJS += sch_gred.o +obj-y += sch_gred.o else ifeq ($(CONFIG_NET_SCH_GRED), m) - M_OBJS += sch_gred.o + obj-m += sch_gred.o endif endif ifeq ($(CONFIG_NET_SCH_DSMARK), y) -O_OBJS += sch_dsmark.o +obj-y += sch_dsmark.o else ifeq ($(CONFIG_NET_SCH_DSMARK), m) - M_OBJS += sch_dsmark.o + obj-m += sch_dsmark.o endif endif ifeq ($(CONFIG_NET_CLS_TCINDEX), y) -O_OBJS += cls_tcindex.o +obj-y += cls_tcindex.o else ifeq ($(CONFIG_NET_CLS_TCINDEX), m) - M_OBJS += cls_tcindex.o + obj-m += cls_tcindex.o endif endif ifeq ($(CONFIG_NET_SCH_ATM), y) -O_OBJS += sch_atm.o +obj-y += sch_atm.o endif ifeq ($(CONFIG_NET_CLS_U32), y) -O_OBJS += cls_u32.o +obj-y += cls_u32.o else ifeq ($(CONFIG_NET_CLS_U32), m) - M_OBJS += cls_u32.o + obj-m += cls_u32.o endif endif ifeq ($(CONFIG_NET_CLS_RSVP), y) -O_OBJS += cls_rsvp.o +obj-y += cls_rsvp.o else ifeq ($(CONFIG_NET_CLS_RSVP), m) - M_OBJS += cls_rsvp.o + obj-m += cls_rsvp.o endif endif ifeq ($(CONFIG_NET_CLS_RSVP6), y) -O_OBJS += cls_rsvp6.o +obj-y += cls_rsvp6.o else ifeq ($(CONFIG_NET_CLS_RSVP6), m) - M_OBJS += cls_rsvp6.o + obj-m += cls_rsvp6.o endif endif ifeq ($(CONFIG_NET_CLS_ROUTE4), y) -O_OBJS += cls_route.o +obj-y += cls_route.o else ifeq ($(CONFIG_NET_CLS_ROUTE4), m) - M_OBJS += cls_route.o + obj-m += cls_route.o endif endif ifeq ($(CONFIG_NET_CLS_FW), y) -O_OBJS += cls_fw.o +obj-y += cls_fw.o else ifeq ($(CONFIG_NET_CLS_FW), m) - M_OBJS += cls_fw.o + obj-m += cls_fw.o endif endif diff --git a/net/sunrpc/Makefile b/net/sunrpc/Makefile index ef50303540d6..19e7e4d4f135 100644 --- a/net/sunrpc/Makefile +++ b/net/sunrpc/Makefile @@ -8,20 +8,17 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := sunrpc.o -O_OBJS := clnt.o xprt.o sched.o \ + +export-objs := sunrpc_syms.o + +obj-y := clnt.o xprt.o sched.o \ auth.o auth_null.o auth_unix.o \ svc.o svcsock.o svcauth.o \ - pmap_clnt.o xdr.o -OX_OBJS := sunrpc_syms.o - -ifeq ($(CONFIG_PROC_FS),y) - O_OBJS += stats.o -endif + pmap_clnt.o xdr.o sunrpc_syms.o -ifeq ($(CONFIG_SYSCTL),y) - O_OBJS += sysctl.o -endif +obj-$(CONFIG_PROC_FS) += stats.o +obj-$(CONFIG_SYSCTL) += sysctl.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/net/unix/Makefile b/net/unix/Makefile index a335b486daaa..88a2626716c2 100644 --- a/net/unix/Makefile +++ b/net/unix/Makefile @@ -8,12 +8,11 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := unix.o -O_OBJS := af_unix.o garbage.o -M_OBJS := $(O_TARGET) -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_unix.o -endif +obj-y := af_unix.o garbage.o +obj-m := $(O_TARGET) + +obj-$(CONFIG_SYSCTL) += sysctl_net_unix.o include $(TOPDIR)/Rules.make diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile index beafe5059b7b..1a2ec4cc1910 100644 --- a/net/wanrouter/Makefile +++ b/net/wanrouter/Makefile @@ -8,9 +8,11 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := wanrouter.o -OX_OBJS := wanmain.o -O_OBJS := wanproc.o -M_OBJS := $(O_TARGET) + +export-objs := wanmain.o + +obj-y := wanproc.o wanmain.o +obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff --git a/net/x25/Makefile b/net/x25/Makefile index 3341a800316f..0890eff84b8a 100644 --- a/net/x25/Makefile +++ b/net/x25/Makefile @@ -8,13 +8,12 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := x25.o -O_OBJS := af_x25.o x25_dev.o x25_facilities.o x25_in.o x25_link.o x25_out.o \ + +obj-y := af_x25.o x25_dev.o x25_facilities.o x25_in.o x25_link.o x25_out.o \ x25_route.o x25_subr.o x25_timer.o -M_OBJS := $(O_TARGET) +obj-m := $(O_TARGET) -ifeq ($(CONFIG_SYSCTL),y) -O_OBJS += sysctl_net_x25.o -endif +obj-$(CONFIG_SYSCTL) += sysctl_net_x25.o include $(TOPDIR)/Rules.make -- 2.39.5