Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 #
0003 # Makefile for the Linux aic7xxx SCSI driver.
0004 #
0005 # $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#8 $
0006 #
0007 
0008 # Let kbuild descend into aicasm when cleaning
0009 subdir-                         += aicasm
0010 
0011 obj-$(CONFIG_SCSI_AIC7XXX)      += aic7xxx.o
0012 obj-$(CONFIG_SCSI_AIC79XX)      += aic79xx.o
0013 
0014 # Core Fast -> U160 files
0015 aic7xxx-y                                       += aic7xxx_core.o       \
0016                                                    aic7xxx_93cx6.o
0017 aic7xxx-$(CONFIG_EISA)                          += aic7770.o
0018 aic7xxx-$(CONFIG_PCI)                           += aic7xxx_pci.o
0019 aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)      += aic7xxx_reg_print.o
0020 
0021 # Platform Specific Fast -> U160 Files
0022 aic7xxx-y                                       += aic7xxx_osm.o        \
0023                                                    aic7xxx_proc.o
0024 aic7xxx-$(CONFIG_EISA)                          += aic7770_osm.o
0025 aic7xxx-$(CONFIG_PCI)                           += aic7xxx_osm_pci.o
0026 
0027 # Core U320 files
0028 aic79xx-y                                       += aic79xx_core.o       \
0029                                                    aic79xx_pci.o
0030 aic79xx-$(CONFIG_AIC79XX_REG_PRETTY_PRINT)      += aic79xx_reg_print.o
0031 
0032 # Platform Specific U320 Files
0033 aic79xx-y                                       += aic79xx_osm.o        \
0034                                                    aic79xx_proc.o       \
0035                                                    aic79xx_osm_pci.o
0036 
0037 ifdef WARNINGS_BECOME_ERRORS
0038 ccflags-y += -Werror
0039 endif
0040 
0041 # Files generated that shall be removed upon make clean
0042 clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
0043 clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
0044 
0045 # Dependencies for generated files need to be listed explicitly
0046 
0047 $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
0048 $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
0049 
0050 aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)    := $(obj)/aic7xxx_reg.h
0051 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)  += $(obj)/aic7xxx_reg_print.c
0052 
0053 aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
0054         -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
0055 
0056 ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
0057 $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
0058         $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \
0059                               $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
0060                               $(srctree)/$(src)/aic7xxx.seq
0061 
0062 $(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h
0063         @true
0064 else
0065 $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
0066 endif
0067 
0068 aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE)    := $(obj)/aic79xx_reg.h
0069 aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT)  += $(obj)/aic79xx_reg_print.c
0070 
0071 aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
0072         -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
0073 
0074 ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
0075 $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
0076         $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \
0077                               $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
0078                               $(srctree)/$(src)/aic79xx.seq
0079 
0080 $(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h
0081         @true
0082 else
0083 $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
0084 endif
0085 
0086 $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl]
0087         $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/