1#
2# drivers/scsi/aic7xxx/Makefile
3#
4# Makefile for the Linux aic7xxx SCSI driver.
5#
6
7O_TARGET := aic7xxx_drv.o
8
9list-multi	:= aic7xxx.o aic79xx.o
10
11obj-$(CONFIG_SCSI_AIC7XXX)	+= aic7xxx.o
12ifeq ($(CONFIG_PCI),y)
13obj-$(CONFIG_SCSI_AIC79XX)	+= aic79xx.o
14endif
15
16EXTRA_CFLAGS += -I$(TOPDIR)/drivers/scsi -Werror
17#EXTRA_CFLAGS += -g
18
19# Platform Specific Files
20obj-aic7xxx = aic7xxx_osm.o aic7xxx_proc.o
21
22# Core Files
23obj-aic7xxx += aic7xxx_core.o aic7xxx_93cx6.o
24ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
25obj-aic7xxx += aic7xxx_reg_print.o
26endif
27
28#EISA Specific Files
29AIC7XXX_EISA_ARCH = $(filter i386 alpha,$(ARCH))
30ifneq ($(AIC7XXX_EISA_ARCH),)
31obj-aic7xxx += aic7770.o
32# Platform Specific EISA Files
33obj-aic7xxx += aic7770_osm.o
34endif
35
36#PCI Specific Files
37ifeq ($(CONFIG_PCI),y)
38obj-aic7xxx += aic7xxx_pci.o
39# Platform Specific PCI Files
40obj-aic7xxx += aic7xxx_osm_pci.o
41endif
42
43# Platform Specific U320 Files
44obj-aic79xx = aic79xx_osm.o aic79xx_proc.o aic79xx_osm_pci.o
45# Core Files
46obj-aic79xx += aic79xx_core.o aic79xx_pci.o
47ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
48obj-aic79xx += aic79xx_reg_print.o
49endif
50
51# Override our module desitnation
52MOD_DESTDIR = $(shell cd .. && $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
53
54include $(TOPDIR)/Rules.make
55
56aic7xxx_core.o: aic7xxx_seq.h
57$(obj-aic7xxx): aic7xxx_reg.h
58aic7xxx.o: aic7xxx_seq.h aic7xxx_reg.h $(obj-aic7xxx)
59	$(LD) $(LD_RFLAG) -r -o $@ $(obj-aic7xxx)
60
61aic79xx_core.o: aic79xx_seq.h
62$(obj-aic79xx): aic79xx_reg.h
63aic79xx.o: aic79xx_seq.h aic79xx_reg.h $(obj-aic79xx)
64	$(LD) $(LD_RFLAG) -r -o $@ $(obj-aic79xx)
65
66ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
67aic7xxx_gen = aic7xxx_seq.h aic7xxx_reg.h
68ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
69aic7xxx_gen += aic7xxx_reg_print.c
70aic7xxx_asm_cmd = aicasm/aicasm -I. -r aic7xxx_reg.h		\
71		 -p aic7xxx_reg_print.c -i aic7xxx_osm.h	\
72		 -o aic7xxx_seq.h aic7xxx.seq
73else
74aic7xxx_asm_cmd = aicasm/aicasm -I. -r aic7xxx_reg.h		\
75		 -o aic7xxx_seq.h aic7xxx.seq
76endif
77$(aic7xxx_gen): aic7xxx.seq aic7xxx.reg aicasm/aicasm
78	$(aic7xxx_asm_cmd)
79endif
80
81ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
82aic79xx_gen = aic79xx_seq.h aic79xx_reg.h
83ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
84aic79xx_gen += aic79xx_reg_print.c
85aic79xx_asm_cmd = aicasm/aicasm -I. -r aic79xx_reg.h		\
86		 -p aic79xx_reg_print.c -i aic79xx_osm.h	\
87		 -o aic79xx_seq.h aic79xx.seq
88else
89aic79xx_asm_cmd = aicasm/aicasm -I. -r aic79xx_reg.h \
90		 -o aic79xx_seq.h aic79xx.seq
91endif
92$(aic79xx_gen): aic79xx.seq aic79xx.reg aicasm/aicasm
93	$(aic79xx_asm_cmd)
94endif
95
96aicasm/aicasm: aicasm/*.[chyl]
97	$(MAKE) -C aicasm
98