Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # SPDX-License-Identifier: GPL-2.0
  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. # Let kbuild descend into aicasm when cleaning
  8. subdir- += aicasm
  9. obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx.o
  10. obj-$(CONFIG_SCSI_AIC79XX) += aic79xx.o
  11. # Core Fast -> U160 files
  12. aic7xxx-y += aic7xxx_core.o \
  13. aic7xxx_93cx6.o
  14. aic7xxx-$(CONFIG_EISA) += aic7770.o
  15. aic7xxx-$(CONFIG_PCI) += aic7xxx_pci.o
  16. aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += aic7xxx_reg_print.o
  17. # Platform Specific Fast -> U160 Files
  18. aic7xxx-y += aic7xxx_osm.o \
  19. aic7xxx_proc.o
  20. aic7xxx-$(CONFIG_EISA) += aic7770_osm.o
  21. aic7xxx-$(CONFIG_PCI) += aic7xxx_osm_pci.o
  22. # Core U320 files
  23. aic79xx-y += aic79xx_core.o \
  24. aic79xx_pci.o
  25. aic79xx-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += aic79xx_reg_print.o
  26. # Platform Specific U320 Files
  27. aic79xx-y += aic79xx_osm.o \
  28. aic79xx_proc.o \
  29. aic79xx_osm_pci.o
  30. ccflags-y += -Idrivers/scsi
  31. ifdef WARNINGS_BECOME_ERRORS
  32. ccflags-y += -Werror
  33. endif
  34. # Files generated that shall be removed upon make clean
  35. clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
  36. clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
  37. # Dependencies for generated files need to be listed explicitly
  38. $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
  39. $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
  40. aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h
  41. aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c
  42. aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
  43. -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
  44. ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
  45. $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
  46. $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \
  47. $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
  48. $(srctree)/$(src)/aic7xxx.seq
  49. $(aic7xxx-gen-y): $(objtree)/$(obj)/aic7xxx_seq.h
  50. @true
  51. else
  52. $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
  53. endif
  54. aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h
  55. aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c
  56. aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
  57. -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
  58. ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
  59. $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
  60. $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \
  61. $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
  62. $(srctree)/$(src)/aic79xx.seq
  63. $(aic79xx-gen-y): $(objtree)/$(obj)/aic79xx_seq.h
  64. @true
  65. else
  66. $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
  67. endif
  68. $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl]
  69. $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/