Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.transmeta.com>2002-05-24 04:23:29 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-05-24 04:23:29 -0700
commitbe172bc77d8ec264412be0158916aa027a1ece96 (patch)
tree9f020dff0044a1ea2c882daad5a7e882f451fec2
parent08b0fb25701e2b9ed53cdaf5bd0a2fe4c37c7951 (diff)
parent87fafc51ed01331ec4fb6271060e376f70ee938b (diff)
Manual merge
-rw-r--r--Makefile12
-rw-r--r--Rules.make19
-rw-r--r--arch/alpha/math-emu/Makefile2
-rw-r--r--drivers/acorn/net/Makefile7
-rw-r--r--drivers/acorn/scsi/Makefile7
-rw-r--r--drivers/acpi/Makefile38
-rw-r--r--drivers/acpi/debugger/Makefile2
-rw-r--r--drivers/acpi/dispatcher/Makefile2
-rw-r--r--drivers/acpi/events/Makefile2
-rw-r--r--drivers/acpi/executer/Makefile2
-rw-r--r--drivers/acpi/hardware/Makefile2
-rw-r--r--drivers/acpi/namespace/Makefile2
-rw-r--r--drivers/acpi/parser/Makefile2
-rw-r--r--drivers/acpi/resources/Makefile2
-rw-r--r--drivers/acpi/tables/Makefile2
-rw-r--r--drivers/acpi/utilities/Makefile2
-rw-r--r--drivers/block/paride/Makefile2
-rw-r--r--drivers/char/Makefile27
-rw-r--r--drivers/char/agp/Makefile2
-rw-r--r--drivers/char/drm/Makefile2
-rw-r--r--drivers/char/ftape/Makefile2
-rw-r--r--drivers/char/ftape/compressor/Makefile2
-rw-r--r--drivers/char/ftape/lowlevel/Makefile2
-rw-r--r--drivers/char/ftape/zftape/Makefile2
-rw-r--r--drivers/char/mwave/Makefile2
-rw-r--r--drivers/char/pcmcia/Makefile2
-rw-r--r--drivers/char/rio/Makefile2
-rw-r--r--drivers/dio/Makefile14
-rw-r--r--drivers/fc4/Makefile2
-rw-r--r--drivers/input/Makefile6
-rw-r--r--drivers/input/joystick/Makefile4
-rw-r--r--drivers/isdn/act2000/Makefile8
-rw-r--r--drivers/isdn/capi/Makefile12
-rw-r--r--drivers/isdn/divert/Makefile10
-rw-r--r--drivers/isdn/eicon/Makefile14
-rw-r--r--drivers/isdn/hardware/Makefile4
-rw-r--r--drivers/isdn/hardware/avm/Makefile4
-rw-r--r--drivers/isdn/hisax/Makefile28
-rw-r--r--drivers/isdn/hysdn/Makefile8
-rw-r--r--drivers/isdn/i4l/Makefile19
-rw-r--r--drivers/isdn/icn/Makefile4
-rw-r--r--drivers/isdn/isdnloop/Makefile4
-rw-r--r--drivers/isdn/pcbit/Makefile8
-rw-r--r--drivers/isdn/sc/Makefile8
-rw-r--r--drivers/isdn/tpam/Makefile11
-rw-r--r--drivers/message/Makefile11
-rw-r--r--drivers/message/fusion/Makefile2
-rw-r--r--drivers/message/i2o/Makefile2
-rw-r--r--drivers/net/appletalk/Makefile10
-rw-r--r--drivers/net/arcnet/Makefile10
-rw-r--r--drivers/net/e100/Makefile7
-rw-r--r--drivers/net/e1000/Makefile7
-rw-r--r--drivers/net/fc/Makefile2
-rw-r--r--drivers/net/hamradio/Makefile4
-rw-r--r--drivers/net/hamradio/soundmodem/Makefile27
-rw-r--r--drivers/net/irda/Makefile4
-rw-r--r--drivers/net/pcmcia/Makefile9
-rw-r--r--drivers/net/sk98lin/Makefile3
-rw-r--r--drivers/net/skfp/Makefile2
-rw-r--r--drivers/net/tokenring/Makefile10
-rw-r--r--drivers/net/tulip/Makefile12
-rw-r--r--drivers/net/wan/Makefile2
-rw-r--r--drivers/net/wan/lmc/Makefile3
-rw-r--r--drivers/net/wireless/Makefile9
-rw-r--r--drivers/nubus/Makefile9
-rw-r--r--drivers/scsi/Makefile14
-rw-r--r--drivers/scsi/aic7xxx/Makefile2
-rw-r--r--drivers/scsi/sym53c8xx_2/Makefile2
-rw-r--r--drivers/sgi/Makefile7
-rw-r--r--drivers/video/aty/Makefile2
-rw-r--r--drivers/video/matrox/Makefile2
-rw-r--r--drivers/video/riva/Makefile2
-rw-r--r--drivers/video/sis/Makefile2
-rw-r--r--fs/Makefile103
-rw-r--r--fs/adfs/Makefile10
-rw-r--r--fs/affs/Makefile10
-rw-r--r--fs/autofs/Makefile7
-rw-r--r--fs/autofs4/Makefile8
-rw-r--r--fs/bfs/Makefile10
-rw-r--r--fs/coda/Makefile7
-rw-r--r--fs/cramfs/Makefile6
-rw-r--r--fs/devfs/Makefile11
-rw-r--r--fs/devpts/Makefile6
-rw-r--r--fs/driverfs/Makefile5
-rw-r--r--fs/efs/Makefile10
-rw-r--r--fs/exportfs/Makefile7
-rw-r--r--fs/ext2/Makefile12
-rw-r--r--fs/ext3/Makefile12
-rw-r--r--fs/fat/Makefile12
-rw-r--r--fs/freevxfs/Makefile7
-rw-r--r--fs/hfs/Makefile11
-rw-r--r--fs/hpfs/Makefile10
-rw-r--r--fs/intermezzo/Makefile10
-rw-r--r--fs/isofs/Makefile16
-rw-r--r--fs/jbd/Makefile7
-rw-r--r--fs/jffs/Makefile18
-rw-r--r--fs/jffs2/Makefile13
-rw-r--r--fs/jfs/Makefile11
-rw-r--r--fs/lockd/Makefile17
-rw-r--r--fs/minix/Makefile10
-rw-r--r--fs/msdos/Makefile12
-rw-r--r--fs/ncpfs/Makefile10
-rw-r--r--fs/nfs/Makefile19
-rw-r--r--fs/nfsd/Makefile20
-rw-r--r--fs/nls/Makefile14
-rw-r--r--fs/ntfs/Makefile8
-rw-r--r--fs/openpromfs/Makefile12
-rw-r--r--fs/partitions/Makefile7
-rw-r--r--fs/proc/Makefile13
-rw-r--r--fs/qnx4/Makefile10
-rw-r--r--fs/ramfs/Makefile5
-rw-r--r--fs/reiserfs/Makefile14
-rw-r--r--fs/romfs/Makefile10
-rw-r--r--fs/smbfs/Makefile10
-rw-r--r--fs/sysv/Makefile12
-rw-r--r--fs/udf/Makefile10
-rw-r--r--fs/ufs/Makefile12
-rw-r--r--fs/umsdos/Makefile10
-rw-r--r--fs/vfat/Makefile12
-rw-r--r--lib/Makefile7
-rw-r--r--lib/zlib_deflate/Makefile7
-rw-r--r--lib/zlib_inflate/Makefile9
-rw-r--r--net/802/Makefile7
-rw-r--r--net/8021q/Makefile10
-rw-r--r--net/Makefile60
-rw-r--r--net/appletalk/Makefile14
-rw-r--r--net/atm/Makefile19
-rw-r--r--net/ax25/Makefile20
-rw-r--r--net/bluetooth/Makefile8
-rw-r--r--net/bridge/Makefile11
-rw-r--r--net/core/Makefile7
-rw-r--r--net/decnet/Makefile14
-rw-r--r--net/econet/Makefile10
-rw-r--r--net/ethernet/Makefile26
-rw-r--r--net/ipv4/Makefile7
-rw-r--r--net/ipv4/netfilter/Makefile13
-rw-r--r--net/ipv6/Makefile13
-rw-r--r--net/ipv6/netfilter/Makefile7
-rw-r--r--net/ipx/Makefile21
-rw-r--r--net/irda/Makefile46
-rw-r--r--net/irda/ircomm/Makefile6
-rw-r--r--net/irda/irlan/Makefile10
-rw-r--r--net/irda/irnet/Makefile11
-rw-r--r--net/khttpd/Makefile14
-rw-r--r--net/lapb/Makefile13
-rw-r--r--net/netlink/Makefile14
-rw-r--r--net/netrom/Makefile16
-rw-r--r--net/packet/Makefile7
-rw-r--r--net/rose/Makefile16
-rw-r--r--net/sched/Makefile3
-rw-r--r--net/sunrpc/Makefile17
-rw-r--r--net/unix/Makefile14
-rw-r--r--net/wanrouter/Makefile15
-rw-r--r--net/x25/Makefile17
-rw-r--r--sound/Makefile16
-rw-r--r--sound/arm/Makefile2
-rw-r--r--sound/core/Makefile26
-rw-r--r--sound/core/ioctl32/Makefile2
-rw-r--r--sound/core/oss/Makefile2
-rw-r--r--sound/core/seq/Makefile13
-rw-r--r--sound/core/seq/instr/Makefile2
-rw-r--r--sound/core/seq/oss/Makefile2
-rw-r--r--sound/drivers/Makefile7
-rw-r--r--sound/drivers/mpu401/Makefile2
-rw-r--r--sound/drivers/opl3/Makefile2
-rw-r--r--sound/i2c/Makefile10
-rw-r--r--sound/i2c/l3/Makefile2
-rw-r--r--sound/isa/Makefile15
-rw-r--r--sound/isa/ad1816a/Makefile2
-rw-r--r--sound/isa/ad1848/Makefile2
-rw-r--r--sound/isa/cs423x/Makefile2
-rw-r--r--sound/isa/es1688/Makefile2
-rw-r--r--sound/isa/gus/Makefile2
-rw-r--r--sound/isa/opti9xx/Makefile2
-rw-r--r--sound/isa/sb/Makefile2
-rw-r--r--sound/isa/wavefront/Makefile2
-rw-r--r--sound/oss/Makefile22
-rw-r--r--sound/oss/cs4281/Makefile2
-rw-r--r--sound/oss/dmasound/Makefile7
-rw-r--r--sound/oss/emu10k1/Makefile2
-rw-r--r--sound/pci/Makefile15
-rw-r--r--sound/pci/ac97/Makefile2
-rw-r--r--sound/pci/ali5451/Makefile2
-rw-r--r--sound/pci/cs46xx/Makefile2
-rw-r--r--sound/pci/emu10k1/Makefile2
-rw-r--r--sound/pci/korg1212/Makefile2
-rw-r--r--sound/pci/nm256/Makefile2
-rw-r--r--sound/pci/rme9652/Makefile2
-rw-r--r--sound/pci/trident/Makefile2
-rw-r--r--sound/pci/ymfpci/Makefile2
-rw-r--r--sound/ppc/Makefile2
-rw-r--r--sound/synth/Makefile7
-rw-r--r--sound/synth/emux/Makefile2
193 files changed, 432 insertions, 1357 deletions
diff --git a/Makefile b/Makefile
index 3e6238667ae8..88a3909e9f33 100644
--- a/Makefile
+++ b/Makefile
@@ -124,10 +124,10 @@ DRIVERS-y += drivers/base/base.o \
drivers/misc/misc.o \
drivers/net/net.o \
drivers/media/media.o
-DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
+DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/built-in.o
DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
-DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
+DRIVERS-$(CONFIG_FC4) += drivers/fc4/built-in.o
DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
DRIVERS-$(CONFIG_FUSION) += drivers/message/message.o
DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
@@ -139,16 +139,16 @@ endif
DRIVERS-$(CONFIG_SOUND) += sound/sound.o
DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
-DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
+DRIVERS-$(CONFIG_DIO) += drivers/dio/built-in.o
DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o
DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
DRIVERS-$(CONFIG_PNP) += drivers/pnp/pnp.o
-DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
+DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/built-in.o
DRIVERS-$(CONFIG_VT) += drivers/video/video.o
-DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
-DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
+DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/built-in.o
+DRIVERS-$(CONFIG_TC) += drivers/tc/built-in.o
DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
DRIVERS-$(CONFIG_GAMEPORT) += drivers/input/gameport/gamedrv.o
diff --git a/Rules.make b/Rules.make
index c335f8cf5592..d4c624a2982c 100644
--- a/Rules.make
+++ b/Rules.make
@@ -144,14 +144,25 @@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
%.o: %.S dummy
$(call if_changed,cmd_as_o_S)
-# ---------------------------------------------------------------------------
+# FIXME
%.lst: %.c
$(CC) $(c_flags) -g -c -o $*.o $<
$(TOPDIR)/scripts/makelst $* $(TOPDIR) $(OBJDUMP)
-#
-#
-#
+
+
+# If a Makefile does define neither O_TARGET nor L_TARGET,
+# use a standard O_TARGET named "built-in.o"
+
+ifndef O_TARGET
+ifndef L_TARGET
+O_TARGET := built-in.o
+endif
+endif
+
+# Build the compiled-in targets
+# ---------------------------------------------------------------------------
+
all_targets: $(O_TARGET) $(L_TARGET) sub_dirs
# To build objects in subdirs, we need to descend into the directories
diff --git a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile
index c05f1e2508b5..17ce0de4e8de 100644
--- a/arch/alpha/math-emu/Makefile
+++ b/arch/alpha/math-emu/Makefile
@@ -2,8 +2,6 @@
# Makefile for the FPU instruction emulation.
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_MATHEMU) += math-emu.o
math-emu-objs := math.o qrnnd.o
diff --git a/drivers/acorn/net/Makefile b/drivers/acorn/net/Makefile
index 2ee3cd707cd2..d9d35dfb8349 100644
--- a/drivers/acorn/net/Makefile
+++ b/drivers/acorn/net/Makefile
@@ -3,13 +3,6 @@
# Makefile for the Acorn ethercard network device drivers
#
-O_TARGET := built-in.o
-
-obj-y :=
-obj-m :=
-obj-n :=
-obj- :=
-
obj-$(CONFIG_ARM_ETHERH) += etherh.o
obj-$(CONFIG_ARM_ETHER3) += ether3.o
obj-$(CONFIG_ARM_ETHER1) += ether1.o
diff --git a/drivers/acorn/scsi/Makefile b/drivers/acorn/scsi/Makefile
index c88d44ebb6a9..f222a3c01178 100644
--- a/drivers/acorn/scsi/Makefile
+++ b/drivers/acorn/scsi/Makefile
@@ -2,13 +2,6 @@
# Makefile for drivers/acorn/scsi
#
-O_TARGET := acorn-scsi.o
-
-obj-y :=
-obj-m :=
-obj-n :=
-obj- :=
-
export-objs := fas216.o queue.o msgqueue.o
acornscsi_mod-objs := acornscsi.o acornscsi-io.o
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 586b2ea24dcc..2c0d318cce2c 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -21,35 +21,29 @@ obj-y := acpi_ksyms.o
#
# ACPI Boot-Time Table Parsing
#
-ifeq ($(CONFIG_ACPI_BOOT),y)
- obj-y += acpi_tables.o
-endif
+obj-$(CONFIG_ACPI_BOOT) += acpi_tables.o
#
# ACPI Core Subsystem (Interpreter)
#
-ifeq ($(CONFIG_ACPI_INTERPRETER),y)
- obj-y += acpi_osl.o acpi_utils.o
- subdir-y += dispatcher events executer hardware namespace parser \
- resources tables utilities
- obj-y += $(foreach dir,$(subdir-y),$(dir)/$(dir).o)
-endif
+obj-$(CONFIG_ACPI_INTERPRETER) += acpi_osl.o acpi_utils.o \
+ dispatcher/ events/ executer/ hardware/ \
+ namespace/ parser/ resources/ tables/ \
+ utilities/
#
# ACPI Bus and Device Drivers
#
-ifeq ($(CONFIG_ACPI_BUS),y)
- obj-y += acpi_bus.o
- obj-$(CONFIG_ACPI_AC) += acpi_ac.o
- obj-$(CONFIG_ACPI_BATTERY) += acpi_battery.o
- obj-$(CONFIG_ACPI_BUTTON) += acpi_button.o
- obj-$(CONFIG_ACPI_EC) += acpi_ec.o
- obj-$(CONFIG_ACPI_FAN) += acpi_fan.o
- obj-$(CONFIG_ACPI_PCI) += acpi_pci_root.o acpi_pci_link.o
- obj-$(CONFIG_ACPI_POWER) += acpi_power.o
- obj-$(CONFIG_ACPI_PROCESSOR) += acpi_processor.o
- obj-$(CONFIG_ACPI_THERMAL) += acpi_thermal.o
- obj-$(CONFIG_ACPI_SYSTEM) += acpi_system.o
-endif
+obj-$(CONFIG_ACPI_BUS) += acpi_bus.o
+obj-$(CONFIG_ACPI_AC) += acpi_ac.o
+obj-$(CONFIG_ACPI_BATTERY) += acpi_battery.o
+obj-$(CONFIG_ACPI_BUTTON) += acpi_button.o
+obj-$(CONFIG_ACPI_EC) += acpi_ec.o
+obj-$(CONFIG_ACPI_FAN) += acpi_fan.o
+obj-$(CONFIG_ACPI_PCI) += acpi_pci_root.o acpi_pci_link.o
+obj-$(CONFIG_ACPI_POWER) += acpi_power.o
+obj-$(CONFIG_ACPI_PROCESSOR) += acpi_processor.o
+obj-$(CONFIG_ACPI_THERMAL) += acpi_thermal.o
+obj-$(CONFIG_ACPI_SYSTEM) += acpi_system.o
include $(TOPDIR)/Rules.make
diff --git a/drivers/acpi/debugger/Makefile b/drivers/acpi/debugger/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/debugger/Makefile
+++ b/drivers/acpi/debugger/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/dispatcher/Makefile b/drivers/acpi/dispatcher/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/dispatcher/Makefile
+++ b/drivers/acpi/dispatcher/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/events/Makefile b/drivers/acpi/events/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/events/Makefile
+++ b/drivers/acpi/events/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/executer/Makefile b/drivers/acpi/executer/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/executer/Makefile
+++ b/drivers/acpi/executer/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/hardware/Makefile b/drivers/acpi/hardware/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/hardware/Makefile
+++ b/drivers/acpi/hardware/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/namespace/Makefile b/drivers/acpi/namespace/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/namespace/Makefile
+++ b/drivers/acpi/namespace/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/parser/Makefile b/drivers/acpi/parser/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/parser/Makefile
+++ b/drivers/acpi/parser/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/resources/Makefile b/drivers/acpi/resources/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/resources/Makefile
+++ b/drivers/acpi/resources/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/tables/Makefile b/drivers/acpi/tables/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/tables/Makefile
+++ b/drivers/acpi/tables/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/utilities/Makefile b/drivers/acpi/utilities/Makefile
index d0bbc7655a46..ec9debb42a26 100644
--- a/drivers/acpi/utilities/Makefile
+++ b/drivers/acpi/utilities/Makefile
@@ -2,8 +2,6 @@
# Makefile for all Linux ACPI interpreter subdirectories
#
-O_TARGET := $(notdir $(CURDIR)).o
-
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/block/paride/Makefile b/drivers/block/paride/Makefile
index dc49e4113d41..d62c39cb9b55 100644
--- a/drivers/block/paride/Makefile
+++ b/drivers/block/paride/Makefile
@@ -5,8 +5,6 @@
# Rewritten to use lists instead of if-statements.
#
-L_TARGET := paride.a
-
export-objs := paride.o bpck6.o
obj-$(CONFIG_PARIDE) += paride.o
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
index 41b911226bb6..2789d71fc9e5 100644
--- a/drivers/char/Makefile
+++ b/drivers/char/Makefile
@@ -182,14 +182,8 @@ obj-$(CONFIG_TOSHIBA) += toshiba.o
obj-$(CONFIG_I8K) += i8k.o
obj-$(CONFIG_DS1620) += ds1620.o
obj-$(CONFIG_INTEL_RNG) += i810_rng.o
-
obj-$(CONFIG_QIC02_TAPE) += tpqic02.o
-
-subdir-$(CONFIG_FTAPE) += ftape
-ifeq ($(CONFIG_FTAPE),y)
- obj-y += ftape/ftape.o
-endif
-
+obj-$(CONFIG_FTAPE) += ftape/
obj-$(CONFIG_H8) += h8.o
obj-$(CONFIG_PPDEV) += ppdev.o
obj-$(CONFIG_DZ) += dz.o
@@ -216,23 +210,10 @@ obj-$(CONFIG_MACHZ_WDT) += machzwd.o
obj-$(CONFIG_SH_WDT) += shwdt.o
obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
-
obj-$(CONFIG_MWAVE) += mwave/
-
-subdir-$(CONFIG_AGP) += agp
-ifeq ($(CONFIG_AGP),y)
- obj-y += agp/agp.o
-endif
-
-subdir-$(CONFIG_DRM) += drm
-ifeq ($(CONFIG_DRM),y)
- obj-y += drm/drm.o
-endif
-
-subdir-$(CONFIG_PCMCIA) += pcmcia
-ifeq ($(CONFIG_PCMCIA),y)
- obj-y += pcmcia/pcmcia_char.o
-endif
+obj-$(CONFIG_AGP) += agp/
+obj-$(CONFIG_DRM) += drm/
+obj-$(CONFIG_PCMCIA) += pcmcia/
include $(TOPDIR)/Rules.make
diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile
index 4b8ee1713eda..8c78cba4f66e 100644
--- a/drivers/char/agp/Makefile
+++ b/drivers/char/agp/Makefile
@@ -3,8 +3,6 @@
# space ioctl interface to use agp memory. It also adds a kernel interface
# that other drivers could use to manipulate agp memory.
-O_TARGET := agp.o
-
export-objs := agpgart_be.o
agpgart-objs := agpgart_fe.o agpgart_be.o
diff --git a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile
index 5b000a45ca71..b7da9f2a71af 100644
--- a/drivers/char/drm/Makefile
+++ b/drivers/char/drm/Makefile
@@ -2,8 +2,6 @@
# Makefile for the drm device driver. This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
-O_TARGET := drm.o
-
gamma-objs := gamma_drv.o gamma_dma.o
tdfx-objs := tdfx_drv.o
r128-objs := r128_drv.o r128_cce.o r128_state.o
diff --git a/drivers/char/ftape/Makefile b/drivers/char/ftape/Makefile
index 47e754964cf3..7bcf0642455e 100644
--- a/drivers/char/ftape/Makefile
+++ b/drivers/char/ftape/Makefile
@@ -23,8 +23,6 @@
# Linux.
#
-O_TARGET := ftape.o
-
obj-$(CONFIG_FTAPE) += lowlevel/
obj-$(CONFIG_ZFTAPE) += zftape/
obj-$(CONFIG_ZFT_COMPRESSOR) += compressor/
diff --git a/drivers/char/ftape/compressor/Makefile b/drivers/char/ftape/compressor/Makefile
index 0a06c0d68e1d..8d9ded86b747 100644
--- a/drivers/char/ftape/compressor/Makefile
+++ b/drivers/char/ftape/compressor/Makefile
@@ -24,8 +24,6 @@
# Linux.
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_ZFT_COMPRESSOR) += zft-compressor.o
zft-compressor-objs := zftape-compress.o lzrw3.o
diff --git a/drivers/char/ftape/lowlevel/Makefile b/drivers/char/ftape/lowlevel/Makefile
index 6eb8badf5fd0..c2676897f4b5 100644
--- a/drivers/char/ftape/lowlevel/Makefile
+++ b/drivers/char/ftape/lowlevel/Makefile
@@ -23,8 +23,6 @@
# driver for Linux.
#
-O_TARGET := built-in.o
-
export-objs := ftape_syms.o
obj-$(CONFIG_FTAPE) += ftape.o
diff --git a/drivers/char/ftape/zftape/Makefile b/drivers/char/ftape/zftape/Makefile
index 0e58d985750f..9ebe70f6c837 100644
--- a/drivers/char/ftape/zftape/Makefile
+++ b/drivers/char/ftape/zftape/Makefile
@@ -27,8 +27,6 @@
# ZFT_OBSOLETE - enable the MTIOC_ZFTAPE_GETBLKSZ ioctl. You should
# leave this enabled for compatibility with taper.
-O_TARGET := built-in.o
-
export-objs := zftape_syms.o
obj-$(CONFIG_ZFTAPE) += zftape.o
diff --git a/drivers/char/mwave/Makefile b/drivers/char/mwave/Makefile
index 866f8b8a8a98..8efb3a877271 100644
--- a/drivers/char/mwave/Makefile
+++ b/drivers/char/mwave/Makefile
@@ -4,8 +4,6 @@
# See the README file in this directory for more info. <paulsch@us.ibm.com>
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_MWAVE) += mwave.o
mwave-objs := mwavedd.o smapi.o tp3780i.o 3780i.o
diff --git a/drivers/char/pcmcia/Makefile b/drivers/char/pcmcia/Makefile
index 2e61548788f0..0b499b55814b 100644
--- a/drivers/char/pcmcia/Makefile
+++ b/drivers/char/pcmcia/Makefile
@@ -4,8 +4,6 @@
# Makefile for the Linux PCMCIA char device drivers.
#
-O_TARGET := pcmcia_char.o
-
obj-$(CONFIG_PCMCIA_SERIAL_CS) += serial_cs.o
obj-$(CONFIG_SYNCLINK_CS) += synclink_cs.o
diff --git a/drivers/char/rio/Makefile b/drivers/char/rio/Makefile
index 72c3508fe42a..2ca33bd83173 100644
--- a/drivers/char/rio/Makefile
+++ b/drivers/char/rio/Makefile
@@ -6,8 +6,6 @@
# This file is GPL. See other files for the full Blurb. I'm lazy today.
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_RIO) += rio.o
rio-objs := rio_linux.o rioinit.o rioboot.o riocmd.o rioctrl.o riointr.o \
diff --git a/drivers/dio/Makefile b/drivers/dio/Makefile
index 48d3522a7875..522b2e25ba8c 100644
--- a/drivers/dio/Makefile
+++ b/drivers/dio/Makefile
@@ -1,19 +1,7 @@
#
# Makefile for the linux kernel.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-#
-# NB: cribbed from the drivers/sbus/Makefile -- PMM
-
-SUB_DIRS :=
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS)
-L_OBJS := dio.o
-L_TARGET := dio.a
+obj-y := dio.o
include $(TOPDIR)/Rules.make
diff --git a/drivers/fc4/Makefile b/drivers/fc4/Makefile
index 6fc3c1f58004..37b66772421c 100644
--- a/drivers/fc4/Makefile
+++ b/drivers/fc4/Makefile
@@ -2,8 +2,6 @@
# Makefile for the Linux Fibre Channel device drivers.
#
-L_TARGET := fc4.a
-
export-objs := fc_syms.o
fc4-objs := fc.o fc_syms.o
diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 69d9bc3794ea..688cca9800d3 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -19,11 +19,7 @@ obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o
obj-$(CONFIG_INPUT_JOYDEV) += joydev.o
obj-$(CONFIG_INPUT_EVDEV) += evdev.o
-subdir-$(CONFIG_INPUT_JOYSTICK) += joystick
-
-ifeq ($(CONFIG_INPUT_JOYSTICK),y)
- obj-y += joystick/joydrv.o
-endif
+obj-$(CONFIG_INPUT_JOYSTICK) += joystick/
# The global Rules.make.
diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile
index 8b2cdd21e158..c70244633703 100644
--- a/drivers/input/joystick/Makefile
+++ b/drivers/input/joystick/Makefile
@@ -2,10 +2,6 @@
# Makefile for the input core drivers.
#
-# The target object and module list name.
-
-O_TARGET := joydrv.o
-
# I-Force may need both USB and RS-232
CONFIG_JOYSTICK_IFORCE := n
diff --git a/drivers/isdn/act2000/Makefile b/drivers/isdn/act2000/Makefile
index 03e3c7313300..d23b224b2530 100644
--- a/drivers/isdn/act2000/Makefile
+++ b/drivers/isdn/act2000/Makefile
@@ -1,15 +1,11 @@
# Makefile for the act2000 ISDN device driver
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_ISDN_DRV_ACT2000) += act2000.o
# Multipart objects.
act2000-objs := module.o capi.o act2000_isa.o
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_ACT2000) += act2000.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/capi/Makefile b/drivers/isdn/capi/Makefile
index 47192cdf4a8e..08096b58e1e7 100644
--- a/drivers/isdn/capi/Makefile
+++ b/drivers/isdn/capi/Makefile
@@ -1,17 +1,9 @@
# Makefile for the CAPI subsystem.
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Objects that export symbols.
export-objs := kcapi.o capiutil.o capilib.o capifs.o
-# Multipart objects.
-
-kernelcapi-objs := kcapi.o capiutil.o capilib.o
-
# Ordering constraints: kernelcapi.o first
# Each configuration option enables a list of files.
@@ -21,6 +13,10 @@ obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o
obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o
obj-$(CONFIG_ISDN_CAPI_CAPIFS) += capifs.o
+# Multipart objects.
+
+kernelcapi-objs := kcapi.o capiutil.o capilib.o
+
# The global Rules.make.
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/divert/Makefile b/drivers/isdn/divert/Makefile
index 68757778c066..f2d234dbcd64 100644
--- a/drivers/isdn/divert/Makefile
+++ b/drivers/isdn/divert/Makefile
@@ -1,19 +1,13 @@
-#
# Makefile for the dss1_divert ISDN module
-#
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_ISDN_DIVERSION) += dss1_divert.o
# Multipart objects.
dss1_divert-objs := isdn_divert.o divert_procfs.o divert_init.o
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DIVERSION) += dss1_divert.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/eicon/Makefile b/drivers/isdn/eicon/Makefile
index e21870061537..c4e4da7290a3 100644
--- a/drivers/isdn/eicon/Makefile
+++ b/drivers/isdn/eicon/Makefile
@@ -1,13 +1,14 @@
# Makefile for the eicon ISDN device driver
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Objects that export symbols.
export-objs := Divas_mod.o eicon_mod.o
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_ISDN_DRV_EICON_OLD) += eicon.o
+obj-$(CONFIG_ISDN_DRV_EICON_DIVAS) += divas.o
+
# Multipart objects.
eicon-objs := eicon_mod.o eicon_isa.o eicon_pci.o eicon_idi.o \
@@ -23,9 +24,4 @@ eicon-objs-$(CONFIG_ISDN_DRV_EICON_PCI) += common.o idi.o bri.o pri.o log.o \
eicon-objs += $(eicon-objs-y)
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_EICON_OLD) += eicon.o
-obj-$(CONFIG_ISDN_DRV_EICON_DIVAS) += divas.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/hardware/Makefile b/drivers/isdn/hardware/Makefile
index 42ee01dc99e9..8266ed78f13f 100644
--- a/drivers/isdn/hardware/Makefile
+++ b/drivers/isdn/hardware/Makefile
@@ -1,9 +1,5 @@
# Makefile for the CAPI hardware drivers
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Object files in subdirectories
mod-subdirs := avm
diff --git a/drivers/isdn/hardware/avm/Makefile b/drivers/isdn/hardware/avm/Makefile
index 639f8d7ad89a..e5ad1692712c 100644
--- a/drivers/isdn/hardware/avm/Makefile
+++ b/drivers/isdn/hardware/avm/Makefile
@@ -1,9 +1,5 @@
# Makefile for the AVM ISDN device drivers
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Objects that export symbols.
export-objs := b1dma.o b1pcmcia.o b1.o
diff --git a/drivers/isdn/hisax/Makefile b/drivers/isdn/hisax/Makefile
index f8fdf4b329fd..bffd23a76769 100644
--- a/drivers/isdn/hisax/Makefile
+++ b/drivers/isdn/hisax/Makefile
@@ -1,9 +1,5 @@
# Makefile for the hisax ISDN device driver
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Define maximum number of cards
EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS)
@@ -12,12 +8,22 @@ EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS)
export-objs := config.o fsm.o hisax_isac.o hisax_hscx.o
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
+obj-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
+obj-$(CONFIG_HISAX_ELSA_CS) += elsa_cs.o
+obj-$(CONFIG_HISAX_ST5481) += hisax_st5481.o
+obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_isac.o hisax_fcpcipnp.o
+obj-$(CONFIG_HISAX_FRITZ_CLASSIC) += hisax_isac.o hisax_hscx.o hisax_fcclassic.o
+obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_hfcpci.o
+
# Multipart objects.
-hisax-objs := config.o isdnl1.o tei.o isdnl2.o isdnl3.o \
- lmgr.o q931.o callc.o fsm.o cert.o
hisax_st5481-objs := st5481_init.o st5481_usb.o st5481_d.o st5481_b.o \
st5481_hdlc.o
+hisax-objs := config.o isdnl1.o tei.o isdnl2.o isdnl3.o \
+ lmgr.o q931.o callc.o fsm.o cert.o
# Optional parts of multipart objects.
hisax-objs-$(CONFIG_HISAX_EURO) += l3dss1.o
@@ -55,16 +61,6 @@ hisax-objs-$(CONFIG_HISAX_W6692) += w6692.o
hisax-objs += $(hisax-objs-y)
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_HISAX) += hisax.o
-obj-$(CONFIG_HISAX_SEDLBAUER_CS) += sedlbauer_cs.o
-obj-$(CONFIG_HISAX_ELSA_CS) += elsa_cs.o
-obj-$(CONFIG_HISAX_ST5481) += hisax_st5481.o
-obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_isac.o hisax_fcpcipnp.o
-obj-$(CONFIG_HISAX_FRITZ_CLASSIC) += hisax_isac.o hisax_hscx.o hisax_fcclassic.o
-obj-$(CONFIG_HISAX_FRITZ_PCIPNP) += hisax_hfcpci.o
-
CERT := $(shell md5sum -c md5sums.asc >> /dev/null;echo $$?)
CFLAGS_cert.o := -DCERTIFICATION=$(CERT)
diff --git a/drivers/isdn/hysdn/Makefile b/drivers/isdn/hysdn/Makefile
index 925cfff18d65..a0a2bd3b16e7 100644
--- a/drivers/isdn/hysdn/Makefile
+++ b/drivers/isdn/hysdn/Makefile
@@ -1,8 +1,8 @@
# Makefile for the hysdn ISDN device driver
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_HYSDN) += hysdn.o
# Multipart objects.
@@ -15,8 +15,4 @@ hysdn-objs-$(CONFIG_HYSDN_CAPI) += hycapi.o
hysdn-objs += $(hysdn-objs-y)
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_HYSDN) += hysdn.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/i4l/Makefile b/drivers/isdn/i4l/Makefile
index 9748b400ee6a..900d4b904f96 100644
--- a/drivers/isdn/i4l/Makefile
+++ b/drivers/isdn/i4l/Makefile
@@ -1,16 +1,18 @@
# Makefile for the kernel ISDN subsystem and device drivers.
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Objects that export symbols.
export-objs := isdn_common.o
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_ISDN) += isdn.o
+obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o
+
# Multipart objects.
-isdn-objs := isdn_net.o isdn_tty.o isdn_v110.o isdn_common.o
+isdn-objs := isdn_net.o isdn_tty.o \
+ isdn_v110.o isdn_common.o
# Optional parts of multipart objects.
@@ -21,11 +23,4 @@ isdn-objs-$(CONFIG_ISDN_TTY_FAX) += isdn_ttyfax.o
isdn-objs += $(isdn-objs-y)
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN) += isdn.o
-obj-$(CONFIG_ISDN_PPP_BSDCOMP) += isdn_bsdcomp.o
-
-# The global Rules.make.
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/icn/Makefile b/drivers/isdn/icn/Makefile
index e848d105276c..66b2487b72b8 100644
--- a/drivers/isdn/icn/Makefile
+++ b/drivers/isdn/icn/Makefile
@@ -1,9 +1,5 @@
# Makefile for the icn ISDN device driver
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DRV_ICN) += icn.o
diff --git a/drivers/isdn/isdnloop/Makefile b/drivers/isdn/isdnloop/Makefile
index 413929cf4cb2..b532b4907de1 100644
--- a/drivers/isdn/isdnloop/Makefile
+++ b/drivers/isdn/isdnloop/Makefile
@@ -2,10 +2,6 @@
# Makefile for the isdnloop ISDN device driver
#
-# The target object and module list name.
-
-O_TARGET := built-in.o
-
# Each configuration option enables a list of files.
obj-$(CONFIG_ISDN_DRV_LOOP) += isdnloop.o
diff --git a/drivers/isdn/pcbit/Makefile b/drivers/isdn/pcbit/Makefile
index 1786167a73da..0d85b0b92465 100644
--- a/drivers/isdn/pcbit/Makefile
+++ b/drivers/isdn/pcbit/Makefile
@@ -1,15 +1,11 @@
# Makefile for the pcbit ISDN device driver
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_ISDN_DRV_PCBIT) += pcbit.o
# Multipart objects.
pcbit-objs := module.o edss1.o drv.o layer2.o capi.o callbacks.o
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_PCBIT) += pcbit.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/sc/Makefile b/drivers/isdn/sc/Makefile
index d494400f93e5..ba6f1e641283 100644
--- a/drivers/isdn/sc/Makefile
+++ b/drivers/isdn/sc/Makefile
@@ -1,16 +1,12 @@
# Makefile for the sc ISDN device driver
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_ISDN_DRV_SC) += sc.o
# Multipart objects.
sc-objs := shmem.o init.o debug.o packet.o command.o event.o \
ioctl.o interrupt.o message.o timer.o
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_SC) += sc.o
-
include $(TOPDIR)/Rules.make
diff --git a/drivers/isdn/tpam/Makefile b/drivers/isdn/tpam/Makefile
index 50889cf10995..e416221a25c8 100644
--- a/drivers/isdn/tpam/Makefile
+++ b/drivers/isdn/tpam/Makefile
@@ -1,15 +1,12 @@
# Makefile for the TurboPAM ISDN device driver
-# The target object and module list name.
+# Each configuration option enables a list of files.
-O_TARGET := built-in.o
+obj-$(CONFIG_ISDN_DRV_TPAM) += tpam.o
# Multipart objects.
-tpam-objs := tpam_main.o tpam_nco.o tpam_memory.o tpam_commands.o tpam_queues.o tpam_hdlc.o tpam_crcpc.o
-
-# Each configuration option enables a list of files.
-
-obj-$(CONFIG_ISDN_DRV_TPAM) += tpam.o
+tpam-objs := tpam_main.o tpam_nco.o tpam_memory.o tpam_commands.o \
+ tpam_queues.o tpam_hdlc.o tpam_crcpc.o
include $(TOPDIR)/Rules.make
diff --git a/drivers/message/Makefile b/drivers/message/Makefile
index 3bb37d0dec3e..74d1b201f052 100644
--- a/drivers/message/Makefile
+++ b/drivers/message/Makefile
@@ -6,15 +6,8 @@ O_TARGET := message.o
mod-subdirs := i2o fusion
-subdir-$(CONFIG_I2O) += i2o
-ifeq ($(CONFIG_I2O),y)
- obj-y += i2o/i2o.o
-endif
-
-subdir-$(CONFIG_FUSION) += fusion
-ifeq ($(CONFIG_FUSION),y)
- obj-y += fusion/fusion.o
-endif
+obj-$(CONFIG_I2O) += i2o/
+obj-$(CONFIG_FUSION) += fusion/
include $(TOPDIR)/Rules.make
diff --git a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile
index 601a0cc2583f..c5298d750522 100644
--- a/drivers/message/fusion/Makefile
+++ b/drivers/message/fusion/Makefile
@@ -43,8 +43,6 @@ EXTRA_CFLAGS += -I. ${MPT_CFLAGS}
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC
-O_TARGET := fusion.o
-
export-objs := mptbase.o mptscsih.o mptlan.o mptctl.o isense.o
obj-$(CONFIG_FUSION) += mptbase.o mptscsih.o
diff --git a/drivers/message/i2o/Makefile b/drivers/message/i2o/Makefile
index 49fd7dcc3ad4..44ca1bbcc8f7 100644
--- a/drivers/message/i2o/Makefile
+++ b/drivers/message/i2o/Makefile
@@ -5,8 +5,6 @@
# In the future, some of these should be built conditionally.
#
-O_TARGET := i2o.o
-
export-objs := i2o_pci.o i2o_core.o i2o_config.o i2o_block.o i2o_lan.o i2o_scsi.o i2o_proc.o
obj-$(CONFIG_I2O_PCI) += i2o_pci.o
diff --git a/drivers/net/appletalk/Makefile b/drivers/net/appletalk/Makefile
index 557271fd291d..4ef266096b58 100644
--- a/drivers/net/appletalk/Makefile
+++ b/drivers/net/appletalk/Makefile
@@ -1,17 +1,7 @@
#
# Makefile for drivers/net/appletalk
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-
-O_TARGET := built-in.o
-obj-y :=
-obj-n :=
-obj-m :=
-obj- :=
export-objs :=
obj-$(CONFIG_IPDDP) += ipddp.o
diff --git a/drivers/net/arcnet/Makefile b/drivers/net/arcnet/Makefile
index 58403cd6be6b..c3da45dd71f4 100644
--- a/drivers/net/arcnet/Makefile
+++ b/drivers/net/arcnet/Makefile
@@ -1,16 +1,6 @@
# Makefile for linux/drivers/net/arcnet
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-
-O_TARGET := built-in.o
-obj-y :=
-obj-n :=
-obj-m :=
-obj- :=
export-objs := arcnet.o com20020.o
obj-$(CONFIG_ARCNET) += arcnet.o
diff --git a/drivers/net/e100/Makefile b/drivers/net/e100/Makefile
index 1df67109a4f6..3fef25fabf11 100644
--- a/drivers/net/e100/Makefile
+++ b/drivers/net/e100/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the Intel's E100 ethernet driver
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := built-in.o
obj-$(CONFIG_E100) += e100.o
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 0bd0d577bae0..497e9e430ce0 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the Intel(R) PRO/1000 ethernet driver
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := built-in.o
obj-$(CONFIG_E1000) += e1000.o
diff --git a/drivers/net/fc/Makefile b/drivers/net/fc/Makefile
index 4f22d0694ffe..16c58df620dd 100644
--- a/drivers/net/fc/Makefile
+++ b/drivers/net/fc/Makefile
@@ -5,8 +5,6 @@
# Rewritten to use lists instead of if-statements.
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_IPHASE5526) += iph5526.o
include $(TOPDIR)/Rules.make
diff --git a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile
index ccf5051739b1..60a189f9fde0 100644
--- a/drivers/net/hamradio/Makefile
+++ b/drivers/net/hamradio/Makefile
@@ -10,12 +10,8 @@
# Christoph Hellwig <hch@infradead.org>
#
-
-O_TARGET := built-in.o
-
export-objs = hdlcdrv.o
-
obj-$(CONFIG_DMASCC) += dmascc.o
obj-$(CONFIG_SCC) += scc.o
obj-$(CONFIG_MKISS) += mkiss.o
diff --git a/drivers/net/hamradio/soundmodem/Makefile b/drivers/net/hamradio/soundmodem/Makefile
index 6d1ba016ad5e..6235d31a462f 100644
--- a/drivers/net/hamradio/soundmodem/Makefile
+++ b/drivers/net/hamradio/soundmodem/Makefile
@@ -1,15 +1,6 @@
#
# Makefile for the soundmodem device driver.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now inherited from the
-# parent makes..
-#
-
-O_TARGET := built-in.o
obj-$(CONFIG_SOUNDMODEM) += soundmodem.o
@@ -25,19 +16,19 @@ soundmodem-$(CONFIG_SOUNDMODEM_PSK4800) += sm_psk4800.o
soundmodem-$(CONFIG_SOUNDMODEM_FSK9600) += sm_fsk9600.o
soundmodem-objs := $(soundmodem-y)
-all: all_targets
-.PHONY: all
+include $(TOPDIR)/Rules.make
-gentbl: gentbl.c
- $(HOSTCC) $(HOSTCFLAGS) $< -o $@ -lm
+# Dependencies on generates files need to be listed explicitly
+
+sm_%.o: sm_tbl_%.h
-TBLHDR := sm_tbl_afsk1200.h sm_tbl_afsk2400_8.h
-TBLHDR += sm_tbl_afsk2666.h sm_tbl_psk4800.h
-TBLHDR += sm_tbl_hapn4800.h sm_tbl_fsk9600.h
+TBLHDR := sm_tbl_afsk1200.h sm_tbl_afsk2400_7.h sm_tbl_afsk2400_8.h \
+ sm_tbl_afsk2666.h sm_tbl_psk4800.h sm_tbl_hapn4800.h \
+ sm_tbl_fsk9600.h
$(TBLHDR): gentbl
./gentbl
-fastdep: $(TBLHDR)
+gentbl: gentbl.c
+ $(HOSTCC) $(HOSTCFLAGS) $< -o $@ -lm
-include $(TOPDIR)/Rules.make
diff --git a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile
index 069196f6fe02..efc5a48272e9 100644
--- a/drivers/net/irda/Makefile
+++ b/drivers/net/irda/Makefile
@@ -1,4 +1,3 @@
-# File: drivers/irda/Makefile
#
# Makefile for the Linux IrDA infrared port device drivers.
#
@@ -6,11 +5,8 @@
# Rewritten to use lists instead of if-statements.
#
-O_TARGET := built-in.o
-
export-objs = irport.o
-
obj-$(CONFIG_IRTTY_SIR) += irtty.o
obj-$(CONFIG_IRPORT_SIR) += irport.o
obj-$(CONFIG_USB_IRDA) += irda-usb.o
diff --git a/drivers/net/pcmcia/Makefile b/drivers/net/pcmcia/Makefile
index d97f861af7b5..7d7795f49092 100644
--- a/drivers/net/pcmcia/Makefile
+++ b/drivers/net/pcmcia/Makefile
@@ -1,16 +1,7 @@
#
-# drivers/net/pcmcia/Makefile
-#
# Makefile for the Linux PCMCIA network device drivers.
#
-O_TARGET := built-in.o
-
-obj-y :=
-obj-m :=
-obj-n :=
-obj- :=
-
# Things that need to export symbols
export-objs := ray_cs.o
diff --git a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
index 4869e3d5683c..512b20309d47 100644
--- a/drivers/net/sk98lin/Makefile
+++ b/drivers/net/sk98lin/Makefile
@@ -1,10 +1,7 @@
-# File: drivers/sk98lin/Makefile
#
# Makefile for the SysKonnect SK-98xx device driver.
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_SK98LIN) += sk98lin.o
sk98lin-objs := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
diff --git a/drivers/net/skfp/Makefile b/drivers/net/skfp/Makefile
index c48b89c4aff5..e78cf7896753 100644
--- a/drivers/net/skfp/Makefile
+++ b/drivers/net/skfp/Makefile
@@ -2,8 +2,6 @@
# Makefile for the SysKonnect FDDI PCI adapter driver
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_SKFP) += skfp.o
skfp-objs := skfddi.o hwmtm.o fplustm.o smt.o cfm.o \
diff --git a/drivers/net/tokenring/Makefile b/drivers/net/tokenring/Makefile
index c9bb72cf0f3c..fe558b672803 100644
--- a/drivers/net/tokenring/Makefile
+++ b/drivers/net/tokenring/Makefile
@@ -1,17 +1,7 @@
#
# Makefile for drivers/net/tokenring
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-
-O_TARGET := built-in.o
-obj-y :=
-obj-n :=
-obj-m :=
-obj- :=
export-objs := tms380tr.o
obj-$(CONFIG_IBMTR) += ibmtr.o
diff --git a/drivers/net/tulip/Makefile b/drivers/net/tulip/Makefile
index e4f682b14250..076623ab0266 100644
--- a/drivers/net/tulip/Makefile
+++ b/drivers/net/tulip/Makefile
@@ -1,19 +1,7 @@
#
-# drivers/net/tulip/Makefile
-#
# Makefile for the Linux "Tulip" family network device drivers.
#
-O_TARGET := built-in.o
-
-obj-y :=
-obj-m :=
-obj-n :=
-obj- :=
-
-# Things that need to export symbols
-export-objs :=
-
obj-$(CONFIG_PCMCIA_XIRTULIP) += xircom_tulip_cb.o
obj-$(CONFIG_PCMCIA_XIRCOM) += xircom_cb.o
obj-$(CONFIG_DM9102) += dmfe.o
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index bc8e6ae9acb3..3937e4f6a12e 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -5,8 +5,6 @@
# Rewritten to use lists instead of if-statements.
#
-O_TARGET := built-in.o
-
export-objs := z85230.o syncppp.o comx.o sdladrv.o cycx_drv.o hdlc_generic.o \
dlci.o pc300_drv.o
diff --git a/drivers/net/wan/lmc/Makefile b/drivers/net/wan/lmc/Makefile
index ec5cec6735cc..6a7cfb7bd231 100644
--- a/drivers/net/wan/lmc/Makefile
+++ b/drivers/net/wan/lmc/Makefile
@@ -1,11 +1,8 @@
-# File: drivers/lmc/Makefile
#
# Makefile for the Lan Media 21140 based WAN cards
# Specifically the 1000,1200,5200,5245
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_LANMEDIA) += lmc.o
lmc-objs := lmc_debug.o lmc_media.o lmc_main.o lmc_proto.o
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 14b29aa75e80..64f6542c26fb 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -1,16 +1,7 @@
#
-# drivers/net/wireless/Makefile
-#
# Makefile for the Linux Wireless network device drivers.
#
-O_TARGET := built-in.o
-
-obj-y :=
-obj-m :=
-obj-n :=
-obj- :=
-
# Things that need to export symbols
export-objs := airo.o orinoco.o hermes.o
diff --git a/drivers/nubus/Makefile b/drivers/nubus/Makefile
index 4df102258028..2a41129a0c40 100644
--- a/drivers/nubus/Makefile
+++ b/drivers/nubus/Makefile
@@ -1,15 +1,6 @@
#
# Makefile for the nubus specific drivers.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now inherited from the
-# parent makefile.
-#
-
-L_TARGET := nubus.a
export-objs := nubus_syms.o
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index f842f658e240..383debd24e99 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -25,10 +25,8 @@ export-objs := scsi_syms.o 53c700.o
mod-subdirs := pcmcia ../acorn/scsi
-subdir-$(CONFIG_SCSI_AIC7XXX) += aic7xxx
subdir-$(CONFIG_PCMCIA) += pcmcia
-
obj-$(CONFIG_SCSI) += scsi_mod.o
obj-$(CONFIG_A4000T_SCSI) += amiga7xx.o 53c7xx.o
@@ -64,9 +62,7 @@ obj-$(CONFIG_SCSI_ULTRASTOR) += ultrastor.o
obj-$(CONFIG_SCSI_AHA152X) += aha152x.o
obj-$(CONFIG_SCSI_AHA1542) += aha1542.o
obj-$(CONFIG_SCSI_AHA1740) += aha1740.o
-ifeq ($(CONFIG_SCSI_AIC7XXX),y)
-obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx/aic7xxx_drv.o
-endif
+obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx/
obj-$(CONFIG_SCSI_AIC7XXX_OLD) += aic7xxx_old.o
obj-$(CONFIG_SCSI_IPS) += ips.o
obj-$(CONFIG_SCSI_FD_MCS) += fd_mcs.o
@@ -87,10 +83,7 @@ obj-$(CONFIG_SCSI_T128) += t128.o
obj-$(CONFIG_SCSI_DMX3191D) += dmx3191d.o
obj-$(CONFIG_SCSI_DTC3280) += dtc.o
obj-$(CONFIG_SCSI_NCR53C7xx) += 53c7,8xx.o
-subdir-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2
-ifeq ($(CONFIG_SCSI_SYM53C8XX_2),y)
- obj-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2/sym53c8xx_2.o
-endif
+obj-$(CONFIG_SCSI_SYM53C8XX_2) += sym53c8xx_2/
obj-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
obj-$(CONFIG_SCSI_NCR53C8XX) += ncr53c8xx.o
obj-$(CONFIG_SCSI_EATA_DMA) += eata_dma.o
@@ -123,8 +116,7 @@ obj-$(CONFIG_SCSI_FCAL) += fcal.o
obj-$(CONFIG_SCSI_CPQFCTS) += cpqfc.o
obj-$(CONFIG_SCSI_LASI700) += lasi700.o 53c700.o
-subdir-$(CONFIG_ARCH_ACORN) += ../acorn/scsi
-obj-$(CONFIG_ARCH_ACORN) += ../acorn/scsi/acorn-scsi.o
+obj-$(CONFIG_ARCH_ACORN) += ../acorn/scsi/
obj-$(CONFIG_CHR_DEV_ST) += st.o
obj-$(CONFIG_CHR_DEV_OSST) += osst.o
diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
index 8c846e1eeea2..f6a898528cf0 100644
--- a/drivers/scsi/aic7xxx/Makefile
+++ b/drivers/scsi/aic7xxx/Makefile
@@ -2,8 +2,6 @@
# Makefile for the Linux aic7xxx SCSI driver.
#
-O_TARGET := aic7xxx_drv.o
-
obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx.o
# Core files
diff --git a/drivers/scsi/sym53c8xx_2/Makefile b/drivers/scsi/sym53c8xx_2/Makefile
index 4475b7851887..3417dea52d83 100644
--- a/drivers/scsi/sym53c8xx_2/Makefile
+++ b/drivers/scsi/sym53c8xx_2/Makefile
@@ -1,7 +1,5 @@
# Makefile for the NCR/SYMBIOS/LSI 53C8XX PCI SCSI controllers driver.
-O_TARGET := sym53c8xx_2.o
-
sym53c8xx-objs := sym_fw.o sym_glue.o sym_hipd.o sym_malloc.o sym_misc.o sym_nvram.o
obj-$(CONFIG_SCSI_SYM53C8XX_2) := sym53c8xx.o
diff --git a/drivers/sgi/Makefile b/drivers/sgi/Makefile
index 2b42fcd453a8..f5cc50a63c37 100644
--- a/drivers/sgi/Makefile
+++ b/drivers/sgi/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the linux kernel.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-L_TARGET := sgi.a
#
# Character and Audio devices for SGI machines.
diff --git a/drivers/video/aty/Makefile b/drivers/video/aty/Makefile
index 1e0a77490852..68dfb5696d28 100644
--- a/drivers/video/aty/Makefile
+++ b/drivers/video/aty/Makefile
@@ -1,6 +1,4 @@
-O_TARGET := built-in.o
-
export-objs := atyfb_base.o mach64_accel.o
obj-$(CONFIG_FB_ATY) += atyfb.o
diff --git a/drivers/video/matrox/Makefile b/drivers/video/matrox/Makefile
index f5c32a18661e..b7891f9cb540 100644
--- a/drivers/video/matrox/Makefile
+++ b/drivers/video/matrox/Makefile
@@ -2,8 +2,6 @@
# 5 Aug 1999, James Simmons, <mailto:jsimmons@edgeglobal.com>
# Rewritten to use lists instead of if-statements.
-O_TARGET := built-in.o
-
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
diff --git a/drivers/video/riva/Makefile b/drivers/video/riva/Makefile
index 2588483afbb3..664fefd88eb4 100644
--- a/drivers/video/riva/Makefile
+++ b/drivers/video/riva/Makefile
@@ -2,8 +2,6 @@
# Makefile for the Riva framebuffer driver
#
-O_TARGET := built-in.o
-
obj-$(CONFIG_FB_RIVA) += rivafb.o
rivafb-objs := fbdev.o riva_hw.o accel.o
diff --git a/drivers/video/sis/Makefile b/drivers/video/sis/Makefile
index dcd444d47271..8987332dd1ce 100644
--- a/drivers/video/sis/Makefile
+++ b/drivers/video/sis/Makefile
@@ -2,8 +2,6 @@
# Makefile for the SiS framebuffer device driver
#
-O_TARGET := built-in.o
-
export-objs := sis_main.o
obj-$(CONFIG_FB_SIS) += sisfb.o
diff --git a/fs/Makefile b/fs/Makefile
index daf8174867ac..21488ff925de 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -23,55 +23,6 @@ obj-y += nfsctl.o
endif
endif
-subdir-$(CONFIG_PROC_FS) += proc
-subdir-y += partitions
-subdir-y += driverfs
-
-# Do not add any filesystems before this line
-subdir-$(CONFIG_EXT3_FS) += ext3 # Before ext2 so root fs can be ext3
-subdir-$(CONFIG_JBD) += jbd
-subdir-$(CONFIG_EXT2_FS) += ext2
-subdir-$(CONFIG_CRAMFS) += cramfs
-subdir-$(CONFIG_RAMFS) += ramfs
-subdir-$(CONFIG_CODA_FS) += coda
-subdir-$(CONFIG_INTERMEZZO_FS) += intermezzo
-subdir-$(CONFIG_MINIX_FS) += minix
-subdir-$(CONFIG_FAT_FS) += fat
-subdir-$(CONFIG_UMSDOS_FS) += umsdos
-subdir-$(CONFIG_MSDOS_FS) += msdos
-subdir-$(CONFIG_VFAT_FS) += vfat
-subdir-$(CONFIG_BFS_FS) += bfs
-subdir-$(CONFIG_ISO9660_FS) += isofs
-subdir-$(CONFIG_DEVFS_FS) += devfs
-subdir-$(CONFIG_HFS_FS) += hfs
-subdir-$(CONFIG_VXFS_FS) += freevxfs
-subdir-$(CONFIG_NFS_FS) += nfs
-subdir-$(CONFIG_EXPORTFS) += exportfs
-subdir-$(CONFIG_NFSD) += nfsd
-subdir-$(CONFIG_LOCKD) += lockd
-subdir-$(CONFIG_NLS) += nls
-subdir-$(CONFIG_SYSV_FS) += sysv
-subdir-$(CONFIG_SMB_FS) += smbfs
-subdir-$(CONFIG_NCP_FS) += ncpfs
-subdir-$(CONFIG_HPFS_FS) += hpfs
-subdir-$(CONFIG_NTFS_FS) += ntfs
-subdir-$(CONFIG_UFS_FS) += ufs
-subdir-$(CONFIG_EFS_FS) += efs
-subdir-$(CONFIG_JFFS_FS) += jffs
-subdir-$(CONFIG_JFFS2_FS) += jffs2
-subdir-$(CONFIG_AFFS_FS) += affs
-subdir-$(CONFIG_ROMFS_FS) += romfs
-subdir-$(CONFIG_QNX4FS_FS) += qnx4
-subdir-$(CONFIG_UDF_FS) += udf
-subdir-$(CONFIG_AUTOFS_FS) += autofs
-subdir-$(CONFIG_AUTOFS4_FS) += autofs4
-subdir-$(CONFIG_ADFS_FS) += adfs
-subdir-$(CONFIG_REISERFS_FS) += reiserfs
-subdir-$(CONFIG_DEVPTS_FS) += devpts
-subdir-$(CONFIG_SUN_OPENPROMFS) += openpromfs
-subdir-$(CONFIG_JFS_FS) += jfs
-
-
obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o
obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o
obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o
@@ -81,12 +32,56 @@ obj-y += binfmt_script.o
obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o
-obj-$(CONFIG_QUOTA) += dquot.o
-obj-$(CONFIG_QFMT_V1) += quota_v1.o
-obj-$(CONFIG_QFMT_V2) += quota_v2.o
+obj-$(CONFIG_QUOTA) += dquot.o
+obj-$(CONFIG_QFMT_V1) += quota_v1.o
+obj-$(CONFIG_QFMT_V2) += quota_v2.o
-# persistent filesystems
-obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
+obj-$(CONFIG_PROC_FS) += proc/
+obj-y += partitions/
+obj-y += driverfs/
+# Do not add any filesystems before this line
+obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3
+obj-$(CONFIG_JBD) += jbd/
+obj-$(CONFIG_EXT2_FS) += ext2/
+obj-$(CONFIG_CRAMFS) += cramfs/
+obj-$(CONFIG_RAMFS) += ramfs/
+obj-$(CONFIG_CODA_FS) += coda/
+obj-$(CONFIG_INTERMEZZO_FS) += intermezzo/
+obj-$(CONFIG_MINIX_FS) += minix/
+obj-$(CONFIG_FAT_FS) += fat/
+obj-$(CONFIG_UMSDOS_FS) += umsdos/
+obj-$(CONFIG_MSDOS_FS) += msdos/
+obj-$(CONFIG_VFAT_FS) += vfat/
+obj-$(CONFIG_BFS_FS) += bfs/
+obj-$(CONFIG_ISO9660_FS) += isofs/
+obj-$(CONFIG_DEVFS_FS) += devfs/
+obj-$(CONFIG_HFS_FS) += hfs/
+obj-$(CONFIG_VXFS_FS) += freevxfs/
+obj-$(CONFIG_NFS_FS) += nfs/
+obj-$(CONFIG_EXPORTFS) += exportfs/
+obj-$(CONFIG_NFSD) += nfsd/
+obj-$(CONFIG_LOCKD) += lockd/
+obj-$(CONFIG_NLS) += nls/
+obj-$(CONFIG_SYSV_FS) += sysv/
+obj-$(CONFIG_SMB_FS) += smbfs/
+obj-$(CONFIG_NCP_FS) += ncpfs/
+obj-$(CONFIG_HPFS_FS) += hpfs/
+obj-$(CONFIG_NTFS_FS) += ntfs/
+obj-$(CONFIG_UFS_FS) += ufs/
+obj-$(CONFIG_EFS_FS) += efs/
+obj-$(CONFIG_JFFS_FS) += jffs/
+obj-$(CONFIG_JFFS2_FS) += jffs2/
+obj-$(CONFIG_AFFS_FS) += affs/
+obj-$(CONFIG_ROMFS_FS) += romfs/
+obj-$(CONFIG_QNX4FS_FS) += qnx4/
+obj-$(CONFIG_UDF_FS) += udf/
+obj-$(CONFIG_AUTOFS_FS) += autofs/
+obj-$(CONFIG_AUTOFS4_FS) += autofs4/
+obj-$(CONFIG_ADFS_FS) += adfs/
+obj-$(CONFIG_REISERFS_FS) += reiserfs/
+obj-$(CONFIG_DEVPTS_FS) += devpts/
+obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs/
+obj-$(CONFIG_JFS_FS) += jfs/
include $(TOPDIR)/Rules.make
diff --git a/fs/adfs/Makefile b/fs/adfs/Makefile
index f1a279dde883..7b6c64d9834d 100644
--- a/fs/adfs/Makefile
+++ b/fs/adfs/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the linux adfs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := adfs.o
+obj-$(CONFIG_ADFS_FS) += adfs.o
-obj-y := dir.o dir_f.o dir_fplus.o file.o inode.o map.o super.o
-obj-m := $(O_TARGET)
+adfs-objs := dir.o dir_f.o dir_fplus.o file.o inode.o map.o super.o
include $(TOPDIR)/Rules.make
diff --git a/fs/affs/Makefile b/fs/affs/Makefile
index 5d485cdca286..960e86b39fc7 100644
--- a/fs/affs/Makefile
+++ b/fs/affs/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the Linux affs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
#EXTRA_CFLAGS=-DDEBUG=1
-O_TARGET := affs.o
+obj-$(CONFIG_AFFS_FS) += affs.o
-obj-y := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o
-obj-m := $(O_TARGET)
+affs-objs := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o
include $(TOPDIR)/Rules.make
diff --git a/fs/autofs/Makefile b/fs/autofs/Makefile
index c6df501ac2e4..59d23bd1715b 100644
--- a/fs/autofs/Makefile
+++ b/fs/autofs/Makefile
@@ -1,12 +1,9 @@
#
# Makefile for the linux autofs-filesystem routines.
#
-# We can build this either out of the kernel tree or the autofs tools tree.
-#
-O_TARGET := autofs.o
+obj-$(CONFIG_AUTOFS_FS) += autofs.o
-obj-y := dirhash.o init.o inode.o root.o symlink.o waitq.o
-obj-m := $(O_TARGET)
+autofs-objs := dirhash.o init.o inode.o root.o symlink.o waitq.o
include $(TOPDIR)/Rules.make
diff --git a/fs/autofs4/Makefile b/fs/autofs4/Makefile
index 1eb09f0bf1b1..f910955b019f 100644
--- a/fs/autofs4/Makefile
+++ b/fs/autofs4/Makefile
@@ -1,13 +1,9 @@
#
# Makefile for the linux autofs-filesystem routines.
#
-# We can build this either out of the kernel tree or the autofs tools tree.
-#
-
-O_TARGET := autofs4.o
-obj-y := init.o inode.o root.o symlink.o waitq.o expire.o
+obj-$(CONFIG_AUTOFS4_FS) += autofs4.o
-obj-m := $(O_TARGET)
+autofs4-objs := init.o inode.o root.o symlink.o waitq.o expire.o
include $(TOPDIR)/Rules.make
diff --git a/fs/bfs/Makefile b/fs/bfs/Makefile
index ff4d375dd539..c356ad8c880c 100644
--- a/fs/bfs/Makefile
+++ b/fs/bfs/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for BFS filesystem.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main Makefile...
-O_TARGET := bfs.o
+obj-$(CONFIG_BFS_FS) += bfs.o
-obj-y := inode.o file.o dir.o
-obj-m := $(O_TARGET)
+bfs-objs := inode.o file.o dir.o
include $(TOPDIR)/Rules.make
diff --git a/fs/coda/Makefile b/fs/coda/Makefile
index e169867eeaf1..7a8b82ae66a2 100644
--- a/fs/coda/Makefile
+++ b/fs/coda/Makefile
@@ -2,11 +2,10 @@
# Makefile for the Linux Coda filesystem routines.
#
-O_TARGET := coda.o
+obj-$(CONFIG_CODA_FS) += coda.o
-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)
+coda-objs := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o \
+ coda_linux.o symlink.o pioctl.o sysctl.o
# If you want debugging output, please uncomment the following line.
diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile
index 112c87bec11c..d04ae5aa2090 100644
--- a/fs/cramfs/Makefile
+++ b/fs/cramfs/Makefile
@@ -2,10 +2,8 @@
# Makefile for the linux cramfs routines.
#
-O_TARGET := cramfs.o
+obj-$(CONFIG_CRAMFS) += cramfs.o
-obj-y := inode.o uncompress.o
-
-obj-m := $(O_TARGET)
+cramfs-objs := inode.o uncompress.o
include $(TOPDIR)/Rules.make
diff --git a/fs/devfs/Makefile b/fs/devfs/Makefile
index b551ffd093b0..7b7e90fdcba0 100644
--- a/fs/devfs/Makefile
+++ b/fs/devfs/Makefile
@@ -1,17 +1,12 @@
#
# Makefile for the linux devfs-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := devfs.o
export-objs := base.o util.o
-obj-y := base.o util.o
+obj-$(CONFIG_DEVFS_FS) += devfs.o
+
+devfs-objs := base.o util.o
# Special case to support building documentation
ifndef TOPDIR
diff --git a/fs/devpts/Makefile b/fs/devpts/Makefile
index 8ab293007dc8..59aba3c15f50 100644
--- a/fs/devpts/Makefile
+++ b/fs/devpts/Makefile
@@ -2,10 +2,8 @@
# Makefile for the Linux /dev/pts virtual filesystem.
#
-O_TARGET := devpts.o
+obj-$(CONFIG_DEVPTS_FS) += devpts.o
-obj-y := root.o inode.o
-
-obj-m := $(O_TARGET)
+devpts-objs := root.o inode.o
include $(TOPDIR)/Rules.make
diff --git a/fs/driverfs/Makefile b/fs/driverfs/Makefile
index 1fd66308fb5d..43c770cee388 100644
--- a/fs/driverfs/Makefile
+++ b/fs/driverfs/Makefile
@@ -1,8 +1,9 @@
-O_TARGET := driverfs.o
+#
+# Makefile for the driverfs virtual filesystem.
+#
export-objs := inode.o
obj-y := inode.o
-obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
diff --git a/fs/efs/Makefile b/fs/efs/Makefile
index 9352c722b925..dd1f84aa028d 100644
--- a/fs/efs/Makefile
+++ b/fs/efs/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the linux efs-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := efs.o
+obj-$(CONFIG_EFS_FS) += efs.o
-obj-y := super.o inode.o namei.o dir.o file.o symlink.o
-obj-m := $(O_TARGET)
+efs-objs := super.o inode.o namei.o dir.o file.o symlink.o
include $(TOPDIR)/Rules.make
diff --git a/fs/exportfs/Makefile b/fs/exportfs/Makefile
index 268f2f73dbd0..fef5294fe271 100644
--- a/fs/exportfs/Makefile
+++ b/fs/exportfs/Makefile
@@ -1,11 +1,10 @@
#
# Makefile for the filesystem export support routines.
-O_TARGET := exportfs.o
-
export-objs := expfs.o
-obj-y := expfs.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_EXPORTFS) += exportfs.o
+
+exportfs-objs := expfs.o
include $(TOPDIR)/Rules.make
diff --git a/fs/ext2/Makefile b/fs/ext2/Makefile
index 60e07beee083..00d124b13824 100644
--- a/fs/ext2/Makefile
+++ b/fs/ext2/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for the linux ext2-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := ext2.o
+obj-$(CONFIG_EXT2_FS) += ext2.o
-obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
- ioctl.o namei.o super.o symlink.o
-obj-m := $(O_TARGET)
+ext2-objs := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
+ ioctl.o namei.o super.o symlink.o
include $(TOPDIR)/Rules.make
diff --git a/fs/ext3/Makefile b/fs/ext3/Makefile
index 68cb4861815c..0bb071043d1b 100644
--- a/fs/ext3/Makefile
+++ b/fs/ext3/Makefile
@@ -1,16 +1,10 @@
#
-# Makefile for the linux ext2-filesystem routines.
+# Makefile for the linux ext3-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := ext3.o
+obj-$(CONFIG_EXT3_FS) += ext3.o
-obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
+ext3-objs := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
ioctl.o namei.o super.o symlink.o
-obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
diff --git a/fs/fat/Makefile b/fs/fat/Makefile
index d1e503117baf..56f462bef577 100644
--- a/fs/fat/Makefile
+++ b/fs/fat/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the Linux fat filesystem support.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := fat.o
export-objs := fatfs_syms.o
-obj-y := buffer.o cache.o dir.o file.o inode.o misc.o cvf.o fatfs_syms.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_FAT_FS) += fat.o
+
+fat-objs := buffer.o cache.o dir.o file.o inode.o misc.o cvf.o fatfs_syms.o
include $(TOPDIR)/Rules.make
diff --git a/fs/freevxfs/Makefile b/fs/freevxfs/Makefile
index 593cb7be23aa..44152c8dadc0 100644
--- a/fs/freevxfs/Makefile
+++ b/fs/freevxfs/Makefile
@@ -2,10 +2,9 @@
# VxFS Makefile
#
-O_TARGET := freevxfs.o
+obj-$(CONFIG_VXFS_FS) += freevxfs.o
-obj-y := vxfs_bmap.o vxfs_fshead.o vxfs_immed.o vxfs_inode.o \
- vxfs_lookup.o vxfs_olt.o vxfs_subr.o vxfs_super.o
-obj-m := $(O_TARGET)
+freevxfs-objs := vxfs_bmap.o vxfs_fshead.o vxfs_immed.o vxfs_inode.o \
+ vxfs_lookup.o vxfs_olt.o vxfs_subr.o vxfs_super.o
include $(TOPDIR)/Rules.make
diff --git a/fs/hfs/Makefile b/fs/hfs/Makefile
index fd5a7589c6ae..2ca46b5e167f 100644
--- a/fs/hfs/Makefile
+++ b/fs/hfs/Makefile
@@ -1,19 +1,12 @@
#
# Makefile for the Linux hfs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := hfs.o
+obj-$(CONFIG_HFS_FS) += hfs.o
-obj-y := balloc.o bdelete.o bfind.o bins_del.o binsert.o bitmap.o bitops.o \
+hfs-objs := 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
-obj-m := $(O_TARGET)
-
include $(TOPDIR)/Rules.make
diff --git a/fs/hpfs/Makefile b/fs/hpfs/Makefile
index b2394dedd851..b93baaac400c 100644
--- a/fs/hpfs/Makefile
+++ b/fs/hpfs/Makefile
@@ -1,6 +1,10 @@
-O_TARGET := hpfs.o
+#
+# Makefile for the Linux hpfs filesystem routines.
+#
-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)
+obj-$(CONFIG_HPFS_FS) += hpfs.o
+
+hpfs-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
include $(TOPDIR)/Rules.make
diff --git a/fs/intermezzo/Makefile b/fs/intermezzo/Makefile
index b43dd509c9c0..73b2fee76743 100644
--- a/fs/intermezzo/Makefile
+++ b/fs/intermezzo/Makefile
@@ -2,11 +2,11 @@
# Makefile 1.00 Peter Braam <braam@clusterfs.com>
#
-O_TARGET := intermezzo.o
+obj-$(CONFIG_INTERMEZZO_FS) += intermezzo.o
-obj-y := journal_reiserfs.o cache.o journal.o presto.o vfs.o psdev.o upcall.o methods.o sysctl.o dcache.o dir.o super.o journal_ext2.o journal_ext3.o journal_xfs.o inode.o file.o journal_obdfs.o
-
-
-obj-m := $(O_TARGET)
+intermezzo-objs := journal_reiserfs.o cache.o journal.o presto.o vfs.o \
+ psdev.o upcall.o methods.o sysctl.o dcache.o dir.o \
+ super.o journal_ext2.o journal_ext3.o journal_xfs.o \
+ inode.o file.o journal_obdfs.o
include $(TOPDIR)/Rules.make
diff --git a/fs/isofs/Makefile b/fs/isofs/Makefile
index a7d774396027..e0bdecb59be3 100644
--- a/fs/isofs/Makefile
+++ b/fs/isofs/Makefile
@@ -1,18 +1,12 @@
#
# Makefile for the Linux isofs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := isofs.o
-obj-y := namei.o inode.o dir.o util.o rock.o
-obj-$(CONFIG_JOLIET) += joliet.o
-obj-$(CONFIG_ZISOFS) += compress.o
+obj-$(CONFIG_ISO9660_FS) += isofs.o
-obj-m := $(O_TARGET)
+isofs-objs-y := namei.o inode.o dir.o util.o rock.o
+isofs-objs-$(CONFIG_JOLIET) += joliet.o
+isofs-objs-$(CONFIG_ZISOFS) += compress.o
+isofs-objs := $(isofs-objs-y)
include $(TOPDIR)/Rules.make
diff --git a/fs/jbd/Makefile b/fs/jbd/Makefile
index 8f52c14c83a5..20e3f0f37036 100644
--- a/fs/jbd/Makefile
+++ b/fs/jbd/Makefile
@@ -1,15 +1,12 @@
#
-# fs/jbd/Makefile
-#
# Makefile for the linux journaling routines.
#
export-objs := journal.o
-O_TARGET := jbd.o
-obj-y := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
+obj-$(CONFIG_JBD) += jbd.o
-obj-m := $(O_TARGET)
+jbd-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
include $(TOPDIR)/Rules.make
diff --git a/fs/jffs/Makefile b/fs/jffs/Makefile
index 4ad5e8f5e400..4e7d1cb36f20 100644
--- a/fs/jffs/Makefile
+++ b/fs/jffs/Makefile
@@ -4,21 +4,11 @@
# $Id: Makefile,v 1.11 2001/09/25 20:59:41 dwmw2 Exp $
#
-obj-y := jffs_fm.o intrep.o
+obj-$(CONFIG_JFFS_FS) += jffs.o
-ifeq ($(PATCHLEVEL),2)
- obj-y += inode-v22.o
-else
- obj-y += inode-v23.o
-endif
-
-ifeq ($(CONFIG_JFFS_PROC_FS),y)
- obj-y += jffs_proc.o
-endif
-
-O_TARGET := jffs.o
-
-obj-m := $(O_TARGET)
+jffs-y := jffs_fm.o intrep.o inode-v23.o
+jffs-$(CONFIG_JFFS_PROC_FS) += jffs_proc.o
+jffs-objs := $(jffs-y)
include $(TOPDIR)/Rules.make
diff --git a/fs/jffs2/Makefile b/fs/jffs2/Makefile
index 8a6abadfdf79..0fd7f118730b 100644
--- a/fs/jffs2/Makefile
+++ b/fs/jffs2/Makefile
@@ -3,12 +3,8 @@
#
# $Id: Makefile,v 1.34 2002/03/08 11:27:59 dwmw2 Exp $
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
+obj-$(CONFIG_JFFS2_FS) += jffs2.o
COMPR_OBJS := compr.o compr_rubin.o compr_rtime.o compr_zlib.o
JFFS2_OBJS := dir.o file.o ioctl.o nodelist.o malloc.o \
@@ -20,11 +16,8 @@ LINUX_OBJS-25 := super.o
NAND_OBJS-$(CONFIG_JFFS2_FS_NAND) := wbuf.o
-O_TARGET := jffs2.o
-
-obj-y := $(COMPR_OBJS) $(JFFS2_OBJS) $(VERS_OBJS) $(NAND_OBJS-y) \
- $(LINUX_OBJS-$(VERSION)$(PATCHLEVEL))
-obj-m := $(O_TARGET)
+jffs2-objs := $(COMPR_OBJS) $(JFFS2_OBJS) $(VERS_OBJS) $(NAND_OBJS-y) \
+ $(LINUX_OBJS-$(VERSION)$(PATCHLEVEL))
include $(TOPDIR)/Rules.make
diff --git a/fs/jfs/Makefile b/fs/jfs/Makefile
index 5bcec98c97d3..8e77cdd0f611 100644
--- a/fs/jfs/Makefile
+++ b/fs/jfs/Makefile
@@ -1,19 +1,14 @@
#
# Makefile for the Linux JFS filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := jfs.o
-obj-y := super.o file.o inode.o namei.o jfs_mount.o jfs_umount.o \
+obj-$(CONFIG_JFS_FS) += jfs.o
+
+jfs-objs := super.o file.o inode.o namei.o jfs_mount.o jfs_umount.o \
jfs_xtree.o jfs_imap.o jfs_debug.o jfs_dmap.o \
jfs_unicode.o jfs_dtree.o jfs_inode.o \
jfs_extent.o symlink.o jfs_metapage.o \
jfs_logmgr.o jfs_txnmgr.o jfs_uniupr.o
-obj-m := $(O_TARGET)
EXTRA_CFLAGS += -D_JFS_4K
diff --git a/fs/lockd/Makefile b/fs/lockd/Makefile
index 98f4ae53112b..61acd02a3cfc 100644
--- a/fs/lockd/Makefile
+++ b/fs/lockd/Makefile
@@ -1,21 +1,14 @@
#
# Makefile for the linux lock manager stuff
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := lockd.o
export-objs := lockd_syms.o
-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-$(CONFIG_LOCKD) += lockd.o
-obj-m := $(O_TARGET)
+lockd-objs-y := clntlock.o clntproc.o host.o svc.o svclock.o svcshare.o \
+ svcproc.o svcsubs.o mon.o xdr.o lockd_syms.o
+lockd-objs-$(CONFIG_LOCKD_V4) += xdr4.o svc4proc.o
+lockd-objs := $(lockd-objs-y)
include $(TOPDIR)/Rules.make
diff --git a/fs/minix/Makefile b/fs/minix/Makefile
index 135056181633..36b1340b3bf4 100644
--- a/fs/minix/Makefile
+++ b/fs/minix/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the Linux minix filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := minix.o
+obj-$(CONFIG_MINIX_FS) += minix.o
-obj-y := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o
-obj-m := $(O_TARGET)
+minix-objs := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o
include $(TOPDIR)/Rules.make
diff --git a/fs/msdos/Makefile b/fs/msdos/Makefile
index a0424c507247..fb66da76f1f0 100644
--- a/fs/msdos/Makefile
+++ b/fs/msdos/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the Linux msdos filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := msdos.o
export-objs := msdosfs_syms.o
-obj-y := namei.o msdosfs_syms.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_MSDOS_FS) += msdos.o
+
+msdos-objs := namei.o msdosfs_syms.o
include $(TOPDIR)/Rules.make
diff --git a/fs/ncpfs/Makefile b/fs/ncpfs/Makefile
index f30dfb67128d..26cd285c7dfd 100644
--- a/fs/ncpfs/Makefile
+++ b/fs/ncpfs/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the linux ncp filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := ncpfs.o
+obj-$(CONFIG_NCP_FS) += ncpfs.o
-obj-y := dir.o file.o inode.o ioctl.o mmap.o ncplib_kernel.o sock.o \
+ncpfs-objs := dir.o file.o inode.o ioctl.o mmap.o ncplib_kernel.o sock.o \
symlink.o ncpsign_kernel.o
-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 0fea2467f61a..b4a0fedb924c 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -1,20 +1,13 @@
#
# Makefile for the Linux nfs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := nfs.o
-
-obj-y := dir.o file.o flushd.o inode.o nfs2xdr.o pagelist.o proc.o \
- read.o symlink.o unlink.o write.o
-obj-$(CONFIG_ROOT_NFS) += nfsroot.o mount_clnt.o
-obj-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o
+obj-$(CONFIG_NFS_FS) += nfs.o
-obj-m := $(O_TARGET)
+nfs-y := dir.o file.o flushd.o inode.o nfs2xdr.o pagelist.o \
+ proc.o read.o symlink.o unlink.o write.o
+nfs-$(CONFIG_ROOT_NFS) += nfsroot.o mount_clnt.o
+nfs-$(CONFIG_NFS_V3) += nfs3proc.o nfs3xdr.o
+nfs-objs := $(nfs-y)
include $(TOPDIR)/Rules.make
diff --git a/fs/nfsd/Makefile b/fs/nfsd/Makefile
index 17775d0fbf16..c7ddb3601d2e 100644
--- a/fs/nfsd/Makefile
+++ b/fs/nfsd/Makefile
@@ -1,20 +1,12 @@
#
-# Makefile for the Linux nfs filesystem routines.
+# Makefile for the Linux nfs server
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := nfsd.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
-obj-$(CONFIG_NFSD_V3) += nfs3proc.o nfs3xdr.o
+obj-$(CONFIG_NFSD) += nfsd.o
-obj-m := $(O_TARGET)
+nfsd-y := nfssvc.o nfsctl.o nfsproc.o nfsfh.o vfs.o \
+ export.o auth.o lockd.o nfscache.o nfsxdr.o stats.o
+nfsd-$(CONFIG_NFSD_V3) += nfs3proc.o nfs3xdr.o
+nfsd-objs := $(nfsd-y)
include $(TOPDIR)/Rules.make
diff --git a/fs/nls/Makefile b/fs/nls/Makefile
index b1ee35220b8e..10d12d16f062 100644
--- a/fs/nls/Makefile
+++ b/fs/nls/Makefile
@@ -2,13 +2,9 @@
# Makefile for native language support
#
-O_TARGET = nls.o
export-objs := nls_base.o
-obj-y := nls_base.o
-obj-m :=
-obj-n :=
-obj- :=
+obj-$(CONFIG_NLS) += nls_base.o
obj-$(CONFIG_NLS_CODEPAGE_437) += nls_cp437.o
obj-$(CONFIG_NLS_CODEPAGE_737) += nls_cp737.o
@@ -30,14 +26,8 @@ obj-$(CONFIG_NLS_CODEPAGE_932) += nls_cp932.o nls_sjis.o nls_euc-jp.o
obj-$(CONFIG_NLS_CODEPAGE_936) += nls_cp936.o nls_gb2312.o
obj-$(CONFIG_NLS_CODEPAGE_949) += nls_cp949.o nls_euc-kr.o
obj-$(CONFIG_NLS_CODEPAGE_950) += nls_cp950.o nls_big5.o
-obj-$(CONFIG_NLS_CODEPAGE_1250) += nls_cp1250.o
obj-$(CONFIG_NLS_CODEPAGE_1251) += nls_cp1251.o
-obj-$(CONFIG_NLS_CODEPAGE_1252) += nls_cp1252.o
-obj-$(CONFIG_NLS_CODEPAGE_1253) += nls_cp1253.o
-obj-$(CONFIG_NLS_CODEPAGE_1254) += nls_cp1254.o
-obj-$(CONFIG_NLS_CODEPAGE_1256) += nls_cp1256.o
-obj-$(CONFIG_NLS_CODEPAGE_1257) += nls_cp1257.o
-obj-$(CONFIG_NLS_CODEPAGE_1258) += nls_cp1258.o
+obj-$(CONFIG_NLS_CODEPAGE_1255) += nls_cp1255.o
obj-$(CONFIG_NLS_ISO8859_1) += nls_iso8859-1.o
obj-$(CONFIG_NLS_ISO8859_2) += nls_iso8859-2.o
obj-$(CONFIG_NLS_ISO8859_3) += nls_iso8859-3.o
diff --git a/fs/ntfs/Makefile b/fs/ntfs/Makefile
index 94feb47d3c3c..0b5c00293344 100644
--- a/fs/ntfs/Makefile
+++ b/fs/ntfs/Makefile
@@ -1,11 +1,9 @@
# Rules for making the NTFS driver.
-O_TARGET := ntfs.o
+obj-$(CONFIG_NTFS_FS) += ntfs.o
-obj-y := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \
- mst.o namei.o super.o sysctl.o time.o unistr.o upcase.o
-
-obj-m := $(O_TARGET)
+ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \
+ mst.o namei.o super.o sysctl.o time.o unistr.o upcase.o
EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.7\"
diff --git a/fs/openpromfs/Makefile b/fs/openpromfs/Makefile
index f9d8cd339c3a..e57eb12af655 100644
--- a/fs/openpromfs/Makefile
+++ b/fs/openpromfs/Makefile
@@ -1,15 +1,9 @@
#
-# Makefile for the Linux minix filesystem routines.
+# Makefile for the Linux Sun Openprom filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := openpromfs.o
+obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs.o
-obj-y := inode.o
-obj-m := $(O_TARGET)
+openpromfs-objs := inode.o
include $(TOPDIR)/Rules.make
diff --git a/fs/partitions/Makefile b/fs/partitions/Makefile
index b000fada1b0f..ac92b2b6d3a3 100644
--- a/fs/partitions/Makefile
+++ b/fs/partitions/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the linux kernel.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := partitions.o
export-objs := check.o ibm.o msdos.o
diff --git a/fs/proc/Makefile b/fs/proc/Makefile
index 95160610eba0..26b8bfaadf36 100644
--- a/fs/proc/Makefile
+++ b/fs/proc/Makefile
@@ -1,21 +1,16 @@
#
# Makefile for the Linux proc filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-
-O_TARGET := proc.o
export-objs := root.o
-obj-y := inode.o root.o base.o generic.o array.o \
+obj-$(CONFIG_PROC_FS) += proc.o
+
+proc-objs := inode.o root.o base.o generic.o array.o \
kmsg.o proc_tty.o proc_misc.o kcore.o
ifeq ($(CONFIG_PROC_DEVICETREE),y)
-obj-y += proc_devtree.o
+proc-objs += proc_devtree.o
endif
include $(TOPDIR)/Rules.make
diff --git a/fs/qnx4/Makefile b/fs/qnx4/Makefile
index a3a3c5a7da14..14dd84080f0f 100644
--- a/fs/qnx4/Makefile
+++ b/fs/qnx4/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the linux qnx4-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := qnx4.o
+obj-$(CONFIG_QNX4FS_FS) += qnx4.o
-obj-y := inode.o dir.o namei.o file.o bitmap.o truncate.o fsync.o
-obj-m := $(O_TARGET)
+qnx4-objs := inode.o dir.o namei.o file.o bitmap.o truncate.o fsync.o
include $(TOPDIR)/Rules.make
diff --git a/fs/ramfs/Makefile b/fs/ramfs/Makefile
index 44ff24f061fc..29c2c672a3fe 100644
--- a/fs/ramfs/Makefile
+++ b/fs/ramfs/Makefile
@@ -2,9 +2,8 @@
# Makefile for the linux ramfs routines.
#
-O_TARGET := ramfs.o
+obj-$(CONFIG_RAMFS) += ramfs.o
-obj-y := inode.o
-obj-m := $(O_TARGET)
+ramfs-objs := inode.o
include $(TOPDIR)/Rules.make
diff --git a/fs/reiserfs/Makefile b/fs/reiserfs/Makefile
index 1ea70777f5c2..a4b9697d680b 100644
--- a/fs/reiserfs/Makefile
+++ b/fs/reiserfs/Makefile
@@ -1,17 +1,13 @@
#
# Makefile for the linux reiser-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := reiserfs.o
-obj-y := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o super.o prints.o objectid.o \
-lbalance.o ibalance.o stree.o hashes.o buffer2.o tail_conversion.o journal.o resize.o item_ops.o ioctl.o procfs.o
+obj-$(CONFIG_REISERFS_FS) += reiserfs.o
-obj-m := $(O_TARGET)
+reiserfs-objs := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o \
+ super.o prints.o objectid.o lbalance.o ibalance.o stree.o \
+ hashes.o buffer2.o tail_conversion.o journal.o resize.o \
+ item_ops.o ioctl.o procfs.o
# gcc -O2 (the kernel default) is overaggressive on ppc32 when many inline
# functions are used. This causes the compiler to advance the stack
diff --git a/fs/romfs/Makefile b/fs/romfs/Makefile
index 65a88e40b587..03047c6b831c 100644
--- a/fs/romfs/Makefile
+++ b/fs/romfs/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the linux romfs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := romfs.o
+obj-$(CONFIG_ROMFS_FS) += romfs.o
-obj-y := inode.o
-obj-m := $(O_TARGET)
+romfs-objs := inode.o
include $(TOPDIR)/Rules.make
diff --git a/fs/smbfs/Makefile b/fs/smbfs/Makefile
index 93ddc0df84f2..c66422c8640c 100644
--- a/fs/smbfs/Makefile
+++ b/fs/smbfs/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for the linux smb-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-O_TARGET := smbfs.o
+obj-$(CONFIG_SMB_FS) += smbfs.o
-obj-y := proc.o dir.o cache.o sock.o inode.o file.o ioctl.o getopt.o
-obj-m := $(O_TARGET)
+smbfs-objs := proc.o dir.o cache.o sock.o inode.o file.o ioctl.o getopt.o
# 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 4c574eda0242..86f5ac05dc18 100644
--- a/fs/sysv/Makefile
+++ b/fs/sysv/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for the Linux SystemV/Coherent filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := sysv.o
+obj-$(CONFIG_SYSV_FS) += sysv.o
-obj-y := ialloc.o balloc.o inode.o itree.o file.o dir.o \
- namei.o super.o symlink.o
-obj-m := $(O_TARGET)
+sysv-objs := ialloc.o balloc.o inode.o itree.o file.o dir.o \
+ namei.o super.o symlink.o
include $(TOPDIR)/Rules.make
diff --git a/fs/udf/Makefile b/fs/udf/Makefile
index e44aed01ad9f..3dd7aad93c9e 100644
--- a/fs/udf/Makefile
+++ b/fs/udf/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the linux udf-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .o file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile..
-O_TARGET := udf.o
+obj-$(CONFIG_UDF_FS) += udf.o
-obj-y := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \
+udf-objs := 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
-obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
diff --git a/fs/ufs/Makefile b/fs/ufs/Makefile
index 4e74b2459bac..dcd77fe93963 100644
--- a/fs/ufs/Makefile
+++ b/fs/ufs/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for the Linux ufs filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-O_TARGET := ufs.o
+obj-$(CONFIG_UFS_FS) += ufs.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
-obj-m := $(O_TARGET)
+ufs-objs := balloc.o cylinder.o dir.o file.o ialloc.o inode.o \
+ namei.o super.o symlink.o truncate.o util.o
include $(TOPDIR)/Rules.make
diff --git a/fs/umsdos/Makefile b/fs/umsdos/Makefile
index a894146ba59b..c8a6b9f443cf 100644
--- a/fs/umsdos/Makefile
+++ b/fs/umsdos/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for the umsdos Unix-like filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (not a .c file).
-#
-# Note 2: the CFLAGS definitions are now in the main makefile.
-O_TARGET := umsdos.o
-obj-y := dir.o inode.o ioctl.o mangle.o namei.o rdir.o emd.o
+obj-$(CONFIG_UMSDOS) += umsdos.o
-obj-m := $(O_TARGET)
+umsdos-objs := dir.o inode.o ioctl.o mangle.o namei.o rdir.o emd.o
include $(TOPDIR)/Rules.make
diff --git a/fs/vfat/Makefile b/fs/vfat/Makefile
index 55e0ea9151d6..76a43a345ebf 100644
--- a/fs/vfat/Makefile
+++ b/fs/vfat/Makefile
@@ -1,17 +1,11 @@
#
# Makefile for the linux vfat-filesystem routines.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET := vfat.o
export-objs := vfatfs_syms.o
-obj-y := namei.o vfatfs_syms.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_VFAT_FS) += vfat.o
+
+vfat-objs := namei.o vfatfs_syms.o
include $(TOPDIR)/Rules.make
diff --git a/lib/Makefile b/lib/Makefile
index bc7df822e1cc..f16f1093e487 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -23,11 +23,8 @@ endif
obj-$(CONFIG_CRC32) += crc32.o
-subdir-$(CONFIG_ZLIB_INFLATE) += zlib_inflate
-subdir-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate
-
-# Include the subdirs, if necessary.
-obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
+obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate/
+obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate/
include $(TOPDIR)/drivers/net/Makefile.lib
include $(TOPDIR)/drivers/usb/class/Makefile.lib
diff --git a/lib/zlib_deflate/Makefile b/lib/zlib_deflate/Makefile
index cd4ae5531da2..abcdeec762a5 100644
--- a/lib/zlib_deflate/Makefile
+++ b/lib/zlib_deflate/Makefile
@@ -6,13 +6,10 @@
# decompression code.
#
-O_TARGET := zlib_deflate.o
-
export-objs := deflate_syms.o
-obj-y := deflate.o deftree.o deflate_syms.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate.o
-EXTRA_CFLAGS += -I $(TOPDIR)/lib/zlib_deflate
+zlib_deflate-objs := deflate.o deftree.o deflate_syms.o
include $(TOPDIR)/Rules.make
diff --git a/lib/zlib_inflate/Makefile b/lib/zlib_inflate/Makefile
index 40e195c8ed0f..6316d0e9a9bd 100644
--- a/lib/zlib_inflate/Makefile
+++ b/lib/zlib_inflate/Makefile
@@ -13,14 +13,11 @@
# uncompression can be done without blocking on allocation).
#
-O_TARGET := zlib_inflate.o
-
export-objs := inflate_syms.o
-obj-y := infblock.o infcodes.o inffast.o inflate.o \
- inftrees.o infutil.o inflate_syms.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_ZLIB_INFLATE) += zlib_inflate.o
-EXTRA_CFLAGS += -I $(TOPDIR)/lib/zlib_inflate
+zlib_inflate-objs := infblock.o infcodes.o inffast.o inflate.o \
+ inftrees.o infutil.o inflate_syms.o
include $(TOPDIR)/Rules.make
diff --git a/net/802/Makefile b/net/802/Makefile
index b3d4d23e0542..5d2bf6c7af48 100644
--- a/net/802/Makefile
+++ b/net/802/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the Linux 802.x protocol layers.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := 802.o
export-objs = llc_macinit.o p8022.o psnap.o
diff --git a/net/8021q/Makefile b/net/8021q/Makefile
index e7ab840c41bc..28f30a326fb2 100644
--- a/net/8021q/Makefile
+++ b/net/8021q/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the Linux VLAN layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := 8021q.o
+obj-$(CONFIG_VLAN_8021Q) += 8021q.o
-obj-y := vlan.o vlanproc.o vlan_dev.o
-obj-m := $(O_TARGET)
+8021q-objs := vlan.o vlanproc.o vlan_dev.o
include $(TOPDIR)/Rules.make
diff --git a/net/Makefile b/net/Makefile
index 480f369b02b5..f8ed1ac9386d 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -7,47 +7,43 @@
O_TARGET := network.o
-mod-subdirs := ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched
+mod-subdirs := ipv4 ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched
export-objs := netsyms.o
-subdir-y := core ethernet
-subdir-m := ipv4 # hum?
+obj-y := socket.o core/
-
-subdir-$(CONFIG_NET) += 802 sched netlink
-subdir-$(CONFIG_INET) += ipv4
-subdir-$(CONFIG_NETFILTER) += ipv4/netfilter
-subdir-$(CONFIG_UNIX) += unix
-subdir-$(CONFIG_IPV6) += ipv6
+obj-$(CONFIG_NET) += ethernet/ 802/ sched/ netlink/
+obj-$(CONFIG_INET) += ipv4/
+obj-$(CONFIG_NETFILTER) += ipv4/netfilter/
+obj-$(CONFIG_UNIX) += unix/
+obj-$(CONFIG_IPV6) += ipv6/
ifneq ($(CONFIG_IPV6),n)
ifneq ($(CONFIG_IPV6),)
-subdir-$(CONFIG_NETFILTER) += ipv6/netfilter
+obj-$(CONFIG_NETFILTER) += ipv6/netfilter/
endif
endif
-subdir-$(CONFIG_KHTTPD) += khttpd
-subdir-$(CONFIG_PACKET) += packet
-subdir-$(CONFIG_NET_SCHED) += sched
-subdir-$(CONFIG_BRIDGE) += bridge
-subdir-$(CONFIG_IPX) += ipx
-subdir-$(CONFIG_ATALK) += appletalk
-subdir-$(CONFIG_WAN_ROUTER) += wanrouter
-subdir-$(CONFIG_X25) += x25
-subdir-$(CONFIG_LAPB) += lapb
-subdir-$(CONFIG_NETROM) += netrom
-subdir-$(CONFIG_ROSE) += rose
-subdir-$(CONFIG_AX25) += ax25
-subdir-$(CONFIG_IRDA) += irda
-subdir-$(CONFIG_BLUEZ) += bluetooth
-subdir-$(CONFIG_SUNRPC) += sunrpc
-subdir-$(CONFIG_ATM) += atm
-subdir-$(CONFIG_DECNET) += decnet
-subdir-$(CONFIG_ECONET) += econet
-subdir-$(CONFIG_VLAN_8021Q) += 8021q
-
-
-obj-y := socket.o $(join $(subdir-y), $(patsubst %,/%.o,$(notdir $(subdir-y))))
+obj-$(CONFIG_KHTTPD) += khttpd/
+obj-$(CONFIG_PACKET) += packet/
+obj-$(CONFIG_NET_SCHED) += sched/
+obj-$(CONFIG_BRIDGE) += bridge/
+obj-$(CONFIG_IPX) += ipx/
+obj-$(CONFIG_ATALK) += appletalk/
+obj-$(CONFIG_WAN_ROUTER) += wanrouter/
+obj-$(CONFIG_X25) += x25/
+obj-$(CONFIG_LAPB) += lapb/
+obj-$(CONFIG_NETROM) += netrom/
+obj-$(CONFIG_ROSE) += rose/
+obj-$(CONFIG_AX25) += ax25/
+obj-$(CONFIG_IRDA) += irda/
+obj-$(CONFIG_BLUEZ) += bluetooth/
+obj-$(CONFIG_SUNRPC) += sunrpc/
+obj-$(CONFIG_ATM) += atm/
+obj-$(CONFIG_DECNET) += decnet/
+obj-$(CONFIG_ECONET) += econet/
+obj-$(CONFIG_VLAN_8021Q) += 8021q/
+
ifeq ($(CONFIG_NET),y)
obj-$(CONFIG_MODULES) += netsyms.o
obj-$(CONFIG_SYSCTL) += sysctl_net.o
diff --git a/net/appletalk/Makefile b/net/appletalk/Makefile
index e8e2c8f8a9c8..14c4e7c55e0a 100644
--- a/net/appletalk/Makefile
+++ b/net/appletalk/Makefile
@@ -1,20 +1,14 @@
#
# Makefile for the Linux AppleTalk layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := appletalk.o
export-objs = ddp.o
-obj-y := aarp.o ddp.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_ATALK) += appletalk.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_atalk.o
+appletalk-y := aarp.o ddp.o
+appletalk-$(CONFIG_SYSCTL) += sysctl_net_atalk.o
+appletalk-objs := $(appletalk-y)
include $(TOPDIR)/Rules.make
diff --git a/net/atm/Makefile b/net/atm/Makefile
index 3c2b16ab1f73..deb54b07d20a 100644
--- a/net/atm/Makefile
+++ b/net/atm/Makefile
@@ -2,28 +2,15 @@
# Makefile for the ATM Protocol Families.
#
-O_TARGET := atm.o
-
export-objs := common.o atm_misc.o raw.o resources.o ipcommon.o proc.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)
-obj-y += clip.o
-NEED_IPCOM = ipcommon.o
-endif
-
-ifeq ($(CONFIG_NET_SCH_ATM),y)
-NEED_IPCOM = ipcommon.o
-endif
-
-obj-y += $(NEED_IPCOM)
-
-ifeq ($(CONFIG_PROC_FS),y)
-obj-y += proc.o
-endif
+obj-$(CONFIG_ATM_CLIP) += clip.o ipcommon.o
+obj-$(CONFIG_NET_SCH_ATM) += ipcommon.o
+obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_ATM_LANE) += lec.o
obj-$(CONFIG_ATM_MPOA) += mpoa.o
diff --git a/net/ax25/Makefile b/net/ax25/Makefile
index 5974031f411f..8233831615c0 100644
--- a/net/ax25/Makefile
+++ b/net/ax25/Makefile
@@ -1,25 +1,17 @@
#
# Makefile for the Linux AX.25 layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-
-O_TARGET := 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 \
+obj-$(CONFIG_AX25) += ax25.o
+
+ax25-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
-
-obj-m := $(O_TARGET)
-
-obj-$(CONFIG_AX25_DAMA_SLAVE) += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_ax25.o
+ax25-$(CONFIG_AX25_DAMA_SLAVE) += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o
+ax25-$(CONFIG_SYSCTL) += sysctl_net_ax25.o
+ax25-objs := $(ax25-y)
include $(TOPDIR)/Rules.make
diff --git a/net/bluetooth/Makefile b/net/bluetooth/Makefile
index de1b573e7122..f9ac817735eb 100644
--- a/net/bluetooth/Makefile
+++ b/net/bluetooth/Makefile
@@ -1,17 +1,13 @@
#
# Makefile for the Bluetooth subsystem
#
-O_TARGET := bluetooth.o
-list-multi := bluez.o
export-objs := syms.o
-bluez-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o lib.o syms.o
obj-$(CONFIG_BLUEZ) += bluez.o
obj-$(CONFIG_BLUEZ_L2CAP) += l2cap.o
obj-$(CONFIG_BLUEZ_SCO) += sco.o
-include $(TOPDIR)/Rules.make
+bluez-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o lib.o syms.o
-bluez.o: $(bluez-objs)
- $(LD) -r -o $@ $(bluez-objs)
+include $(TOPDIR)/Rules.make
diff --git a/net/bridge/Makefile b/net/bridge/Makefile
index 4c2c72812499..d609d9f4da99 100644
--- a/net/bridge/Makefile
+++ b/net/bridge/Makefile
@@ -1,16 +1,11 @@
#
# Makefile for the IEEE 802.1d ethernet bridging layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := bridge.o
-obj-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
+obj-$(CONFIG_BRIDGE) += bridge.o
+
+bridge-objs := 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
-obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
diff --git a/net/core/Makefile b/net/core/Makefile
index 5dacce00c212..1a5533d2535e 100644
--- a/net/core/Makefile
+++ b/net/core/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the Linux networking core.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := core.o
export-objs := netfilter.o profile.o
diff --git a/net/decnet/Makefile b/net/decnet/Makefile
index 11f7c8b08955..74a8bae054e7 100644
--- a/net/decnet/Makefile
+++ b/net/decnet/Makefile
@@ -1,13 +1,11 @@
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := decnet.o
-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)
+obj-$(CONFIG_DECNET) += decnet.o
-obj-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o
-obj-$(CONFIG_DECNET_FW) += dn_fw.o
-
-obj-y += sysctl_net_decnet.o
+decnet-y := af_decnet.o dn_nsp_in.o dn_nsp_out.o dn_route.o dn_dev.o dn_neigh.o dn_timer.o
+decnet-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o
+decnet-$(CONFIG_DECNET_FW) += dn_fw.o
+decnet-y += sysctl_net_decnet.o
+decnet-objs := $(decnet-y)
include $(TOPDIR)/Rules.make
diff --git a/net/econet/Makefile b/net/econet/Makefile
index 3c048838618d..02e34fa26c2d 100644
--- a/net/econet/Makefile
+++ b/net/econet/Makefile
@@ -1,16 +1,10 @@
#
# Makefile for Econet support code.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := econet.o
+obj-$(CONFIG_ECONET) += econet.o
-obj-y := af_econet.o
-obj-m := $(O_TARGET)
+econet-objs := af_econet.o
include $(TOPDIR)/Rules.make
diff --git a/net/ethernet/Makefile b/net/ethernet/Makefile
index baa653bac869..671e701d674c 100644
--- a/net/ethernet/Makefile
+++ b/net/ethernet/Makefile
@@ -1,28 +1,10 @@
#
# Makefile for the Linux Ethernet layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := ethernet.o
-
-OBJS := eth.o
-
-ifeq ($(CONFIG_SYSCTL),y)
-OBJS += sysctl_net_ether.o
-endif
-
-ifdef CONFIG_IPX
-OBJ2 := pe2.o
-endif
-
-ifdef CONFIG_ATALK
-OBJ2 := pe2.o
-endif
-obj-$(CONFIG_NET) := $(OBJS) $(OBJ2)
+obj-y += eth.o
+obj-$(CONFIG_SYSCTL) += sysctl_net_ether.o
+obj-$(subst m,y,$(CONFIG_IPX)) += pe2.o
+obj-$(subst m,y,$(CONFIG_ATALK)) += pe2.o
include $(TOPDIR)/Rules.make
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index 90559f668a07..ef461d7e42f4 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the Linux TCP/IP (INET) layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := ipv4.o
export-objs = ipip.o ip_gre.o
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index 5c72051c5e6e..9904b06b6fa1 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -2,9 +2,9 @@
# Makefile for the netfilter modules on top of IPv4.
#
-O_TARGET := netfilter.o
-
-export-objs = ip_conntrack_standalone.o ip_fw_compat.o ip_nat_standalone.o ip_tables.o arp_tables.o
+export-objs := ip_conntrack_standalone.o ip_fw_compat.o ip_nat_standalone.o \
+ ip_tables.o arp_tables.o ip_conntrack_ftp.o \
+ ip_conntrack_irc.o
# objects for the conntrack and NAT core (used by standalone and backw. compat)
ip_nf_conntrack-objs := ip_conntrack_core.o ip_conntrack_proto_generic.o ip_conntrack_proto_tcp.o ip_conntrack_proto_udp.o ip_conntrack_proto_icmp.o
@@ -25,14 +25,7 @@ obj-$(CONFIG_IP_NF_CONNTRACK) += ip_conntrack.o
# connection tracking helpers
obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o
-ifdef CONFIG_IP_NF_NAT_FTP
- export-objs += ip_conntrack_ftp.o
-endif
-
obj-$(CONFIG_IP_NF_IRC) += ip_conntrack_irc.o
-ifdef CONFIG_IP_NF_NAT_IRC
- export-objs += ip_conntrack_irc.o
-endif
# NAT helpers
obj-$(CONFIG_IP_NF_NAT_FTP) += ip_nat_ftp.o
diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile
index 796b227aecb3..1b22ae22e92a 100644
--- a/net/ipv6/Makefile
+++ b/net/ipv6/Makefile
@@ -1,24 +1,17 @@
#
# Makefile for the Linux TCP/IP (INET6) layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-
-
-O_TARGET := ipv6.o
export-objs := ipv6_syms.o
-obj-y := af_inet6.o ip6_output.o ip6_input.o addrconf.o sit.o \
+obj-$(CONFIG_IPV6) += ipv6.o
+
+ipv6-objs := 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 ipv6_syms.o
-obj-m := $(O_TARGET)
-
#obj-$(CONFIG_IPV6_FIREWALL) += ip6_fw.o
include $(TOPDIR)/Rules.make
diff --git a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile
index 080b8068fed6..98710da9a8f6 100644
--- a/net/ipv6/netfilter/Makefile
+++ b/net/ipv6/netfilter/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the netfilter modules on top of IPv6.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := netfilter.o
export-objs := ip6_tables.o
diff --git a/net/ipx/Makefile b/net/ipx/Makefile
index b9a368b7ad34..51f0caa95705 100644
--- a/net/ipx/Makefile
+++ b/net/ipx/Makefile
@@ -1,25 +1,14 @@
#
# Makefile for the Linux IPX layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-# We only get in/to here if CONFIG_IPX = 'y' or 'm'
-
-O_TARGET := ipx.o
export-objs = af_ipx.o af_spx.o
-obj-y := af_ipx.o
-
-ifeq ($(CONFIG_IPX),m)
- obj-m += $(O_TARGET)
-endif
+obj-$(CONFIG_IPX) += ipx.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_ipx.o
-obj-$(CONFIG_SPX) += af_spx.o
+ipx-y := af_ipx.o
+ipx-$(CONFIG_SYSCTL) += sysctl_net_ipx.o
+ipx-$(CONFIG_SPX) += af_spx.o
+ipx-objs := $(ipx-y)
include $(TOPDIR)/Rules.make
diff --git a/net/irda/Makefile b/net/irda/Makefile
index 201a9fad52b8..380ae32c8eab 100644
--- a/net/irda/Makefile
+++ b/net/irda/Makefile
@@ -1,42 +1,20 @@
#
# Makefile for the Linux IrDA protocol layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := irda.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 irsyms.o
-
-ifeq ($(CONFIG_IRDA),m)
-obj-m := $(O_TARGET)
-endif
-
-obj-$(CONFIG_PROC_FS) += irproc.o
-obj-$(CONFIG_SYSCTL) += irsysctl.o
-
-subdir-$(CONFIG_IRLAN) += irlan
-subdir-$(CONFIG_IRNET) += irnet
-subdir-$(CONFIG_IRCOMM) += ircomm
-
-ifeq ($(CONFIG_IRLAN),y)
-obj-y += irlan/irlan.o
-endif
-
-ifeq ($(CONFIG_IRNET),y)
-obj-y += irnet/irnet.o
-endif
-
-ifeq ($(CONFIG_IRCOMM),y)
-obj-y += ircomm/ircomm_and_tty.o
-endif
+obj-$(CONFIG_IRDA) += irda.o
+obj-$(CONFIG_IRLAN) += irlan/
+obj-$(CONFIG_IRNET) += irnet/
+obj-$(CONFIG_IRCOMM) += ircomm/
+
+irda-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 irsyms.o
+irda-$(CONFIG_PROC_FS) += irproc.o
+irda-$(CONFIG_SYSCTL) += irsysctl.o
+irda-objs := $(irda-y)
include $(TOPDIR)/Rules.make
diff --git a/net/irda/ircomm/Makefile b/net/irda/ircomm/Makefile
index 401e30bc8a1b..ac4e23837039 100644
--- a/net/irda/ircomm/Makefile
+++ b/net/irda/ircomm/Makefile
@@ -2,14 +2,12 @@
# Makefile for the Linux IrDA IrCOMM protocol layer.
#
-O_TARGET := ircomm_and_tty.o
-
export-objs := ircomm_core.o
+obj-$(CONFIG_IRCOMM) += 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
-obj-$(CONFIG_IRCOMM) += ircomm.o ircomm-tty.o
-
include $(TOPDIR)/Rules.make
diff --git a/net/irda/irlan/Makefile b/net/irda/irlan/Makefile
index 7ab6b6d37ef6..068426f8a0f9 100644
--- a/net/irda/irlan/Makefile
+++ b/net/irda/irlan/Makefile
@@ -1,15 +1,9 @@
#
# Makefile for the Linux IrDA IrLAN protocol layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := irlan.o
+obj-$(CONFIG_IRLAN) += irlan.o
-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)
+irlan-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
include $(TOPDIR)/Rules.make
diff --git a/net/irda/irnet/Makefile b/net/irda/irnet/Makefile
index ea4c3d3a4275..03784f94ec43 100644
--- a/net/irda/irnet/Makefile
+++ b/net/irda/irnet/Makefile
@@ -1,16 +1,9 @@
#
# Makefile for the Linux IrDA IrNET protocol layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-MOD_LIST_NAME := IRDA_MODULES
-O_TARGET := irnet.o
+obj-$(CONFIG_IRNET) += irnet.o
-obj-y := irnet_ppp.o irnet_irda.o
-obj-m := $(O_TARGET)
+irnet-objs := irnet_ppp.o irnet_irda.o
include $(TOPDIR)/Rules.make
diff --git a/net/khttpd/Makefile b/net/khttpd/Makefile
index a7b2e022178b..8f4c268d6792 100644
--- a/net/khttpd/Makefile
+++ b/net/khttpd/Makefile
@@ -1,18 +1,12 @@
#
# Makefile for kHTTPd
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := khttpd.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
+obj-$(CONFIG_KHTTPD) += khttpd.o
+khttpd-objs := 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
diff --git a/net/lapb/Makefile b/net/lapb/Makefile
index 85b699195804..2c61b30d3f15 100644
--- a/net/lapb/Makefile
+++ b/net/lapb/Makefile
@@ -1,19 +1,12 @@
#
# Makefile for the Linux LAPB layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-
-O_TARGET := lapb.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)
+obj-$(CONFIG_LAPB) += lapb.o
+
+lapb-objs := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o lapb_iface.o
include $(TOPDIR)/Rules.make
diff --git a/net/netlink/Makefile b/net/netlink/Makefile
index 15edc53014c6..b5ca85cce881 100644
--- a/net/netlink/Makefile
+++ b/net/netlink/Makefile
@@ -1,20 +1,10 @@
#
# Makefile for the netlink driver.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := netlink.o
export-objs := af_netlink.o
-obj-y := af_netlink.o
-
-obj-m :=
-
-obj-$(CONFIG_NETLINK_DEV) += netlink_dev.o
+obj-y := af_netlink.o
+obj-$(CONFIG_NETLINK_DEV) += netlink_dev.o
include $(TOPDIR)/Rules.make
diff --git a/net/netrom/Makefile b/net/netrom/Makefile
index cf3a8a4b2138..1992013851b5 100644
--- a/net/netrom/Makefile
+++ b/net/netrom/Makefile
@@ -1,19 +1,13 @@
#
# Makefile for the Linux NET/ROM layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := netrom.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
-obj-m := $(O_TARGET)
+obj-$(CONFIG_NETROM) += netrom.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_netrom.o
+netrom-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
+netrom-$(CONFIG_SYSCTL) += sysctl_net_netrom.o
+netrom-objs := $(netrom-y)
include $(TOPDIR)/Rules.make
diff --git a/net/packet/Makefile b/net/packet/Makefile
index f17e887c1597..fb2f69579cf4 100644
--- a/net/packet/Makefile
+++ b/net/packet/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the packet AF.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := packet.o
obj-$(CONFIG_PACKET) += af_packet.o
diff --git a/net/rose/Makefile b/net/rose/Makefile
index 08da73aed76b..cc9688cd6f39 100644
--- a/net/rose/Makefile
+++ b/net/rose/Makefile
@@ -1,19 +1,13 @@
#
# Makefile for the Linux Rose (X.25 PLP) layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := rose.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
-obj-m := $(O_TARGET)
+obj-$(CONFIG_ROSE) += rose.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_rose.o
+rose-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
+rose-$(CONFIG_SYSCTL) += sysctl_net_rose.o
+rose-objs := $(rose-y)
include $(TOPDIR)/Rules.make
diff --git a/net/sched/Makefile b/net/sched/Makefile
index 164a97fe7f21..f08a298192ad 100644
--- a/net/sched/Makefile
+++ b/net/sched/Makefile
@@ -2,11 +2,8 @@
# Makefile for the Linux Traffic Control Unit.
#
-O_TARGET := sched.o
-
obj-y := sch_generic.o
-
obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o
obj-$(CONFIG_NET_ESTIMATOR) += estimator.o
obj-$(CONFIG_NET_CLS) += cls_api.o
diff --git a/net/sunrpc/Makefile b/net/sunrpc/Makefile
index 19e7e4d4f135..2f31a59d427c 100644
--- a/net/sunrpc/Makefile
+++ b/net/sunrpc/Makefile
@@ -1,24 +1,17 @@
#
# Makefile for Linux kernel SUN RPC
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-O_TARGET := sunrpc.o
+obj-$(CONFIG_SUNRPC) += sunrpc.o
export-objs := sunrpc_syms.o
-obj-y := clnt.o xprt.o sched.o \
+sunrpc-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 sunrpc_syms.o
-
-obj-$(CONFIG_PROC_FS) += stats.o
-obj-$(CONFIG_SYSCTL) += sysctl.o
-
-obj-m := $(O_TARGET)
+sunrpc-$(CONFIG_PROC_FS) += stats.o
+sunrpc-$(CONFIG_SYSCTL) += sysctl.o
+sunrpc-objs := $(sunrpc-y)
include $(TOPDIR)/Rules.make
diff --git a/net/unix/Makefile b/net/unix/Makefile
index 9a840afde932..4c8e36185709 100644
--- a/net/unix/Makefile
+++ b/net/unix/Makefile
@@ -1,18 +1,12 @@
#
# Makefile for the Linux unix domain socket layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := unix.o
-obj-y := af_unix.o garbage.o
-obj-m := $(O_TARGET)
+obj-$(CONFIG_UNIX) += unix.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_unix.o
+unix-y := af_unix.o garbage.o
+unix-$(CONFIG_SYSCTL) += sysctl_net_unix.o
+unix-objs := $(unix-y)
include $(TOPDIR)/Rules.make
diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile
index ff71c3ff784e..bb9052050c32 100644
--- a/net/wanrouter/Makefile
+++ b/net/wanrouter/Makefile
@@ -1,20 +1,11 @@
#
# Makefile for the Linux WAN router layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := wanrouter.o
export-objs := wanmain.o
-obj-y := wanproc.o wanmain.o
-obj-m := $(O_TARGET)
-ifneq ($(CONFIG_VENDOR_SANGOMA),n)
- obj-m += $(O_TARGET)
-endif
+obj-$(CONFIG_WAN_ROUTER) += wanrouter.o
+
+wanrouter-objs := wanproc.o wanmain.o
include $(TOPDIR)/Rules.make
diff --git a/net/x25/Makefile b/net/x25/Makefile
index d0082933f1eb..7656831c6c69 100644
--- a/net/x25/Makefile
+++ b/net/x25/Makefile
@@ -1,19 +1,14 @@
#
# Makefile for the Linux X.25 Packet layer.
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definition is now in the main makefile...
-
-O_TARGET := x25.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
-obj-m := $(O_TARGET)
+obj-$(CONFIG_X25) += x25.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_x25.o
+x25-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
+x25-$(CONFIG_SYSCTL) += sysctl_net_x25.o
+x25-objs := $(x25-y)
include $(TOPDIR)/Rules.make
diff --git a/sound/Makefile b/sound/Makefile
index 4aa52d6dba90..02b2ec90ed51 100644
--- a/sound/Makefile
+++ b/sound/Makefile
@@ -8,25 +8,13 @@ export-objs := sound_core.o
mod-subdirs := oss core i2c drivers isa pci ppc synth
obj-$(CONFIG_SOUND) += soundcore.o
+obj-$(CONFIG_SOUND_PRIME) += oss/
+obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/
-subdir-$(CONFIG_SOUND_PRIME) += oss
-ifeq ($(CONFIG_SOUND_PRIME),y)
- obj-y += oss/_oss.o
-endif
-
-subdir-$(CONFIG_SND) += core i2c drivers isa pci ppc arm synth
ifeq ($(CONFIG_SND),y)
- obj-y += core/_core.o i2c/_i2c.o
- obj-y += drivers/_drivers.o
- obj-y += isa/_isa.o
- obj-y += pci/_pci.o
- obj-y += arm/_arm.o
- obj-y += ppc/_ppc.o
- obj-y += synth/_synth.o
obj-y += last.o
endif
soundcore-objs := sound_core.o sound_firmware.o
-
include $(TOPDIR)/Rules.make
diff --git a/sound/arm/Makefile b/sound/arm/Makefile
index 514153e24b6e..bef2c725ff7a 100644
--- a/sound/arm/Makefile
+++ b/sound/arm/Makefile
@@ -2,8 +2,6 @@
# Makefile for ALSA
#
-O_TARGET := _arm.o
-
snd-sa11xx-uda1341-objs := sa11xx-uda1341.o
# Toplevel Module Dependency
diff --git a/sound/core/Makefile b/sound/core/Makefile
index 21d7ee6c913f..906e72394b76 100644
--- a/sound/core/Makefile
+++ b/sound/core/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 1999,2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _core.o
-
export-objs := sound.o pcm.o pcm_lib.o rawmidi.o timer.o rtctimer.o hwdep.o
mod-subdirs := oss seq
@@ -29,26 +27,10 @@ ifeq ($(subst m,y,$(CONFIG_RTC)),y)
obj-$(CONFIG_SND_RTCTIMER) += snd-rtctimer.o
endif
obj-$(CONFIG_SND_HWDEP) += snd-hwdep.o
-
-subdir-$(CONFIG_SND_MIXER_OSS) += oss
-subdir-$(CONFIG_SND_PCM_OSS) += oss
-ifeq ($(filter $(subdir-y),oss),oss)
- obj-y += oss/_oss.o
-endif
-
-obj-$(CONFIG_SND_PCM_OSS) += snd-pcm.o snd-timer.o
-
-subdir-$(CONFIG_SND_SEQUENCER) += seq
-ifeq ($(CONFIG_SND_SEQUENCER),y)
- obj-y += seq/_seq.o
-endif
-
-obj-$(CONFIG_SND_SEQUENCER) += snd-timer.o
-
-subdir-$(CONFIG_SND_BIT32_EMUL) += ioctl32
-ifeq ($(CONFIG_SND_BIT32_EMUL),y)
- obj-y += ioctl32/_ioctl32.o
-endif
+obj-$(CONFIG_SND_MIXER_OSS) += oss/
+obj-$(CONFIG_SND_PCM_OSS) += snd-pcm.o snd-timer.o oss/
+obj-$(CONFIG_SND_SEQUENCER) += snd-timer.o seq/
+obj-$(CONFIG_SND_BIT32_EMUL) += ioctl32/
# Toplevel Module Dependency
obj-$(CONFIG_SND_DUMMY) += snd-pcm.o snd-timer.o snd.o
diff --git a/sound/core/ioctl32/Makefile b/sound/core/ioctl32/Makefile
index 9177e10d807e..c93c4d170270 100644
--- a/sound/core/ioctl32/Makefile
+++ b/sound/core/ioctl32/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ioctl32.o
-
snd-ioctl32-objs := ioctl32.o pcm32.o rawmidi32.o timer32.o hwdep32.o
ifeq ($(CONFIG_SND_SEQUENCER),y)
snd-ioctl32-objs += seq32.o
diff --git a/sound/core/oss/Makefile b/sound/core/oss/Makefile
index fb946317cf0b..6618dea9a03e 100644
--- a/sound/core/oss/Makefile
+++ b/sound/core/oss/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _oss.o
-
export-objs := mixer_oss.o
snd-mixer-oss-objs := mixer_oss.o
diff --git a/sound/core/seq/Makefile b/sound/core/seq/Makefile
index feafb4a3eb6b..f5bf1a52e271 100644
--- a/sound/core/seq/Makefile
+++ b/sound/core/seq/Makefile
@@ -3,19 +3,10 @@
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _seq.o
-
mod-subdirs := instr
-subdir-$(CONFIG_SND) += instr
-ifeq ($(CONFIG_SND),y)
- obj-y += instr/_instr.o
-endif
-
-subdir-$(CONFIG_SND_SEQUENCER_OSS) += oss
-ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
- obj-y += oss/_oss.o
-endif
+obj-$(CONFIG_SND) += instr/
+obj-$(CONFIG_SND_SEQUENCER_OSS) += oss/
export-objs := seq_device.o seq.o seq_ports.o seq_instr.o seq_midi_emul.o \
seq_midi_event.o seq_virmidi.o
diff --git a/sound/core/seq/instr/Makefile b/sound/core/seq/instr/Makefile
index 6228a506d190..03e1d5fc2541 100644
--- a/sound/core/seq/instr/Makefile
+++ b/sound/core/seq/instr/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _instr.o
-
export-objs := ainstr_fm.o ainstr_simple.o ainstr_gf1.o ainstr_iw.o
snd-ainstr-fm-objs := ainstr_fm.o
diff --git a/sound/core/seq/oss/Makefile b/sound/core/seq/oss/Makefile
index 71358dd3e145..5fb23e9e9b55 100644
--- a/sound/core/seq/oss/Makefile
+++ b/sound/core/seq/oss/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _oss.o
-
snd-seq-oss-objs := seq_oss.o seq_oss_init.o seq_oss_timer.o seq_oss_ioctl.o \
seq_oss_event.o seq_oss_rw.o seq_oss_synth.o \
seq_oss_midi.o seq_oss_readq.o seq_oss_writeq.o
diff --git a/sound/drivers/Makefile b/sound/drivers/Makefile
index 94bf181d4b6c..e392e92057f2 100644
--- a/sound/drivers/Makefile
+++ b/sound/drivers/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _drivers.o
-
mod-subdirs := opl3 mpu401
snd-dummy-objs := dummy.o
@@ -18,9 +16,6 @@ obj-$(CONFIG_SND_VIRMIDI) += snd-virmidi.o
obj-$(CONFIG_SND_SERIAL_U16550) += snd-serial-u16550.o
obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o
-subdir-$(CONFIG_SND) += opl3 mpu401
-ifeq ($(CONFIG_SND),y)
- obj-y += mpu401/_mpu401.o opl3/_opl3.o
-endif
+obj-$(CONFIG_SND) += opl3/ mpu401/
include $(TOPDIR)/Rules.make
diff --git a/sound/drivers/mpu401/Makefile b/sound/drivers/mpu401/Makefile
index b989d7496d26..7ebee26d937d 100644
--- a/sound/drivers/mpu401/Makefile
+++ b/sound/drivers/mpu401/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _mpu401.o
-
export-objs := mpu401_uart.o
snd-mpu401-objs := mpu401.o
diff --git a/sound/drivers/opl3/Makefile b/sound/drivers/opl3/Makefile
index b5df27f62067..e61f9a29d3e5 100644
--- a/sound/drivers/opl3/Makefile
+++ b/sound/drivers/opl3/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _opl3.o
-
export-objs := opl3_lib.o
snd-opl3-lib-objs := opl3_lib.o opl3_synth.o
diff --git a/sound/i2c/Makefile b/sound/i2c/Makefile
index 295b8df36d81..889e7aab15ae 100644
--- a/sound/i2c/Makefile
+++ b/sound/i2c/Makefile
@@ -3,7 +3,7 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _i2c.o
+mod-subdirs := l3
export-objs := i2c.o cs8427.o tea6330t.o
@@ -11,13 +11,7 @@ snd-i2c-objs := i2c.o
snd-cs8427-objs := cs8427.o
snd-tea6330t-objs := tea6330t.o
-ifeq ($(subst m,y,$(CONFIG_L3)),y)
- subdir-$(CONFIG_L3) += l3
-endif
-ifeq ($(filter $(subdir-y),l3),l3)
- subdir-m := l3
- obj-y += l3/l3.o
-endif
+obj-$(CONFIG_SND) += l3/
# Toplevel Module Dependency
obj-$(CONFIG_SND_INTERWAVE_STB) += snd-tea6330t.o snd-i2c.o
diff --git a/sound/i2c/l3/Makefile b/sound/i2c/l3/Makefile
index 1342a390927b..2a121d8b52bc 100644
--- a/sound/i2c/l3/Makefile
+++ b/sound/i2c/l3/Makefile
@@ -2,8 +2,6 @@
# Makefile for ALSA
#
-O_TARGET = l3.o
-
export-objs += uda1341.o
snd-uda1341-objs := uda1341.o
diff --git a/sound/isa/Makefile b/sound/isa/Makefile
index 4c814b3a440c..8e0ef2546ac6 100644
--- a/sound/isa/Makefile
+++ b/sound/isa/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _isa.o
-
mod-subdirs := ad1816a ad1848 cs423x es1688 gus opti9xx sb wavefront
snd-als100-objs := als100.o
@@ -24,16 +22,7 @@ obj-$(CONFIG_SND_ES18XX) += snd-es18xx.o
obj-$(CONFIG_SND_OPL3SA2) += snd-opl3sa2.o
obj-$(CONFIG_SND_SGALAXY) += snd-sgalaxy.o
-subdir-$(CONFIG_SND) += ad1816a ad1848 cs423x es1688 gus opti9xx sb wavefront
-ifeq ($(CONFIG_SND),y)
- obj-y += ad1816a/_ad1816a.o \
- ad1848/_ad1848.o \
- cs423x/_cs423x.o \
- es1688/_es1688.o \
- gus/_gus.o \
- opti9xx/_opti9xx.o \
- sb/_sb.o \
- wavefront/_wavefront.o
-endif
+obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ gus/ opti9xx/ \
+ sb/ wavefront/
include $(TOPDIR)/Rules.make
diff --git a/sound/isa/ad1816a/Makefile b/sound/isa/ad1816a/Makefile
index 3a874302eb4e..75aa6edcd822 100644
--- a/sound/isa/ad1816a/Makefile
+++ b/sound/isa/ad1816a/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ad1816a.o
-
export-objs := ad1816a_lib.o
snd-ad1816a-lib-objs := ad1816a_lib.o
diff --git a/sound/isa/ad1848/Makefile b/sound/isa/ad1848/Makefile
index adaf120bd7ba..2bb45edaf027 100644
--- a/sound/isa/ad1848/Makefile
+++ b/sound/isa/ad1848/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ad1848.o
-
export-objs := ad1848_lib.o
snd-ad1848-lib-objs := ad1848_lib.o
diff --git a/sound/isa/cs423x/Makefile b/sound/isa/cs423x/Makefile
index 1854680d04dd..093aa81097d2 100644
--- a/sound/isa/cs423x/Makefile
+++ b/sound/isa/cs423x/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _cs423x.o
-
export-objs := cs4231_lib.o cs4236_lib.o
snd-cs4231-lib-objs := cs4231_lib.o
diff --git a/sound/isa/es1688/Makefile b/sound/isa/es1688/Makefile
index 3cef9094b7d0..252bd79a6e83 100644
--- a/sound/isa/es1688/Makefile
+++ b/sound/isa/es1688/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _es1688.o
-
export-objs := es1688_lib.o
snd-es1688-lib-objs := es1688_lib.o
diff --git a/sound/isa/gus/Makefile b/sound/isa/gus/Makefile
index c76959f7407f..36119a580bc4 100644
--- a/sound/isa/gus/Makefile
+++ b/sound/isa/gus/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _gus.o
-
export-objs := gus_main.o gus_volume.o
snd-gus-lib-objs := gus_main.o \
diff --git a/sound/isa/opti9xx/Makefile b/sound/isa/opti9xx/Makefile
index 68b86cb444e2..68876ed349bf 100644
--- a/sound/isa/opti9xx/Makefile
+++ b/sound/isa/opti9xx/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _opti9xx.o
-
snd-opti92x-ad1848-objs := opti92x-ad1848.o
snd-opti92x-cs4231-objs := opti92x-cs4231.o
snd-opti93x-objs := opti93x.o
diff --git a/sound/isa/sb/Makefile b/sound/isa/sb/Makefile
index ea8fd19b612b..d1366f668802 100644
--- a/sound/isa/sb/Makefile
+++ b/sound/isa/sb/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _sb.o
-
export-objs := emu8000.o emu8000_synth.o sb_common.o sb8_main.o sb16_main.o sb16_csp.o
snd-sb-common-objs := sb_common.o sb_mixer.o
diff --git a/sound/isa/wavefront/Makefile b/sound/isa/wavefront/Makefile
index bd937c9152d6..225300f56fd9 100644
--- a/sound/isa/wavefront/Makefile
+++ b/sound/isa/wavefront/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _wavefront.o
-
snd-wavefront-objs := wavefront.o wavefront_fx.o wavefront_synth.o wavefront_midi.o
# Toplevel Module Dependency
diff --git a/sound/oss/Makefile b/sound/oss/Makefile
index 1b29e537a7ac..effc94f88468 100644
--- a/sound/oss/Makefile
+++ b/sound/oss/Makefile
@@ -3,8 +3,6 @@
# 18 Apr 1998, Michael Elizabeth Chastain, <mailto:mec@shout.net>
# Rewritten to use lists instead of if-statements.
-O_TARGET := _oss.o
-
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
@@ -78,23 +76,9 @@ ifeq ($(CONFIG_MIDI_EMU10K1),y)
obj-$(CONFIG_SOUND_EMU10K1) += sound.o
endif
-subdir-$(CONFIG_SOUND_EMU10K1) += emu10k1
-subdir-$(CONFIG_SOUND_CS4281) += cs4281
-
-ifeq ($(CONFIG_SOUND_EMU10K1),y)
- obj-y += emu10k1/_emu10k1.o
-endif
-
-ifeq ($(CONFIG_SOUND_CS4281),y)
- obj-y += cs4281/_cs4281.o
-endif
-
-subdir-$(CONFIG_DMASOUND) += dmasound
-
-ifeq ($(CONFIG_DMASOUND),y)
- obj-y += dmasound/_dmasound.o
-endif
-
+obj-$(CONFIG_SOUND_EMU10K1) += emu10k1/
+obj-$(CONFIG_SOUND_CS4281) += cs4281/
+obj-$(CONFIG_DMASOUND) += dmasound/
# Declare multi-part drivers.
diff --git a/sound/oss/cs4281/Makefile b/sound/oss/cs4281/Makefile
index b376ebced06e..f10b744fe71b 100644
--- a/sound/oss/cs4281/Makefile
+++ b/sound/oss/cs4281/Makefile
@@ -1,8 +1,6 @@
# Makefile for Cirrus Logic-Crystal CS4281
#
-O_TARGET := _cs4281.o
-
obj-$(CONFIG_SOUND_CS4281) += cs4281.o
cs4281-objs += cs4281m.o
diff --git a/sound/oss/dmasound/Makefile b/sound/oss/dmasound/Makefile
index 8b84c273652a..769f6fd9a0d1 100644
--- a/sound/oss/dmasound/Makefile
+++ b/sound/oss/dmasound/Makefile
@@ -1,13 +1,6 @@
#
# Makefile for the DMA sound driver
#
-# Note! Dependencies are done automagically by 'make dep', which also
-# removes any old dependencies. DON'T put your own dependencies here
-# unless it's something special (ie not a .c file).
-#
-# Note 2! The CFLAGS definitions are now in the main makefile...
-
-O_TARGET = _dmasound.o
export-objs := dmasound_core.o
diff --git a/sound/oss/emu10k1/Makefile b/sound/oss/emu10k1/Makefile
index 12cec7ada6e8..b8530d01ad55 100644
--- a/sound/oss/emu10k1/Makefile
+++ b/sound/oss/emu10k1/Makefile
@@ -2,8 +2,6 @@
#
# 12 Apr 2000 Rui Sousa
-O_TARGET := _emu10k1.o
-
obj-$(CONFIG_SOUND_EMU10K1) += emu10k1.o
emu10k1-objs := audio.o cardmi.o cardmo.o cardwi.o cardwo.o ecard.o \
diff --git a/sound/pci/Makefile b/sound/pci/Makefile
index ca372023a6c0..5a1598c92fa5 100644
--- a/sound/pci/Makefile
+++ b/sound/pci/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _pci.o
-
mod-subdirs := ac97 ali5451 cs46xx emu10k1 korg1212 nm256 rme9652 trident ymfpci
snd-als4000-objs := als4000.o
@@ -42,17 +40,6 @@ obj-$(CONFIG_SND_SONICVIBES) += snd-sonicvibes.o
obj-$(CONFIG_SND_VIA686) += snd-via686.o
obj-$(CONFIG_SND_VIA8233) += snd-via8233.o
-subdir-$(CONFIG_SND) += ac97 ali5451 cs46xx emu10k1 korg1212 nm256 rme9652 trident ymfpci
-ifeq ($(CONFIG_SND),y)
- obj-y += ac97/_ac97.o \
- ali5451/_ali5451.o \
- cs46xx/_cs46xx.o \
- emu10k1/_emu10k1.o \
- korg1212/_korg1212.o \
- nm256/_nm256.o \
- rme9652/_rme9652.o \
- trident/_trident.o \
- ymfpci/_ymfpci.o
-endif
+obj-$(CONFIG_SND) += ac97/ ali5451/ cs46xx/ emu10k1/ korg1212/ nm256/ rme9652/ trident/ ymfpci/
include $(TOPDIR)/Rules.make
diff --git a/sound/pci/ac97/Makefile b/sound/pci/ac97/Makefile
index 869dbf17d057..552b2164bab2 100644
--- a/sound/pci/ac97/Makefile
+++ b/sound/pci/ac97/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ac97.o
-
export-objs := ac97_codec.o ak4531_codec.o
snd-ac97-codec-objs := ac97_codec.o
diff --git a/sound/pci/ali5451/Makefile b/sound/pci/ali5451/Makefile
index ee2672defad5..3ab856b20812 100644
--- a/sound/pci/ali5451/Makefile
+++ b/sound/pci/ali5451/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ali5451.o
-
snd-ali5451-objs := ali5451.o
# Toplevel Module Dependency
diff --git a/sound/pci/cs46xx/Makefile b/sound/pci/cs46xx/Makefile
index 8dbafbdde2f1..ffe03b3c1b4d 100644
--- a/sound/pci/cs46xx/Makefile
+++ b/sound/pci/cs46xx/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _cs46xx.o
-
snd-cs46xx-objs := cs46xx.o cs46xx_lib.o
# Toplevel Module Dependency
diff --git a/sound/pci/emu10k1/Makefile b/sound/pci/emu10k1/Makefile
index c8fdba031c10..aede6c3be747 100644
--- a/sound/pci/emu10k1/Makefile
+++ b/sound/pci/emu10k1/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _emu10k1.o
-
export-objs := emu10k1_main.o
snd-emu10k1-objs := emu10k1.o emu10k1_main.o \
diff --git a/sound/pci/korg1212/Makefile b/sound/pci/korg1212/Makefile
index 3b3970119d99..ac68b1a3100c 100644
--- a/sound/pci/korg1212/Makefile
+++ b/sound/pci/korg1212/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _korg1212.o
-
snd-korg1212-objs := korg1212.o
# Toplevel Module Dependency
diff --git a/sound/pci/nm256/Makefile b/sound/pci/nm256/Makefile
index 117e421072b1..d6653e669283 100644
--- a/sound/pci/nm256/Makefile
+++ b/sound/pci/nm256/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _nm256.o
-
snd-nm256-objs := nm256.o
# Toplevel Module Dependency
diff --git a/sound/pci/rme9652/Makefile b/sound/pci/rme9652/Makefile
index af34d8ef4fc2..7b093db79323 100644
--- a/sound/pci/rme9652/Makefile
+++ b/sound/pci/rme9652/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _rme9652.o
-
export-objs := rme9652_mem.o
snd-rme9652-mem-objs := rme9652_mem.o
diff --git a/sound/pci/trident/Makefile b/sound/pci/trident/Makefile
index ed8ae57c9f61..41041b2588d4 100644
--- a/sound/pci/trident/Makefile
+++ b/sound/pci/trident/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _trident.o
-
export-objs := trident_main.o
snd-trident-objs := trident.o trident_main.o trident_memory.o
diff --git a/sound/pci/ymfpci/Makefile b/sound/pci/ymfpci/Makefile
index de3410baac7e..2f584df33ad8 100644
--- a/sound/pci/ymfpci/Makefile
+++ b/sound/pci/ymfpci/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ymfpci.o
-
snd-ymfpci-objs := ymfpci.o ymfpci_main.o
# Toplevel Module Dependency
diff --git a/sound/ppc/Makefile b/sound/ppc/Makefile
index 614ca105c4d4..feb031cd5d94 100644
--- a/sound/ppc/Makefile
+++ b/sound/ppc/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _ppc.o
-
snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o
# Toplevel Module Dependency
diff --git a/sound/synth/Makefile b/sound/synth/Makefile
index d1a1cbc610b9..3e8d32297bbf 100644
--- a/sound/synth/Makefile
+++ b/sound/synth/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _synth.o
-
mod-subdirs := emux
export-objs := util_mem.o
@@ -18,9 +16,6 @@ ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
obj-$(CONFIG_SND_SBAWE) += snd-util-mem.o
endif
-subdir-$(CONFIG_SND) += emux
-ifeq ($(CONFIG_SND),y)
- obj-y += emux/_emux.o
-endif
+obj-$(CONFIG_SND) += emux/
include $(TOPDIR)/Rules.make
diff --git a/sound/synth/emux/Makefile b/sound/synth/emux/Makefile
index afcf961a32fe..d33c47bd5e03 100644
--- a/sound/synth/emux/Makefile
+++ b/sound/synth/emux/Makefile
@@ -3,8 +3,6 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#
-O_TARGET := _emux.o
-
export-objs := emux.o
snd-emux-synth-objs := emux.o emux_synth.o emux_seq.o emux_nrpn.o \