Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # Makefile for the Linux aic7xxx SCSI driver. |
| 3 | # |
| 4 | # $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#8 $ |
| 5 | # |
| 6 | |
| 7 | # Let kbuild descend into aicasm when cleaning |
| 8 | subdir- += aicasm |
| 9 | |
| 10 | obj-$(CONFIG_SCSI_AIC7XXX) += aic7xxx.o |
| 11 | obj-$(CONFIG_SCSI_AIC79XX) += aic79xx.o |
| 12 | |
| 13 | # Core Fast -> U160 files |
| 14 | aic7xxx-y += aic7xxx_core.o \ |
| 15 | aic7xxx_93cx6.o |
| 16 | aic7xxx-$(CONFIG_EISA) += aic7770.o |
| 17 | aic7xxx-$(CONFIG_PCI) += aic7xxx_pci.o |
| 18 | aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += aic7xxx_reg_print.o |
| 19 | |
| 20 | # Platform Specific Fast -> U160 Files |
| 21 | aic7xxx-y += aic7xxx_osm.o \ |
| 22 | aic7xxx_proc.o |
| 23 | aic7xxx-$(CONFIG_EISA) += aic7770_osm.o |
| 24 | aic7xxx-$(CONFIG_PCI) += aic7xxx_osm_pci.o |
| 25 | |
| 26 | # Core U320 files |
| 27 | aic79xx-y += aic79xx_core.o \ |
| 28 | aic79xx_pci.o |
| 29 | aic79xx-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += aic79xx_reg_print.o |
| 30 | |
| 31 | # Platform Specific U320 Files |
| 32 | aic79xx-y += aic79xx_osm.o \ |
| 33 | aic79xx_proc.o \ |
| 34 | aic79xx_osm_pci.o |
| 35 | |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 36 | ccflags-y += -Idrivers/scsi |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | ifdef WARNINGS_BECOME_ERRORS |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 38 | ccflags-y += -Werror |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | |
| 41 | # Files generated that shall be removed upon make clean |
| 42 | clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c |
| 43 | clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c |
| 44 | |
| 45 | # Dependencies for generated files need to be listed explicitly |
| 46 | |
Sam Ravnborg | a3eadd7 | 2008-02-06 23:05:33 +0100 | [diff] [blame] | 47 | $(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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 50 | aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c |
| 52 | |
| 53 | aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ |
| 54 | -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h |
| 55 | |
| 56 | ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 57 | $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 58 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ |
| 59 | $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ |
| 60 | $(src)/aic7xxx.seq |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 61 | |
| 62 | $(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h |
| 63 | else |
| 64 | $(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | endif |
| 66 | |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 67 | aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c |
| 69 | |
| 70 | aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ |
| 71 | -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h |
| 72 | |
| 73 | ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 74 | $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ |
| 76 | $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ |
| 77 | $(src)/aic79xx.seq |
Vegard Nossum | 93a38fa | 2008-01-24 23:02:52 +0100 | [diff] [blame] | 78 | |
| 79 | $(aic79xx-gen-y): $(obj)/aic79xx_seq.h |
| 80 | else |
| 81 | $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | endif |
| 83 | |
| 84 | $(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] |
| 85 | $(MAKE) -C $(src)/aicasm |