summaryrefslogtreecommitdiffstats
path: root/drivers/Makefile
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /drivers/Makefile
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'drivers/Makefile')
-rw-r--r--drivers/Makefile248
1 files changed, 51 insertions, 197 deletions
diff --git a/drivers/Makefile b/drivers/Makefile
index 874799bbe..1720f7997 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -1,205 +1,59 @@
#
# Makefile for the Linux kernel device 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 (not a .c file).
+# 15 Sep 2000, Christoph Hellwig <hch@caldera.de>
+# Rewritten to use lists instead of if-statements.
#
-# Note 2! The CFLAGS definitions are now in the main makefile.
-SUB_DIRS := block char net parport sound misc media
-MOD_SUB_DIRS := $(SUB_DIRS)
-ALL_SUB_DIRS := $(SUB_DIRS) pci sgi ide scsi sbus cdrom isdn pnp i2o \
- ieee1394 macintosh video dio zorro fc4 \
- usb nubus tc atm pcmcia i2c telephony \
- acpi mtd input
-ifdef CONFIG_DIO
-SUB_DIRS += dio
-MOD_SUB_DIRS += dio
-endif
-
-ifdef CONFIG_PCI
-SUB_DIRS += pci
-endif
-
-ifeq ($(CONFIG_PCMCIA),y)
-SUB_DIRS += pcmcia
-else
- ifeq ($(CONFIG_PCMCIA),m)
- MOD_SUB_DIRS += pcmcia
- endif
-endif
-
-ifdef CONFIG_MTD
-SUB_DIRS += mtd
-MOD_SUB_DIRS += mtd
-endif
-
-ifdef CONFIG_SBUS
-SUB_DIRS += sbus
-MOD_SUB_DIRS += sbus
-endif
-
-ifdef CONFIG_ZORRO
-SUB_DIRS += zorro
-endif
-
-ifdef CONFIG_NUBUS
-SUB_DIRS += nubus
-endif
-
-ifdef CONFIG_TC
-SUB_DIRS += tc
-endif
-
-ifdef CONFIG_VT
-SUB_DIRS += video
-MOD_SUB_DIRS += video
-endif
-
-ifdef CONFIG_MAC
-SUB_DIRS += macintosh
-MOD_SUB_DIRS += macintosh
-endif
-
-ifdef CONFIG_PPC
-SUB_DIRS += macintosh
-MOD_SUB_DIRS += macintosh
-endif
-
-ifeq ($(CONFIG_USB),y)
-SUB_DIRS += usb
-MOD_SUB_DIRS += usb
-else
- ifeq ($(CONFIG_USB),m)
- MOD_SUB_DIRS += usb
- endif
-endif
-
-ifeq ($(CONFIG_INPUT),y)
-SUB_DIRS += input
-MOD_SUB_DIRS += input
-else
- ifeq ($(CONFIG_INPUT),m)
- MOD_SUB_DIRS += input
- endif
-endif
-
-ifeq ($(CONFIG_PHONE),y)
-SUB_DIRS += telephony
-MOD_SUB_DIRS += telephony
-else
- ifeq ($(CONFIG_PHONE),m)
- MOD_SUB_DIRS += telephony
- endif
-endif
-
-ifdef CONFIG_SGI
-SUB_DIRS += sgi
-MOD_SUB_DIRS += sgi
-endif
-
-ifeq ($(CONFIG_I2O),y)
-SUB_DIRS += i2o
-MOD_SUB_DIRS += i2o
-else
- ifeq ($(CONFIG_I2O),m)
- MOD_SUB_DIRS += i2o
- endif
-endif
-
-# If CONFIG_IDE is set, the core of ATA support will be added to the kernel,
-# but some of the low-level things may also be modules.
-ifeq ($(CONFIG_IDE),y)
-SUB_DIRS += ide
-MOD_SUB_DIRS += ide
-else
- ifeq ($(CONFIG_IDE),m)
- MOD_SUB_DIRS += ide
- endif
-endif
-
-# If CONFIG_SCSI is set, the core of SCSI support will be added to the kernel,
-# but some of the low-level things may also be modules.
-ifeq ($(CONFIG_SCSI),y)
-SUB_DIRS += scsi
-MOD_SUB_DIRS += scsi
-else
- ifeq ($(CONFIG_SCSI),m)
- MOD_SUB_DIRS += scsi
- endif
-endif
-
-ifeq ($(CONFIG_IEEE1394),y)
-SUB_DIRS += ieee1394
-MOD_SUB_DIRS += ieee1394
-else
- ifeq ($(CONFIG_IEEE1394),m)
- MOD_SUB_DIRS += ieee1394
- endif
-endif
-
-ifeq ($(CONFIG_PNP),y)
-SUB_DIRS += pnp
-MOD_SUB_DIRS += pnp
-else
- ifeq ($(CONFIG_PNP),m)
- MOD_SUB_DIRS += pnp
- endif
-endif
-
-ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
-SUB_DIRS += cdrom
-MOD_SUB_DIRS += cdrom
-endif
-
-ifeq ($(CONFIG_ISDN),y)
-SUB_DIRS += isdn
-MOD_SUB_DIRS += isdn
-else
- ifeq ($(CONFIG_ISDN),m)
- MOD_SUB_DIRS += isdn
- endif
-endif
-
-ifdef CONFIG_ATM
-SUB_DIRS += atm
-MOD_SUB_DIRS += atm
-endif
-
-ifeq ($(CONFIG_FC4),y)
-SUB_DIRS += fc4
-MOD_SUB_DIRS += fc4
-else
- ifeq ($(CONFIG_FC4),m)
- MOD_SUB_DIRS += fc4
- endif
-endif
-
-# When MOD_LIST_NAME is set, make will try to add $(MOD_SUB_DIRS).o to
-# modules/MOD_LIST_NAME. We don't have hamradio.o and Linus
-# sort of insisted on making hamradio/ a subdirectory of drivers/net/.
-# #FIXME# MOD_LIST_NAME doesn't exist any more -- does this comment
-# #FIXME# still mean anything?
-
-ifeq ($(CONFIG_HAMRADIO),y)
- SUB_DIRS += net/hamradio
- MOD_SUB_DIRS += net/hamradio
-endif
-
-ifeq ($(CONFIG_I2C),y)
-SUB_DIRS += i2c
-MOD_SUB_DIRS += i2c
-else
- ifeq ($(CONFIG_I2C),m)
- MOD_SUB_DIRS += i2c
- endif
-endif
-
-ifeq ($(CONFIG_ACPI),y)
-SUB_DIRS += acpi
-MOD_SUB_DIRS += acpi
-endif
+mod-subdirs := dio mtd sbus video macintosh usb input telephony sgi i2o ide \
+ scsi md ieee1394 pnp isdn atm fc4 net/hamradio i2c acpi
+
+subdir-y := block char net parport sound misc media cdrom
+subdir-m := $(subdir-y)
+
+
+subdir-$(CONFIG_DIO) += dio
+subdir-$(CONFIG_PCI) += pci
+subdir-$(CONFIG_PCMCIA) += pcmcia
+subdir-$(CONFIG_MTD) += mtd
+subdir-$(CONFIG_SBUS) += sbus
+subdir-$(CONFIG_ZORRO) += zorro
+subdir-$(CONFIG_NUBUS) += nubus
+subdir-$(CONFIG_TC) += tc
+subdir-$(CONFIG_VT) += video
+subdir-$(CONFIG_MAC) += macintosh
+subdir-$(CONFIG_ALL_PPC) += macintosh
+subdir-$(CONFIG_USB) += usb
+subdir-$(CONFIG_INPUT) += input
+subdir-$(CONFIG_PHONE) += telephony
+subdir-$(CONFIG_SGI) += sgi
+subdir-$(CONFIG_I2O) += i2o
+subdir-$(CONFIG_IDE) += ide
+subdir-$(CONFIG_SCSI) += scsi
+subdir-$(CONFIG_MD) += md
+subdir-$(CONFIG_IEEE1394) += ieee1394
+subdir-$(CONFIG_PNP) += pnp
+subdir-$(CONFIG_ISDN) += isdn
+subdir-$(CONFIG_ATM) += atm
+subdir-$(CONFIG_FC4) += fc4
+
+# CONFIG_HAMRADIO can be set without CONFIG_NETDEVICE being set -- ch
+subdir-$(CONFIG_HAMRADIO) += net/hamradio
+subdir-$(CONFIG_I2C) += i2c
+subdir-$(CONFIG_ACPI) += acpi
+
+
+# Subdirectories that should be entered when MAKING_MODULES=1, even if set to 'y'.
+both-m := $(filter $(mod-subdirs), $(subdir-y))
+
+# Translate to Rules.make lists.
+SUB_DIRS := $(subdir-y)
+MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m))
+ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
+
+# net/hamradio is already in ALL_SUB_DIRS of drivers/net/Makefile
+ALL_SUB_DIRS := $(filter-out net/hamradio, $(ALL_SUB_DIRS))
include $(TOPDIR)/Rules.make
+