Import 2.1.118
[davej-history.git] / drivers / scsi / Makefile
blob6441113acc8d541e7ee1551817d3ccf17fb8b235
1 # Makefile for linux/drivers/scsi
3 # Note! Dependencies are done automagically by 'make dep', which also
4 # removes any old dependencies. DON'T put your own dependencies here
5 # unless it's something special (ie not a .c file).
8 L_TARGET := scsi.a
9 L_OBJS :=
10 M_OBJS :=
11 MX_OBJS :=
12 MIX_OBJS :=
13 MOD_LIST_NAME := SCSI_MODULES
14 SCSI_SRCS = $(wildcard $(L_OBJS:%.o=%.c))
16 CFLAGS_aha152x.o = -DDEBUG_AHA152X -DAUTOCONF
17 CFLAGS_gdth.o = # -DDEBUG_GDTH=2 -D__SERIAL__ -D__COM2__ -DGDTH_STATISTICS
18 CFLAGS_seagate.o = -DARBITRATE -DPARITY -DSEAGATE_USE_ASM
20 .SUFFIXES:
21 .SUFFIXES: .c .o .h .a
23 ifeq (${CFLAGS},)
24 CFLAGS = -D__KERNEL__=1 \
25 -DMODULE -Wall -Wstrict-prototypes -I. -I../../include \
26 -O2 -fomit-frame-pointer
28 include ../../.config
30 TOPDIR = ../..
32 endif
34 ifeq ($(CONFIG_SCSI),y)
35 # We must attach scsi_syms.o to scsi.o, as otherwise there is nothing to
36 # pull the object file from the archive.
37 O_TARGET := scsi_n_syms.o
38 O_OBJS := scsi.o
39 ifeq ($(CONFIG_MODULES),y)
40 OX_OBJS := scsi_syms.o
41 endif
42 L_OBJS += scsi_n_syms.o hosts.o scsi_ioctl.o constants.o scsicam.o
43 L_OBJS += scsi_error.o scsi_obsolete.o scsi_queue.o
44 ifeq ($(CONFIG_PROC_FS),y)
45 L_OBJS += scsi_proc.o
46 endif
47 else
48 ifeq ($(CONFIG_SCSI),m)
49 MIX_OBJS += scsi_syms.o
50 M_OBJS += scsi_mod.o
51 endif
52 endif
54 ifeq ($(CONFIG_CHR_DEV_ST),y)
55 L_OBJS += st.o
56 else
57 ifeq ($(CONFIG_CHR_DEV_ST),m)
58 M_OBJS += st.o
59 endif
60 endif
62 ifeq ($(CONFIG_BLK_DEV_SD),y)
63 L_OBJS += sd.o sd_ioctl.o
64 else
65 ifeq ($(CONFIG_BLK_DEV_SD),m)
66 M_OBJS += sd_mod.o
67 endif
68 endif
70 ifeq ($(CONFIG_BLK_DEV_SR),y)
71 L_OBJS += sr.o sr_ioctl.o sr_vendor.o
72 else
73 ifeq ($(CONFIG_BLK_DEV_SR),m)
74 M_OBJS += sr_mod.o
75 endif
76 endif
78 ifeq ($(CONFIG_CHR_DEV_SG),y)
79 L_OBJS += sg.o
80 else
81 ifeq ($(CONFIG_CHR_DEV_SG),m)
82 M_OBJS += sg.o
83 endif
84 endif
86 ifeq ($(CONFIG_SCSI_ADVANSYS),y)
87 L_OBJS += advansys.o
88 else
89 ifeq ($(CONFIG_SCSI_ADVANSYS),m)
90 M_OBJS += advansys.o
91 endif
92 endif
94 ifeq ($(CONFIG_SCSI_PCI2000),y)
95 L_OBJS += pci2000.o
96 else
97 ifeq ($(CONFIG_SCSI_PCI2000),m)
98 M_OBJS += pci2000.o
99 endif
100 endif
102 ifeq ($(CONFIG_SCSI_PCI2220I),y)
103 L_OBJS += pci2220i.o
104 else
105 ifeq ($(CONFIG_SCSI_PCI2220I),m)
106 M_OBJS += pci2220i.o
107 endif
108 endif
110 ifeq ($(CONFIG_SCSI_PSI240I),y)
111 L_OBJS += psi240i.o
112 else
113 ifeq ($(CONFIG_SCSI_PSI240I),m)
114 M_OBJS += psi240i.o
115 endif
116 endif
118 ifeq ($(CONFIG_MVME16x_SCSI),y)
119 L_OBJS += mvme16x.o 53c7xx.o
120 else
121 ifeq ($(CONFIG_MVME16x_SCSI),m)
122 M_OBJS += mvme16x.o 53c7xx.o
123 endif
124 endif
126 ifeq ($(CONFIG_BVME6000_SCSI),y)
127 L_OBJS += bvme6000.o 53c7xx.o
128 else
129 ifeq ($(CONFIG_BVME6000_SCSI),m)
130 M_OBJS += bvme6000.o 53c7xx.o
131 endif
132 endif
134 ifeq ($(CONFIG_A4000T_SCSI),y)
135 L_OBJS += amiga7xx.o 53c7xx.o
136 else
137 ifeq ($(CONFIG_A4000T_SCSI),m)
138 M_OBJS += amiga7xx.o 53c7xx.o
139 endif
140 endif
142 ifeq ($(CONFIG_A4091_SCSI),y)
143 L_OBJS += amiga7xx.o 53c7xx.o
144 else
145 ifeq ($(CONFIG_A4091_SCSI),m)
146 M_OBJS += amiga7xx.o 53c7xx.o
147 endif
148 endif
150 ifeq ($(CONFIG_WARPENGINE_SCSI),y)
151 L_OBJS += amiga7xx.o 53c7xx.o
152 else
153 ifeq ($(CONFIG_WARPENGINE_SCSI),m)
154 M_OBJS += amiga7xx.o 53c7xx.o
155 endif
156 endif
158 ifeq ($(CONFIG_A3000_SCSI),y)
159 L_OBJS += a3000.o wd33c93.o
160 else
161 ifeq ($(CONFIG_A3000_SCSI),m)
162 M_OBJS += a3000.o wd33c93.o
163 endif
164 endif
166 ifeq ($(CONFIG_A2091_SCSI),y)
167 L_OBJS += a2091.o wd33c93.o
168 else
169 ifeq ($(CONFIG_A2091_SCSI),m)
170 M_OBJS += a2091.o wd33c93.o
171 endif
172 endif
174 ifeq ($(CONFIG_GVP11_SCSI),y)
175 L_OBJS += gvp11.o wd33c93.o
176 else
177 ifeq ($(CONFIG_GVP11_SCSI),m)
178 M_OBJS += gvp11.o wd33c93.o
179 endif
180 endif
182 ifeq ($(CONFIG_SCSI_SGIWD93),y)
183 L_OBJS += sgiwd93.o wd33c93.o
184 else
185 ifeq ($(CONFIG_SCSI_SGIWD93),m)
186 M_OBJS += sgiwd93.o wd33c93.o
187 endif
188 endif
190 ifeq ($(CONFIG_CYBERSTORM_SCSI),y)
191 L_OBJS += NCR53C9x.o cyberstorm.o
192 else
193 ifeq ($(CONFIG_CYBERSTORM_SCSI),m)
194 M_OBJS += NCR53C9x.o cyberstorm.o
195 endif
196 endif
198 ifeq ($(CONFIG_CYBERSTORMII_SCSI),y)
199 L_OBJS += NCR53C9x.o cyberstormII.o
200 else
201 ifeq ($(CONFIG_CYBERSTORMII_SCSI),m)
202 M_OBJS += NCR53C9x.o cyberstormII.o
203 endif
204 endif
206 ifeq ($(CONFIG_BLZ2060_SCSI),y)
207 L_OBJS += NCR53C9x.o blz2060.o
208 else
209 ifeq ($(CONFIG_BLZ2060_SCSI),m)
210 M_OBJS += NCR53C9x.o blz2060.o
211 endif
212 endif
214 ifeq ($(CONFIG_BLZ1230_SCSI),y)
215 L_OBJS += NCR53C9x.o blz1230.o
216 else
217 ifeq ($(CONFIG_BLZ1230_SCSI),m)
218 M_OBJS += NCR53C9x.o blz1230.o
219 endif
220 endif
222 ifeq ($(CONFIG_FASTLANE_SCSI),y)
223 L_OBJS += NCR53C9x.o fastlane.o
224 else
225 ifeq ($(CONFIG_FASTLANE_SCSI),m)
226 M_OBJS += NCR53C9x.o fastlane.o
227 endif
228 endif
230 ifeq ($(CONFIG_ATARI_SCSI),y)
231 L_OBJS += atari_scsi.o
232 else
233 ifeq ($(CONFIG_ATARI_SCSI),m)
234 M_OBJS += atari_scsi.o
235 endif
236 endif
238 ifeq ($(CONFIG_SCSI_PPA),y)
239 L_OBJS += ppa.o
240 else
241 ifeq ($(CONFIG_SCSI_PPA),m)
242 M_OBJS += ppa.o
243 endif
244 endif
246 ifeq ($(CONFIG_SCSI_QLOGIC_FAS),y)
247 L_OBJS += qlogicfas.o
248 else
249 ifeq ($(CONFIG_SCSI_QLOGIC_FAS),m)
250 M_OBJS += qlogicfas.o
251 endif
252 endif
255 ifeq ($(CONFIG_SCSI_QLOGIC_ISP),y)
256 L_OBJS += qlogicisp.o
257 else
258 ifeq ($(CONFIG_SCSI_QLOGIC_ISP),m)
259 M_OBJS += qlogicisp.o
260 endif
261 endif
264 ifeq ($(CONFIG_SCSI_AHA152X),y)
265 L_OBJS += aha152x.o
266 else
267 ifeq ($(CONFIG_SCSI_AHA152X),m)
268 M_OBJS += aha152x.o
269 endif
270 endif
272 ifeq ($(CONFIG_SCSI_AHA1542),y)
273 L_OBJS += aha1542.o
274 else
275 ifeq ($(CONFIG_SCSI_AHA1542),m)
276 M_OBJS += aha1542.o
277 endif
278 endif
280 ifeq ($(CONFIG_SCSI_AHA1740),y)
281 L_OBJS += aha1740.o
282 else
283 ifeq ($(CONFIG_SCSI_AHA1740),m)
284 M_OBJS += aha1740.o
285 endif
286 endif
288 ifeq ($(CONFIG_SCSI_AIC7XXX),y)
289 L_OBJS += aic7xxx.o
290 else
291 ifeq ($(CONFIG_SCSI_AIC7XXX),m)
292 M_OBJS += aic7xxx.o
293 endif
294 endif
296 ifeq ($(CONFIG_SCSI_DC390T),y)
297 L_OBJS += tmscsim.o
298 else
299 ifeq ($(CONFIG_SCSI_DC390T),m)
300 M_OBJS += tmscsim.o
301 endif
302 endif
304 ifeq ($(CONFIG_SCSI_AM53C974),y)
305 L_OBJS += AM53C974.o
306 else
307 ifeq ($(CONFIG_SCSI_AM53C974),m)
308 M_OBJS += AM53C974.o
309 endif
310 endif
312 ifeq ($(CONFIG_SCSI_BUSLOGIC),y)
313 L_OBJS += BusLogic.o
314 else
315 ifeq ($(CONFIG_SCSI_BUSLOGIC),m)
316 M_OBJS += BusLogic.o
317 endif
318 endif
320 ifeq ($(CONFIG_SCSI_EATA_DMA),y)
321 L_OBJS += eata_dma.o
322 else
323 ifeq ($(CONFIG_SCSI_EATA_DMA),m)
324 M_OBJS += eata_dma.o
325 endif
326 endif
328 ifeq ($(CONFIG_SCSI_EATA_PIO),y)
329 L_OBJS += eata_pio.o
330 else
331 ifeq ($(CONFIG_SCSI_EATA_PIO),m)
332 M_OBJS += eata_pio.o
333 endif
334 endif
336 ifeq ($(CONFIG_SCSI_U14_34F),y)
337 L_OBJS += u14-34f.o
338 else
339 ifeq ($(CONFIG_SCSI_U14_34F),m)
340 M_OBJS += u14-34f.o
341 endif
342 endif
344 ifeq ($(CONFIG_SCSI_SUNESP),y)
345 L_OBJS += esp.o
346 else
347 ifeq ($(CONFIG_SCSI_SUNESP),m)
348 M_OBJS += esp.o
349 endif
350 endif
352 ifeq ($(CONFIG_SCSI_QLOGICPTI),y)
353 L_OBJS += qlogicpti.o
354 else
355 ifeq ($(CONFIG_SCSI_QLOGICPTI),m)
356 M_OBJS += qlogicpti.o
357 endif
358 endif
360 ifeq ($(CONFIG_SCSI_MESH),y)
361 L_OBJS += mesh.o
362 else
363 ifeq ($(CONFIG_SCSI_MESH),m)
364 M_OBJS += mesh.o
365 endif
366 endif
368 ifeq ($(CONFIG_SCSI_MAC53C94),y)
369 L_OBJS += mac53c94.o
370 else
371 ifeq ($(CONFIG_SCSI_MAC53C94),m)
372 M_OBJS += mac53c94.o
373 endif
374 endif
376 ifeq ($(CONFIG_SCSI_GDTH),y)
377 L_OBJS += gdth.o
378 else
379 ifeq ($(CONFIG_SCSI_GDTH),m)
380 M_OBJS += gdth.o
381 endif
382 endif
384 ifeq ($(CONFIG_SCSI_DEBUG),y)
385 L_OBJS += scsi_debug.o
386 else
387 ifeq ($(CONFIG_SCSI_DEBUG),m)
388 M_OBJS += scsi_debug.o
389 endif
390 endif
392 ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),y)
393 L_OBJS += fdomain.o
394 else
395 ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),m)
396 M_OBJS += fdomain.o
397 endif
398 endif
400 ifeq ($(CONFIG_SCSI_IN2000),y)
401 L_OBJS += in2000.o
402 else
403 ifeq ($(CONFIG_SCSI_IN2000),m)
404 M_OBJS += in2000.o
405 endif
406 endif
408 ifeq ($(CONFIG_SCSI_GENERIC_NCR5380),y)
409 L_OBJS += g_NCR5380.o
410 else
411 ifeq ($(CONFIG_SCSI_GENERIC_NCR5380),m)
412 M_OBJS += g_NCR5380.o
413 endif
414 endif
416 ifeq ($(CONFIG_SCSI_NCR53C7xx),y)
417 L_OBJS += 53c7,8xx.o
418 else
419 ifeq ($(CONFIG_SCSI_NCR53C7xx),m)
420 M_OBJS += 53c7,8xx.o
421 endif
422 endif
424 ifeq ($(CONFIG_SCSI_NCR53C8XX),y)
425 L_OBJS += ncr53c8xx.o
426 else
427 ifeq ($(CONFIG_SCSI_NCR53C8XX),m)
428 M_OBJS += ncr53c8xx.o
429 endif
430 endif
432 ifeq ($(CONFIG_SCSI_PAS16),y)
433 L_OBJS += pas16.o
434 else
435 ifeq ($(CONFIG_SCSI_PAS16),m)
436 M_OBJS += pas16.o
437 endif
438 endif
440 ifeq ($(CONFIG_SCSI_SEAGATE),y)
441 L_OBJS += seagate.o
442 else
443 ifeq ($(CONFIG_SCSI_SEAGATE),m)
444 M_OBJS += seagate.o
445 endif
446 endif
447 ifndef CONFIG_SCSI_SEAGATE
448 ifeq ($(CONFIG_SCSI_FD_8xx),y)
449 L_OBJS += seagate.o
450 else
451 ifeq ($(CONFIG_SCSI_FD_8xx),m)
452 M_OBJS += seagate.o
453 endif
454 endif
455 endif
457 ifeq ($(CONFIG_SCSI_7000FASST),y)
458 L_OBJS += wd7000.o
459 else
460 ifeq ($(CONFIG_SCSI_7000FASST),m)
461 M_OBJS += wd7000.o
462 endif
463 endif
465 ifeq ($(CONFIG_SCSI_IBMMCA),y)
466 L_OBJS += ibmmca.o
467 else
468 ifeq ($(CONFIG_SCSI_IBMMCA),m)
469 M_OBJS += ibmmca.o
470 endif
471 endif
473 ifeq ($(CONFIG_SCSI_T128),y)
474 L_OBJS += t128.o
475 else
476 ifeq ($(CONFIG_SCSI_T128),m)
477 M_OBJS += t128.o
478 endif
479 endif
481 ifeq ($(CONFIG_SCSI_DTC3280),y)
482 L_OBJS += dtc.o
483 else
484 ifeq ($(CONFIG_SCSI_DTC3280),m)
485 M_OBJS += dtc.o
486 endif
487 endif
489 ifeq ($(CONFIG_SCSI_ULTRASTOR),y)
490 L_OBJS += ultrastor.o
491 else
492 ifeq ($(CONFIG_SCSI_ULTRASTOR),m)
493 M_OBJS += ultrastor.o
494 endif
495 endif
497 ifeq ($(CONFIG_SCSI_PLUTO),y)
498 L_OBJS += pluto.o
499 else
500 ifeq ($(CONFIG_SCSI_PLUTO),m)
501 M_OBJS += pluto.o
502 endif
503 endif
505 ifeq ($(CONFIG_SCSI_EATA),y)
506 L_OBJS += eata.o
507 else
508 ifeq ($(CONFIG_SCSI_EATA),m)
509 M_OBJS += eata.o
510 endif
511 endif
513 ifeq ($(CONFIG_SCSI_NCR53C406A),y)
514 L_OBJS += NCR53c406a.o
515 else
516 ifeq ($(CONFIG_SCSI_NCR53C406A),m)
517 M_OBJS += NCR53c406a.o
518 endif
519 endif
521 ifeq ($(CONFIG_BLK_DEV_IDESCSI),y)
522 L_OBJS += ide-scsi.o
523 else
524 ifeq ($(CONFIG_BLK_DEV_IDESCSI),m)
525 M_OBJS += ide-scsi.o
526 endif
527 endif
529 ifeq ($(CONFIG_JAZZ_ESP),y)
530 L_OBJS += NCR53C9x.o jazz_esp.o
531 endif
533 include $(TOPDIR)/Rules.make
535 53c8xx_d.h: 53c7,8xx.scr script_asm.pl
536 ln -sf 53c7,8xx.scr fake8.c
537 $(CPP) -traditional -DCHIP=810 fake8.c | grep -v '^#' | perl script_asm.pl
538 mv script.h 53c8xx_d.h
539 mv scriptu.h 53c8xx_u.h
540 rm fake8.c
542 53c8xx_u.h: 53c8xx_d.h
544 53c7xx_d.h: 53c7xx.scr script_asm.pl
545 ln -sf 53c7xx.scr fake7.c
546 $(CPP) -traditional -DCHIP=710 fake7.c | grep -v '^#' | perl -s script_asm.pl -ncr7x0_family
547 mv script.h 53c7xx_d.h
548 mv scriptu.h 53c7xx_u.h
549 rm fake7.c
551 53c7xx_u.h: 53c7xx_d.h
553 53c7xx.o : 53c7xx_d.h 53c7xx.c
554 $(CC) $(CFLAGS) -c 53c7xx.c
556 scsi_mod.o: $(MIX_OBJS) hosts.o scsi.o scsi_ioctl.o constants.o \
557 scsicam.o scsi_proc.o scsi_error.o scsi_obsolete.o scsi_queue.o
558 $(LD) $(LD_RFLAG) -r -o $@ $(MIX_OBJS) hosts.o scsi.o scsi_ioctl.o \
559 constants.o scsicam.o scsi_proc.o \
560 scsi_error.o scsi_obsolete.o scsi_queue.o \
562 sr_mod.o: sr.o sr_ioctl.o sr_vendor.o
563 $(LD) $(LD_RFLAG) -r -o $@ sr.o sr_ioctl.o sr_vendor.o
565 sd_mod.o: sd.o sd_ioctl.o
566 $(LD) $(LD_RFLAG) -r -o $@ sd.o sd_ioctl.o