Rest of the merge.
[linux-2.6/linux-mips.git] / drivers / Makefile
blob1d46532331b519c562314d618336f59ef8c5d9a8
2 # Makefile for the Linux kernel device drivers.
4 # Note! Dependencies are done automagically by 'make dep', which also
5 # removes any old dependencies. DON'T put your own dependencies here
6 # unless it's something special (not a .c file).
8 # Note 2! The CFLAGS definitions are now in the main makefile.
10 SUB_DIRS := block char net parport sound misc
11 MOD_SUB_DIRS := $(SUB_DIRS)
12 ALL_SUB_DIRS := $(SUB_DIRS) pci sgi scsi sbus cdrom isdn pnp i2o ieee1394 \
13 macintosh video dio zorro fc4 usb \
14 nubus tc atm pcmcia i2c telephony
16 ifdef CONFIG_DIO
17 SUB_DIRS += dio
18 MOD_SUB_DIRS += dio
19 endif
21 ifdef CONFIG_PCI
22 SUB_DIRS += pci
23 endif
25 ifeq ($(CONFIG_PCMCIA),y)
26 SUB_DIRS += pcmcia
27 else
28 ifeq ($(CONFIG_PCMCIA),m)
29 MOD_SUB_DIRS += pcmcia
30 endif
31 endif
33 ifdef CONFIG_SBUS
34 SUB_DIRS += sbus
35 MOD_SUB_DIRS += sbus
36 endif
38 ifdef CONFIG_ZORRO
39 SUB_DIRS += zorro
40 endif
42 ifdef CONFIG_NUBUS
43 SUB_DIRS += nubus
44 endif
46 ifdef CONFIG_TC
47 SUB_DIRS += tc
48 endif
50 ifdef CONFIG_VT
51 SUB_DIRS += video
52 MOD_SUB_DIRS += video
53 endif
55 ifdef CONFIG_MAC
56 SUB_DIRS += macintosh
57 MOD_SUB_DIRS += macintosh
58 endif
60 ifdef CONFIG_PPC
61 SUB_DIRS += macintosh
62 MOD_SUB_DIRS += macintosh
63 endif
65 ifeq ($(CONFIG_USB),y)
66 SUB_DIRS += usb
67 MOD_SUB_DIRS += usb
68 else
69 ifeq ($(CONFIG_USB),m)
70 MOD_SUB_DIRS += usb
71 endif
72 endif
74 ifeq ($(CONFIG_PHONE),y)
75 SUB_DIRS += telephony
76 MOD_SUB_DIRS += telephony
77 else
78 ifeq ($(CONFIG_PHONE),m)
79 MOD_SUB_DIRS += telephony
80 endif
81 endif
83 ifdef CONFIG_SGI_IP22
84 SUB_DIRS += sgi
85 MOD_SUB_DIRS += sgi
86 endif
88 ifeq ($(CONFIG_I2O),y)
89 SUB_DIRS += i2o
90 MOD_SUB_DIRS += i2o
91 else
92 ifeq ($(CONFIG_I2O),m)
93 MOD_SUB_DIRS += i2o
94 endif
95 endif
97 # If CONFIG_SCSI is set, the core of SCSI support will be added to the kernel,
98 # but some of the low-level things may also be modules.
99 ifeq ($(CONFIG_SCSI),y)
100 SUB_DIRS += scsi
101 MOD_SUB_DIRS += scsi
102 else
103 ifeq ($(CONFIG_SCSI),m)
104 MOD_SUB_DIRS += scsi
105 endif
106 endif
108 ifeq ($(CONFIG_IEEE1394),y)
109 SUB_DIRS += ieee1394
110 MOD_SUB_DIRS += ieee1394
111 else
112 ifeq ($(CONFIG_IEEE1394),m)
113 MOD_SUB_DIRS += ieee1394
114 endif
115 endif
117 ifeq ($(CONFIG_PNP),y)
118 SUB_DIRS += pnp
119 MOD_SUB_DIRS += pnp
120 else
121 ifeq ($(CONFIG_PNP),m)
122 MOD_SUB_DIRS += pnp
123 endif
124 endif
126 ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
127 SUB_DIRS += cdrom
128 MOD_SUB_DIRS += cdrom
129 endif
131 ifeq ($(CONFIG_ISDN),y)
132 SUB_DIRS += isdn
133 MOD_SUB_DIRS += isdn
134 else
135 ifeq ($(CONFIG_ISDN),m)
136 MOD_SUB_DIRS += isdn
137 endif
138 endif
140 ifdef CONFIG_ATM
141 SUB_DIRS += atm
142 MOD_SUB_DIRS += atm
143 endif
145 ifeq ($(CONFIG_FC4),y)
146 SUB_DIRS += fc4
147 MOD_SUB_DIRS += fc4
148 else
149 ifeq ($(CONFIG_FC4),m)
150 MOD_SUB_DIRS += fc4
151 endif
152 endif
154 # When MOD_LIST_NAME is set, make will try to add $(MOD_SUB_DIRS).o to
155 # modules/MOD_LIST_NAME. We don't have hamradio.o and Linus
156 # sort of insisted on making hamradio/ a subdirectory of drivers/net/.
158 ifeq ($(CONFIG_HAMRADIO),y)
159 SUB_DIRS += net/hamradio
160 MOD_SUB_DIRS += net/hamradio
161 endif
163 ifeq ($(CONFIG_I2C),y)
164 SUB_DIRS += i2c
165 MOD_SUB_DIRS += i2c
166 else
167 ifeq ($(CONFIG_I2C),m)
168 MOD_SUB_DIRS += i2c
169 endif
170 endif
172 include $(TOPDIR)/Rules.make