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).
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
21 .SUFFIXES
: .c .o .h .a .S
24 CFLAGS
= -D__KERNEL__
=1 \
25 -DMODULE
-Wall
-Wstrict-prototypes
-I.
-I..
/..
/include \
26 -O2
-fomit-frame-pointer
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
39 ifeq ($(CONFIG_MODULES
),y
)
40 OX_OBJS
:= scsi_syms.o
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
46 ifeq ($(CONFIG_SCSI
),m
)
47 MIX_OBJS
+= scsi_syms.o
52 ifeq ($(CONFIG_CHR_DEV_ST
),y
)
55 ifeq ($(CONFIG_CHR_DEV_ST
),m
)
60 ifeq ($(CONFIG_BLK_DEV_SD
),y
)
61 L_OBJS
+= sd.o sd_ioctl.o
63 ifeq ($(CONFIG_BLK_DEV_SD
),m
)
68 ifeq ($(CONFIG_BLK_DEV_SR
),y
)
69 L_OBJS
+= sr.o sr_ioctl.o sr_vendor.o
71 ifeq ($(CONFIG_BLK_DEV_SR
),m
)
76 ifeq ($(CONFIG_CHR_DEV_SG
),y
)
79 ifeq ($(CONFIG_CHR_DEV_SG
),m
)
84 ifeq ($(CONFIG_SCSI_ADVANSYS
),y
)
87 ifeq ($(CONFIG_SCSI_ADVANSYS
),m
)
92 ifeq ($(CONFIG_SCSI_PCI2000
),y
)
95 ifeq ($(CONFIG_SCSI_PCI2000
),m
)
100 ifeq ($(CONFIG_SCSI_PCI2220I
),y
)
103 ifeq ($(CONFIG_SCSI_PCI2220I
),m
)
108 ifeq ($(CONFIG_SCSI_PSI240I
),y
)
111 ifeq ($(CONFIG_SCSI_PSI240I
),m
)
116 ifeq ($(CONFIG_MVME16x_SCSI
),y
)
117 L_OBJS
+= mvme16x.o
53c7xx.o
119 ifeq ($(CONFIG_MVME16x_SCSI
),m
)
120 M_OBJS
+= mvme16x.o
53c7xx.o
124 ifeq ($(CONFIG_BVME6000_SCSI
),y
)
125 L_OBJS
+= bvme6000.o
53c7xx.o
127 ifeq ($(CONFIG_BVME6000_SCSI
),m
)
128 M_OBJS
+= bvme6000.o
53c7xx.o
132 ifeq ($(CONFIG_SCSI_SIM710
),y
)
135 ifeq ($(CONFIG_SCSI_SIM710
),m
)
140 ifeq ($(CONFIG_A4000T_SCSI
),y
)
141 L_OBJS
+= amiga7xx.o
53c7xx.o
143 ifeq ($(CONFIG_A4000T_SCSI
),m
)
144 M_OBJS
+= amiga7xx.o
53c7xx.o
148 ifeq ($(CONFIG_A4091_SCSI
),y
)
149 L_OBJS
+= amiga7xx.o
53c7xx.o
151 ifeq ($(CONFIG_A4091_SCSI
),m
)
152 M_OBJS
+= amiga7xx.o
53c7xx.o
156 ifeq ($(CONFIG_BLZ603EPLUS_SCSI
),y
)
157 L_OBJS
+= amiga7xx.o
53c7xx.o
159 ifeq ($(CONFIG_BLZ603EPLUS_SCSI
),m
)
160 M_OBJS
+= amiga7xx.o
53c7xx.o
164 ifeq ($(CONFIG_WARPENGINE_SCSI
),y
)
165 L_OBJS
+= amiga7xx.o
53c7xx.o
167 ifeq ($(CONFIG_WARPENGINE_SCSI
),m
)
168 M_OBJS
+= amiga7xx.o
53c7xx.o
172 ifeq ($(CONFIG_A3000_SCSI
),y
)
173 L_OBJS
+= a3000.o wd33c93.o
175 ifeq ($(CONFIG_A3000_SCSI
),m
)
176 M_OBJS
+= a3000.o wd33c93.o
180 ifeq ($(CONFIG_A2091_SCSI
),y
)
181 L_OBJS
+= a2091.o wd33c93.o
183 ifeq ($(CONFIG_A2091_SCSI
),m
)
184 M_OBJS
+= a2091.o wd33c93.o
188 ifeq ($(CONFIG_GVP11_SCSI
),y
)
189 L_OBJS
+= gvp11.o wd33c93.o
191 ifeq ($(CONFIG_GVP11_SCSI
),m
)
192 M_OBJS
+= gvp11.o wd33c93.o
196 ifeq ($(CONFIG_SCSI_SGIWD93
),y
)
197 L_OBJS
+= sgiwd93.o wd33c93.o
199 ifeq ($(CONFIG_SCSI_SGIWD93
),m
)
200 M_OBJS
+= sgiwd93.o wd33c93.o
204 ifeq ($(CONFIG_SCSI_MCA_53C9X
),y
)
205 L_OBJS
+= NCR53C9x.o mca_53c9x.o
207 ifeq ($(CONFIG_SCSI_MCA_53C9X
),m
)
208 M_OBJS
+= NCR53C9x.o mca_53c9x.o
212 ifeq ($(CONFIG_CYBERSTORM_SCSI
),y
)
213 L_OBJS
+= NCR53C9x.o cyberstorm.o
215 ifeq ($(CONFIG_CYBERSTORM_SCSI
),m
)
216 M_OBJS
+= NCR53C9x.o cyberstorm.o
220 ifeq ($(CONFIG_CYBERSTORMII_SCSI
),y
)
221 L_OBJS
+= NCR53C9x.o cyberstormII.o
223 ifeq ($(CONFIG_CYBERSTORMII_SCSI
),m
)
224 M_OBJS
+= NCR53C9x.o cyberstormII.o
228 ifeq ($(CONFIG_BLZ2060_SCSI
),y
)
229 L_OBJS
+= NCR53C9x.o blz2060.o
231 ifeq ($(CONFIG_BLZ2060_SCSI
),m
)
232 M_OBJS
+= NCR53C9x.o blz2060.o
236 ifeq ($(CONFIG_BLZ1230_SCSI
),y
)
237 L_OBJS
+= NCR53C9x.o blz1230.o
239 ifeq ($(CONFIG_BLZ1230_SCSI
),m
)
240 M_OBJS
+= NCR53C9x.o blz1230.o
244 ifeq ($(CONFIG_FASTLANE_SCSI
),y
)
245 L_OBJS
+= NCR53C9x.o fastlane.o
247 ifeq ($(CONFIG_FASTLANE_SCSI
),m
)
248 M_OBJS
+= NCR53C9x.o fastlane.o
252 ifeq ($(CONFIG_OKTAGON_SCSI
),y
)
253 L_OBJS
+= NCR53C9x.o oktagon_esp.o oktagon_io.o
255 ifeq ($(CONFIG_OKTAGON_SCSI
),m
)
256 M_OBJS
+= NCR53C9x.o oktagon_esp.o oktagon_io.o
260 ifeq ($(CONFIG_ATARI_SCSI
),y
)
261 L_OBJS
+= atari_scsi.o
263 ifeq ($(CONFIG_ATARI_SCSI
),m
)
264 M_OBJS
+= atari_scsi.o
268 ifeq ($(CONFIG_MAC_SCSI_OLD
),y
)
271 ifeq ($(CONFIG_MAC_SCSI_OLD
),m
)
276 ifeq ($(CONFIG_SCSI_MAC_ESP
),y
)
277 L_OBJS
+= mac_esp.o NCR53C9x.o
279 ifeq ($(CONFIG_SCSI_MAC_ESP
),m
)
280 M_OBJS
+= mac_esp.o NCR53C9x.o
284 ifeq ($(CONFIG_SCSI_PPA
),y
)
287 ifeq ($(CONFIG_SCSI_PPA
),m
)
292 ifeq ($(CONFIG_SCSI_IMM
),y
)
295 ifeq ($(CONFIG_SCSI_IMM
),m
)
300 ifeq ($(CONFIG_SCSI_QLOGIC_FAS
),y
)
301 L_OBJS
+= qlogicfas.o
303 ifeq ($(CONFIG_SCSI_QLOGIC_FAS
),m
)
304 M_OBJS
+= qlogicfas.o
309 ifeq ($(CONFIG_SCSI_QLOGIC_ISP
),y
)
310 L_OBJS
+= qlogicisp.o
312 ifeq ($(CONFIG_SCSI_QLOGIC_ISP
),m
)
313 M_OBJS
+= qlogicisp.o
317 ifeq ($(CONFIG_SCSI_ACARD
),y
)
320 ifeq ($(CONFIG_SCSI_ACARD
),m
)
325 ifeq ($(CONFIG_SCSI_INITIO
),y
)
328 ifeq ($(CONFIG_SCSI_INITIO
),m
)
333 ifeq ($(CONFIG_SCSI_INIA100
),y
)
336 ifeq ($(CONFIG_SCSI_INIA100
),m
)
341 ifeq ($(CONFIG_SCSI_QLOGIC_FC
),y
)
344 ifeq ($(CONFIG_SCSI_QLOGIC_FC
),m
)
349 ifeq ($(CONFIG_SCSI_AHA152X
),y
)
352 ifeq ($(CONFIG_SCSI_AHA152X
),m
)
357 ifeq ($(CONFIG_SCSI_AHA1542
),y
)
360 ifeq ($(CONFIG_SCSI_AHA1542
),m
)
365 ifeq ($(CONFIG_SCSI_AHA1740
),y
)
368 ifeq ($(CONFIG_SCSI_AHA1740
),m
)
373 ifeq ($(CONFIG_SCSI_AIC7XXX
),y
)
376 ifeq ($(CONFIG_SCSI_AIC7XXX
),m
)
381 ifeq ($(CONFIG_SCSI_IPS
),y
)
384 ifeq ($(CONFIG_SCSI_IPS
),m
)
389 ifeq ($(CONFIG_SCSI_DC390T
),y
)
392 ifeq ($(CONFIG_SCSI_DC390T
),m
)
397 ifeq ($(CONFIG_SCSI_AM53C974
),y
)
400 ifeq ($(CONFIG_SCSI_AM53C974
),m
)
405 ifeq ($(CONFIG_SCSI_BUSLOGIC
),y
)
408 ifeq ($(CONFIG_SCSI_BUSLOGIC
),m
)
413 ifeq ($(CONFIG_SCSI_EATA_DMA
),y
)
416 ifeq ($(CONFIG_SCSI_EATA_DMA
),m
)
421 ifeq ($(CONFIG_SCSI_EATA_PIO
),y
)
424 ifeq ($(CONFIG_SCSI_EATA_PIO
),m
)
429 ifeq ($(CONFIG_SCSI_U14_34F
),y
)
432 ifeq ($(CONFIG_SCSI_U14_34F
),m
)
437 ifeq ($(CONFIG_SCSI_SUNESP
),y
)
440 ifeq ($(CONFIG_SCSI_SUNESP
),m
)
445 ifeq ($(CONFIG_SCSI_QLOGICPTI
),y
)
446 L_OBJS
+= qlogicpti.o
448 ifeq ($(CONFIG_SCSI_QLOGICPTI
),m
)
449 M_OBJS
+= qlogicpti.o
453 ifeq ($(CONFIG_SCSI_MESH
),y
)
456 ifeq ($(CONFIG_SCSI_MESH
),m
)
461 ifeq ($(CONFIG_SCSI_MAC53C94
),y
)
464 ifeq ($(CONFIG_SCSI_MAC53C94
),m
)
469 ifeq ($(CONFIG_SCSI_GDTH
),y
)
472 ifeq ($(CONFIG_SCSI_GDTH
),m
)
477 ifeq ($(CONFIG_SCSI_DEBUG
),y
)
478 L_OBJS
+= scsi_debug.o
480 ifeq ($(CONFIG_SCSI_DEBUG
),m
)
481 M_OBJS
+= scsi_debug.o
485 ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN
),y
)
488 ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN
),m
)
493 ifeq ($(CONFIG_SCSI_IN2000
),y
)
496 ifeq ($(CONFIG_SCSI_IN2000
),m
)
501 ifeq ($(CONFIG_SCSI_GENERIC_NCR5380
),y
)
502 L_OBJS
+= g_NCR5380.o
504 ifeq ($(CONFIG_SCSI_GENERIC_NCR5380
),m
)
505 M_OBJS
+= g_NCR5380.o
509 ifeq ($(CONFIG_SCSI_NCR53C7xx
),y
)
512 ifeq ($(CONFIG_SCSI_NCR53C7xx
),m
)
517 ifeq ($(CONFIG_SCSI_NCR53C8XX
),y
)
518 L_OBJS
+= ncr53c8xx.o
520 ifeq ($(CONFIG_SCSI_NCR53C8XX
),m
)
521 M_OBJS
+= ncr53c8xx.o
525 ifeq ($(CONFIG_SCSI_SYM53C8XX
),y
)
526 L_OBJS
+= sym53c8xx.o
528 ifeq ($(CONFIG_SCSI_SYM53C8XX
),m
)
529 M_OBJS
+= sym53c8xx.o
533 ifeq ($(CONFIG_SCSI_PAS16
),y
)
536 ifeq ($(CONFIG_SCSI_PAS16
),m
)
541 ifeq ($(CONFIG_SCSI_SEAGATE
),y
)
544 ifeq ($(CONFIG_SCSI_SEAGATE
),m
)
548 ifndef CONFIG_SCSI_SEAGATE
549 ifeq ($(CONFIG_SCSI_FD_8xx
),y
)
552 ifeq ($(CONFIG_SCSI_FD_8xx
),m
)
558 ifeq ($(CONFIG_SCSI_7000FASST
),y
)
561 ifeq ($(CONFIG_SCSI_7000FASST
),m
)
566 ifeq ($(CONFIG_SCSI_IBMMCA
),y
)
569 ifeq ($(CONFIG_SCSI_IBMMCA
),m
)
574 ifeq ($(CONFIG_SCSI_FD_MCS
),y
)
577 ifeq ($(CONFIG_SCSI_FD_MCS
),m
)
582 ifeq ($(CONFIG_SCSI_T128
),y
)
585 ifeq ($(CONFIG_SCSI_T128
),m
)
590 ifeq ($(CONFIG_SCSI_DTC3280
),y
)
593 ifeq ($(CONFIG_SCSI_DTC3280
),m
)
598 ifeq ($(CONFIG_SCSI_ULTRASTOR
),y
)
599 L_OBJS
+= ultrastor.o
601 ifeq ($(CONFIG_SCSI_ULTRASTOR
),m
)
602 M_OBJS
+= ultrastor.o
606 ifeq ($(CONFIG_SCSI_PLUTO
),y
)
609 ifeq ($(CONFIG_SCSI_PLUTO
),m
)
614 ifeq ($(CONFIG_SCSI_FCAL
),y
)
617 ifeq ($(CONFIG_SCSI_FCAL
),m
)
622 ifeq ($(CONFIG_SCSI_EATA
),y
)
625 ifeq ($(CONFIG_SCSI_EATA
),m
)
630 ifeq ($(CONFIG_SCSI_NCR53C406A
),y
)
631 L_OBJS
+= NCR53c406a.o
633 ifeq ($(CONFIG_SCSI_NCR53C406A
),m
)
634 M_OBJS
+= NCR53c406a.o
638 ifeq ($(CONFIG_SCSI_MEGARAID
),y
)
641 ifeq ($(CONFIG_SCSI_MEGARAID
),m
)
646 ifeq ($(CONFIG_SCSI_SYM53C416
),y
)
647 L_OBJS
+= sym53c416.o
649 ifeq ($(CONFIG_SCSI_SYM53C416
),m
)
650 M_OBJS
+= sym53c416.o
654 ifeq ($(CONFIG_BLK_DEV_IDESCSI
),y
)
657 ifeq ($(CONFIG_BLK_DEV_IDESCSI
),m
)
662 ifeq ($(CONFIG_JAZZ_ESP
),y
)
663 L_OBJS
+= NCR53C9x.o jazz_esp.o
666 ifeq ($(CONFIG_SUN3X_ESP
),y
)
667 L_OBJS
+= NCR53C9x.o sun3x_esp.o
670 include $(TOPDIR
)/Rules.make
672 53c8xx_d.h
: 53c7
,8xx.scr script_asm.pl
673 ln
-sf
53c7
,8xx.scr fake8.c
674 $(CPP
) -traditional
-DCHIP
=810 fake8.c | grep
-v
'^#' | perl script_asm.pl
675 mv script.h
53c8xx_d.h
676 mv scriptu.h
53c8xx_u.h
679 53c8xx_u.h
: 53c8xx_d.h
681 53c7xx_d.h
: 53c7xx.scr script_asm.pl
682 ln
-sf
53c7xx.scr fake7.c
683 $(CPP
) -traditional
-DCHIP
=710 fake7.c | grep
-v
'^#' | perl
-s script_asm.pl
-ncr7x0_family
684 mv script.h
53c7xx_d.h
685 mv scriptu.h
53c7xx_u.h
688 53c7xx_u.h
: 53c7xx_d.h
690 53c7xx.o
: 53c7xx_d.h
692 sim710_d.h
: sim710.scr script_asm.pl
693 ln
-sf sim710.scr fake7.c
694 $(CPP
) -traditional
-DCHIP
=710 fake7.c | grep
-v
'^#' | perl
-s script_asm.pl
-ncr7x0_family
695 mv script.h sim710_d.h
696 mv scriptu.h sim710_u.h
699 sim710_u.h
: sim710_d.h
701 sim710.o
: sim710_d.h
703 initio.o
: ini9100u.c i91uscsi.c
704 $(CC
) $(CFLAGS
) -c ini9100u.c
-o ini9100u.o
705 $(CC
) $(CFLAGS
) -c i91uscsi.c
-o i91uscsi.o
706 $(LD
) -r
-o initio.o ini9100u.o i91uscsi.o
707 rm -f ini9100u.o i91uscsi.o
709 a100u2w.o
: inia100.o i60uscsi.o
710 $(LD
) -r
-o a100u2w.o inia100.o i60uscsi.o
712 megaraid.o
: megaraid.c
713 $(CC
) $(CFLAGS
) -c megaraid.c
715 scsi_mod.o
: $(MIX_OBJS
) hosts.o scsi.o scsi_ioctl.o constants.o \
716 scsicam.o scsi_proc.o scsi_error.o scsi_obsolete.o scsi_queue.o
717 $(LD
) $(LD_RFLAG
) -r
-o
$@
$(MIX_OBJS
) hosts.o scsi.o scsi_ioctl.o \
718 constants.o scsicam.o scsi_proc.o \
719 scsi_error.o scsi_obsolete.o scsi_queue.o \
721 sr_mod.o
: sr.o sr_ioctl.o sr_vendor.o
722 $(LD
) $(LD_RFLAG
) -r
-o
$@ sr.o sr_ioctl.o sr_vendor.o
724 sd_mod.o
: sd.o sd_ioctl.o
725 $(LD
) $(LD_RFLAG
) -r
-o
$@ sd.o sd_ioctl.o