1#
2# Makefile for linux/drivers/scsi
3#
4# 30 May 2000, Christoph Hellwig <hch@infradead.org>
5# Rewritten to use lists instead of if-statements.
6#
7# 20 Sep 2000, Torben Mathiasen <tmm@image.dk>
8# Changed link order to reflect new scsi initialization.
9#
10# *!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
11# The link order must be, SCSI Core, SCSI HBA drivers, and
12# lastly SCSI peripheral drivers (disk/tape/cdrom/etc.) to
13# satisfy certain initialization assumptions in the SCSI layer.
14# *!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
15
16
17CFLAGS_aha152x.o =   -DAHA152X_STAT -DAUTOCONF
18CFLAGS_gdth.o    = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
19CFLAGS_seagate.o =   -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
20
21
22O_TARGET := scsidrv.o
23
24export-objs	:= scsi_syms.o 53c700.o libata-core.o
25mod-subdirs	:= pcmcia ../acorn/scsi
26
27
28subdir-$(CONFIG_SCSI_AACRAID)	+= aacraid
29subdir-$(CONFIG_SCSI_AIC7XXX)	+= aic7xxx
30subdir-$(CONFIG_SCSI_AIC79XX)	+= aic7xxx
31subdir-$(CONFIG_PCMCIA)		+= pcmcia
32
33
34obj-$(CONFIG_SCSI)		+= scsi_mod.o
35
36obj-$(CONFIG_SCSI_AMIGA7XX)	+= amiga7xx.o	53c7xx.o
37obj-$(CONFIG_A3000_SCSI)	+= a3000.o	wd33c93.o
38obj-$(CONFIG_A2091_SCSI)	+= a2091.o	wd33c93.o
39obj-$(CONFIG_GVP11_SCSI)	+= gvp11.o	wd33c93.o
40obj-$(CONFIG_MVME147_SCSI)	+= mvme147.o	wd33c93.o
41obj-$(CONFIG_SGIWD93_SCSI)	+= sgiwd93.o	wd33c93.o
42obj-$(CONFIG_CYBERSTORM_SCSI)	+= NCR53C9x.o	cyberstorm.o
43obj-$(CONFIG_CYBERSTORMII_SCSI)	+= NCR53C9x.o	cyberstormII.o
44obj-$(CONFIG_BLZ2060_SCSI)	+= NCR53C9x.o	blz2060.o
45obj-$(CONFIG_BLZ1230_SCSI)	+= NCR53C9x.o	blz1230.o
46obj-$(CONFIG_FASTLANE_SCSI)	+= NCR53C9x.o	fastlane.o
47obj-$(CONFIG_OKTAGON_SCSI)	+= NCR53C9x.o	oktagon_esp.o	oktagon_io.o
48obj-$(CONFIG_ATARI_SCSI)	+= atari_scsi.o
49obj-$(CONFIG_MAC_SCSI)		+= mac_scsi.o
50obj-$(CONFIG_SCSI_MAC_ESP)	+= mac_esp.o	NCR53C9x.o
51obj-$(CONFIG_SUN3_SCSI)		+= sun3_scsi.o  sun3_scsi_vme.o
52obj-$(CONFIG_MVME16x_SCSI)	+= mvme16x.o	53c7xx.o
53obj-$(CONFIG_BVME6000_SCSI)	+= bvme6000.o	53c7xx.o
54obj-$(CONFIG_SCSI_SIM710)	+= sim710.o
55obj-$(CONFIG_SCSI_ADVANSYS)	+= advansys.o
56obj-$(CONFIG_SCSI_PCI2000)	+= pci2000.o
57obj-$(CONFIG_SCSI_PCI2220I)	+= pci2220i.o
58obj-$(CONFIG_SCSI_PSI240I)	+= psi240i.o
59obj-$(CONFIG_SCSI_BUSLOGIC)	+= BusLogic.o
60obj-$(CONFIG_SCSI_DPT_I2O)	+= dpt_i2o.o
61obj-$(CONFIG_SCSI_U14_34F)	+= u14-34f.o
62obj-$(CONFIG_SCSI_ULTRASTOR)	+= ultrastor.o
63obj-$(CONFIG_SCSI_AHA152X)	+= aha152x.o
64obj-$(CONFIG_SCSI_AHA1542)	+= aha1542.o
65obj-$(CONFIG_SCSI_AHA1740)	+= aha1740.o
66ifeq ($(CONFIG_SCSI_AACRAID),y)
67  obj-$(CONFIG_SCSI_AACRAID)	+= aacraid/aacraid.o
68endif
69ifeq ($(CONFIG_SCSI_AIC7XXX),y)
70  obj-$(CONFIG_SCSI_AIC7XXX)	+= aic7xxx/aic7xxx.o
71endif
72ifeq ($(CONFIG_SCSI_AIC79XX),y)
73  obj-$(CONFIG_SCSI_AIC79XX)	+= aic7xxx/aic79xx.o
74endif
75obj-$(CONFIG_SCSI_AIC7XXX_OLD)	+= aic7xxx_old.o
76obj-$(CONFIG_SCSI_IPS)		+= ips.o
77obj-$(CONFIG_SCSI_FD_MCS)	+= fd_mcs.o
78obj-$(CONFIG_SCSI_FUTURE_DOMAIN)+= fdomain.o
79obj-$(CONFIG_SCSI_IN2000)	+= in2000.o
80obj-$(CONFIG_SCSI_GENERIC_NCR5380) += g_NCR5380.o
81obj-$(CONFIG_SCSI_NCR53C406A)	+= NCR53c406a.o
82obj-$(CONFIG_SCSI_NCR_D700)	+= NCR_D700.o 53c700.o
83obj-$(CONFIG_SCSI_SYM53C416)	+= sym53c416.o
84obj-$(CONFIG_SCSI_QLOGIC_FAS)	+= qlogicfas.o
85obj-$(CONFIG_SCSI_QLOGIC_ISP)	+= qlogicisp.o
86obj-$(CONFIG_SCSI_QLOGIC_FC)	+= qlogicfc.o
87obj-$(CONFIG_SCSI_QLOGIC_1280)	+= qla1280.o
88obj-$(CONFIG_SCSI_PAS16)	+= pas16.o
89obj-$(CONFIG_SCSI_SEAGATE)	+= seagate.o
90obj-$(CONFIG_SCSI_FD_8xx)	+= seagate.o
91obj-$(CONFIG_SCSI_T128)		+= t128.o
92obj-$(CONFIG_SCSI_DMX3191D)	+= dmx3191d.o
93obj-$(CONFIG_SCSI_DTC3280)	+= dtc.o
94obj-$(CONFIG_SCSI_NCR53C7xx)	+= 53c7,8xx.o
95subdir-$(CONFIG_SCSI_SYM53C8XX_2)	+= sym53c8xx_2
96ifeq ($(CONFIG_SCSI_SYM53C8XX_2),y)
97  obj-$(CONFIG_SCSI_SYM53C8XX_2)	+= sym53c8xx_2/sym53c8xx_2.o
98endif
99obj-$(CONFIG_SCSI_SYM53C8XX)	+= sym53c8xx.o
100obj-$(CONFIG_SCSI_NCR53C8XX)	+= ncr53c8xx.o
101obj-$(CONFIG_SCSI_EATA_DMA)	+= eata_dma.o
102obj-$(CONFIG_SCSI_EATA_PIO)	+= eata_pio.o
103obj-$(CONFIG_SCSI_7000FASST)	+= wd7000.o
104obj-$(CONFIG_SCSI_MCA_53C9X)	+= NCR53C9x.o	mca_53c9x.o
105obj-$(CONFIG_SCSI_IBMMCA)	+= ibmmca.o
106obj-$(CONFIG_SCSI_EATA)		+= eata.o
107obj-$(CONFIG_SCSI_DC390T)	+= tmscsim.o
108obj-$(CONFIG_SCSI_AM53C974)	+= AM53C974.o
109obj-$(CONFIG_SCSI_MEGARAID)	+= megaraid.o
110obj-$(CONFIG_SCSI_MEGARAID2)	+= megaraid2.o
111obj-$(CONFIG_SCSI_ACARD)	+= atp870u.o
112obj-$(CONFIG_SCSI_SUNESP)	+= esp.o
113obj-$(CONFIG_SCSI_GDTH)		+= gdth.o
114obj-$(CONFIG_SCSI_INITIO)	+= initio.o
115obj-$(CONFIG_SCSI_INIA100)	+= a100u2w.o
116obj-$(CONFIG_SCSI_QLOGICPTI)	+= qlogicpti.o
117obj-$(CONFIG_BLK_DEV_IDESCSI)	+= ide-scsi.o
118obj-$(CONFIG_SCSI_MESH)		+= mesh.o
119obj-$(CONFIG_SCSI_MAC53C94)	+= mac53c94.o
120obj-$(CONFIG_SCSI_PLUTO)	+= pluto.o
121obj-$(CONFIG_SCSI_DECNCR)	+= NCR53C9x.o	dec_esp.o
122obj-$(CONFIG_BLK_DEV_3W_XXXX_RAID) += 3w-xxxx.o
123obj-$(CONFIG_SCSI_ZALON)	+= zalon7xx_mod.o
124obj-$(CONFIG_SCSI_PPA)		+= ppa.o
125obj-$(CONFIG_SCSI_IMM)		+= imm.o
126obj-$(CONFIG_JAZZ_ESP)		+= NCR53C9x.o	jazz_esp.o
127obj-$(CONFIG_SUN3X_ESP)		+= NCR53C9x.o	sun3x_esp.o
128obj-$(CONFIG_SCSI_DEBUG)	+= scsi_debug.o
129obj-$(CONFIG_SCSI_FCAL)		+= fcal.o
130obj-$(CONFIG_SCSI_CPQFCTS)	+= cpqfc.o
131obj-$(CONFIG_SCSI_LASI700)	+= lasi700.o 53c700.o
132obj-$(CONFIG_SCSI_NSP32)	+= nsp32.o
133obj-$(CONFIG_SCSI_SATA_AHCI)	+= libata.o ahci.o
134obj-$(CONFIG_SCSI_SATA_SVW)	+= libata.o sata_svw.o
135obj-$(CONFIG_SCSI_ATA_PIIX)	+= libata.o ata_piix.o
136obj-$(CONFIG_SCSI_SATA_PROMISE)	+= libata.o sata_promise.o
137obj-$(CONFIG_SCSI_SATA_QSTOR)	+= libata.o sata_qstor.o
138obj-$(CONFIG_SCSI_SATA_SIL)	+= libata.o sata_sil.o
139obj-$(CONFIG_SCSI_SATA_VIA)	+= libata.o sata_via.o
140obj-$(CONFIG_SCSI_SATA_VITESSE)	+= libata.o sata_vsc.o
141obj-$(CONFIG_SCSI_SATA_SIS)	+= libata.o sata_sis.o
142obj-$(CONFIG_SCSI_SATA_SX4)	+= libata.o sata_sx4.o
143obj-$(CONFIG_SCSI_SATA_NV)	+= libata.o sata_nv.o
144obj-$(CONFIG_SCSI_SATA_ULI)	+= libata.o sata_uli.o
145
146subdir-$(CONFIG_ARCH_ACORN)	+= ../acorn/scsi
147obj-$(CONFIG_ARCH_ACORN)	+= ../acorn/scsi/acorn-scsi.o
148
149obj-$(CONFIG_CHR_DEV_ST)	+= st.o
150obj-$(CONFIG_CHR_DEV_OSST)	+= osst.o
151obj-$(CONFIG_BLK_DEV_SD)	+= sd_mod.o
152obj-$(CONFIG_BLK_DEV_SR)	+= sr_mod.o
153obj-$(CONFIG_CHR_DEV_SG)	+= sg.o
154
155list-multi	:= scsi_mod.o sd_mod.o sr_mod.o initio.o a100u2w.o cpqfc.o \
156			zalon7xx_mod.o libata.o
157scsi_mod-objs	:= scsi.o hosts.o scsi_ioctl.o constants.o \
158			scsicam.o scsi_proc.o scsi_error.o \
159			scsi_obsolete.o scsi_queue.o scsi_lib.o \
160			scsi_merge.o scsi_dma.o scsi_scan.o \
161			scsi_syms.o
162sd_mod-objs	:= sd.o
163sr_mod-objs	:= sr.o sr_ioctl.o sr_vendor.o
164initio-objs	:= ini9100u.o i91uscsi.o
165a100u2w-objs	:= inia100.o i60uscsi.o
166zalon7xx_mod-objs := zalon7xx.o ncr53c8xx.o
167cpqfc-objs	:= cpqfcTSinit.o cpqfcTScontrol.o cpqfcTSi2c.o \
168		   cpqfcTSworker.o cpqfcTStrigger.o
169libata-objs	:= libata-core.o libata-scsi.o
170
171include $(TOPDIR)/Rules.make
172
173
174scsi_mod.o: $(scsi_mod-objs)
175	$(LD) -r -o $@ $(scsi_mod-objs)
176
177sd_mod.o: $(sd_mod-objs)
178	$(LD) -r -o $@ $(sd_mod-objs)
179
180sr_mod.o: $(sr_mod-objs)
181	$(LD) -r -o $@ $(sr_mod-objs)
182
183initio.o: $(initio-objs)
184	$(LD) -r -o $@ $(initio-objs)
185
186a100u2w.o: $(a100u2w-objs)
187	$(LD) -r -o $@ $(a100u2w-objs)
188
189zalon7xx_mod.o: $(zalon7xx_mod-objs)
190	$(LD) -r -o $@ $(zalon7xx_mod-objs)
191
192cpqfc.o: $(cpqfc-objs)
193	$(LD) -r -o $@ $(cpqfc-objs)
194
195libata.o: $(libata-objs)
196	$(LD) -r -o $@ $(libata-objs)
197
19853c8xx_d.h: 53c7,8xx.scr script_asm.pl
199	ln -sf 53c7,8xx.scr fake8.c
200	$(CPP) $(CPPFLAGS) -traditional -DCHIP=810 fake8.c | grep -v '^#' | $(PERL) script_asm.pl
201	mv script.h 53c8xx_d.h
202	mv scriptu.h 53c8xx_u.h
203	rm fake8.c
204
20553c8xx_u.h: 53c8xx_d.h
206
20753c7,8xx.o: 53c8xx_u.h
208
20953c7xx_d.h: 53c7xx.scr script_asm.pl
210	ln -sf 53c7xx.scr fake7.c
211	$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr710
212	mv script.h 53c7xx_d.h
213	mv scriptu.h 53c7xx_u.h
214	rm fake7.c
215
21653c7xx_u.h: 53c7xx_d.h
217
21853c7xx.o : 53c7xx_d.h
219
220sim710_d.h: sim710.scr script_asm.pl
221	ln -sf sim710.scr fake7.c
222	$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr710
223	mv script.h sim710_d.h
224	mv scriptu.h sim710_u.h
225	rm fake7.c
226
227sim710_u.h: sim710_d.h
228
229sim710.o : sim710_d.h
230
23153c700_d.h: 53c700.scr script_asm.pl
232	$(PERL) -s script_asm.pl -ncr7x0_family < 53c700.scr
233	rm -f scriptu.h
234	mv script.h 53c700_d.h
235
23653c700.o: 53c700_d.h
237