]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | # SPDX-License-Identifier: GPL-2.0 |
1da177e4 LT |
2 | # |
3 | # Makefile for the Linux aic7xxx SCSI driver. | |
4 | # | |
5 | # $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#8 $ | |
6 | # | |
7 | ||
8 | # Let kbuild descend into aicasm when cleaning | |
9 | subdir- += aicasm | |
10 | ||
11 | obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx.o | |
12 | obj-$(CONFIG_SCSI_AIC79XX) += aic79xx.o | |
13 | ||
14 | # Core Fast -> U160 files | |
15 | aic7xxx-y += aic7xxx_core.o \ | |
16 | aic7xxx_93cx6.o | |
17 | aic7xxx-$(CONFIG_EISA) += aic7770.o | |
18 | aic7xxx-$(CONFIG_PCI) += aic7xxx_pci.o | |
19 | aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += aic7xxx_reg_print.o | |
20 | ||
21 | # Platform Specific Fast -> U160 Files | |
22 | aic7xxx-y += aic7xxx_osm.o \ | |
23 | aic7xxx_proc.o | |
24 | aic7xxx-$(CONFIG_EISA) += aic7770_osm.o | |
25 | aic7xxx-$(CONFIG_PCI) += aic7xxx_osm_pci.o | |
26 | ||
27 | # Core U320 files | |
28 | aic79xx-y += aic79xx_core.o \ | |
29 | aic79xx_pci.o | |
30 | aic79xx-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += aic79xx_reg_print.o | |
31 | ||
32 | # Platform Specific U320 Files | |
33 | aic79xx-y += aic79xx_osm.o \ | |
34 | aic79xx_proc.o \ | |
35 | aic79xx_osm_pci.o | |
36 | ||
93a38fa2 | 37 | ccflags-y += -Idrivers/scsi |
1da177e4 | 38 | ifdef WARNINGS_BECOME_ERRORS |
93a38fa2 | 39 | ccflags-y += -Werror |
1da177e4 | 40 | endif |
1da177e4 LT |
41 | |
42 | # Files generated that shall be removed upon make clean | |
43 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c | |
44 | clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c | |
45 | ||
46 | # Dependencies for generated files need to be listed explicitly | |
47 | ||
a3eadd7c SR |
48 | $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h |
49 | $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h | |
1da177e4 | 50 | |
93a38fa2 | 51 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h |
1da177e4 LT |
52 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c |
53 | ||
54 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ | |
55 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h | |
56 | ||
57 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) | |
93a38fa2 | 58 | $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm |
516b7db5 | 59 | $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \ |
1da177e4 | 60 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ |
516b7db5 | 61 | $(srctree)/$(src)/aic7xxx.seq |
93a38fa2 | 62 | |
3ee25e8f MM |
63 | $(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h |
64 | @true | |
93a38fa2 VN |
65 | else |
66 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped | |
1da177e4 LT |
67 | endif |
68 | ||
93a38fa2 | 69 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h |
1da177e4 LT |
70 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c |
71 | ||
72 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ | |
73 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h | |
74 | ||
75 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) | |
93a38fa2 | 76 | $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm |
516b7db5 | 77 | $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \ |
1da177e4 | 78 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ |
516b7db5 | 79 | $(srctree)/$(src)/aic79xx.seq |
93a38fa2 | 80 | |
3ee25e8f MM |
81 | $(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h |
82 | @true | |
93a38fa2 VN |
83 | else |
84 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped | |
1da177e4 LT |
85 | endif |
86 | ||
516b7db5 JK |
87 | $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl] |
88 | $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/ |