blob: e0188ecd85b229950c8a8234ec410ef589fa9c45 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#
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
9subdir- += aicasm
10
11obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx.o
12obj-$(CONFIG_SCSI_AIC79XX) += aic79xx.o
13
14# Core Fast -> U160 files
15aic7xxx-y += aic7xxx_core.o \
16 aic7xxx_93cx6.o
17aic7xxx-$(CONFIG_EISA) += aic7770.o
18aic7xxx-$(CONFIG_PCI) += aic7xxx_pci.o
19aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += aic7xxx_reg_print.o
20
21# Platform Specific Fast -> U160 Files
22aic7xxx-y += aic7xxx_osm.o \
23 aic7xxx_proc.o
24aic7xxx-$(CONFIG_EISA) += aic7770_osm.o
25aic7xxx-$(CONFIG_PCI) += aic7xxx_osm_pci.o
26
27# Core U320 files
28aic79xx-y += aic79xx_core.o \
29 aic79xx_pci.o
30aic79xx-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += aic79xx_reg_print.o
31
32# Platform Specific U320 Files
33aic79xx-y += aic79xx_osm.o \
34 aic79xx_proc.o \
35 aic79xx_osm_pci.o
36
Linus Torvalds1da177e2005-04-16 15:20:36 -070037ifdef WARNINGS_BECOME_ERRORS
Vegard Nossum93a38fa2008-01-24 23:02:52 +010038ccflags-y += -Werror
Linus Torvalds1da177e2005-04-16 15:20:36 -070039endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
41# Files generated that shall be removed upon make clean
42clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
43clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
44
45# Dependencies for generated files need to be listed explicitly
46
Sam Ravnborga3eadd72008-02-06 23:05:33 +010047$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
48$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
Linus Torvalds1da177e2005-04-16 15:20:36 -070049
Vegard Nossum93a38fa2008-01-24 23:02:52 +010050aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h
Linus Torvalds1da177e2005-04-16 15:20:36 -070051aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c
52
53aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
54 -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
55
56ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
Vegard Nossum93a38fa2008-01-24 23:02:52 +010057$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
Jakub Kicinski516b7db2017-07-18 18:58:34 -070058 $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \
Linus Torvalds1da177e2005-04-16 15:20:36 -070059 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
Jakub Kicinski516b7db2017-07-18 18:58:34 -070060 $(srctree)/$(src)/aic7xxx.seq
Vegard Nossum93a38fa2008-01-24 23:02:52 +010061
Michał Mirosław3ee25e82017-08-04 01:28:08 +020062$(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h
63 @true
Vegard Nossum93a38fa2008-01-24 23:02:52 +010064else
65$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
Linus Torvalds1da177e2005-04-16 15:20:36 -070066endif
67
Vegard Nossum93a38fa2008-01-24 23:02:52 +010068aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h
Linus Torvalds1da177e2005-04-16 15:20:36 -070069aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c
70
71aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
72 -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
73
74ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
Vegard Nossum93a38fa2008-01-24 23:02:52 +010075$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
Jakub Kicinski516b7db2017-07-18 18:58:34 -070076 $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \
Linus Torvalds1da177e2005-04-16 15:20:36 -070077 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
Jakub Kicinski516b7db2017-07-18 18:58:34 -070078 $(srctree)/$(src)/aic79xx.seq
Vegard Nossum93a38fa2008-01-24 23:02:52 +010079
Michał Mirosław3ee25e82017-08-04 01:28:08 +020080$(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h
81 @true
Vegard Nossum93a38fa2008-01-24 23:02:52 +010082else
83$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
Linus Torvalds1da177e2005-04-16 15:20:36 -070084endif
85
Jakub Kicinski516b7db2017-07-18 18:58:34 -070086$(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl]
87 $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/