aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2008-01-24 17:02:52 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-25 10:26:33 -0500
commit93a38fa2dd83fcaf65b2327fff65e364472388f9 (patch)
tree87cd5be0a3f3da5119c98e263c8a97c253567dae /drivers/scsi/aic7xxx
parenta119ee8ee3045bf559d4cf02d72b112f3de2a15b (diff)
[SCSI] aic7xxx: fix firmware build
This patch adds the proper $(obj) and $(src) prefixes to dependency rules in aic7xxx makefile. Without this patch, there is a remote possibility that parallel make with a different output directory can fail. Also changed the deprecated EXTRA_CFLAGS construct to ccflags-y syntax. Fixed up patch to survive "make drivers/scsi/ -j" with BUILD_FIRMWARE enable. /Sam Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/Makefile45
1 files changed, 18 insertions, 27 deletions
diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
index 9a6ce19a4030..e4f70c563bc2 100644
--- a/drivers/scsi/aic7xxx/Makefile
+++ b/drivers/scsi/aic7xxx/Makefile
@@ -33,11 +33,10 @@ aic79xx-y += aic79xx_osm.o \
33 aic79xx_proc.o \ 33 aic79xx_proc.o \
34 aic79xx_osm_pci.o 34 aic79xx_osm_pci.o
35 35
36EXTRA_CFLAGS += -Idrivers/scsi 36ccflags-y += -Idrivers/scsi
37ifdef WARNINGS_BECOME_ERRORS 37ifdef WARNINGS_BECOME_ERRORS
38EXTRA_CFLAGS += -Werror 38ccflags-y += -Werror
39endif 39endif
40#EXTRA_CFLAGS += -g
41 40
42# Files generated that shall be removed upon make clean 41# Files generated that shall be removed upon make clean
43clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c 42clean-files := aic7xxx_seq.h aic7xxx_reg.h aic7xxx_reg_print.c
@@ -46,53 +45,45 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
46# Dependencies for generated files need to be listed explicitly 45# Dependencies for generated files need to be listed explicitly
47 46
48$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h 47$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
48$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h
49$(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h 49$(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
50$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped 50$(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h
51$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
52 51
53$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_reg.h 52$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h
54$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_reg.h 53$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h
55 54
56aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_seq.h \ 55aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h
57 $(obj)/aic7xxx_reg.h
58aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c 56aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c
59 57
60aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \ 58aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
61 -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h 59 -p $(obj)/aic7xxx_reg_print.c -i aic7xxx_osm.h
62 60
63ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) 61ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
64# Create a dependency chain in generated files 62$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
65# to avoid concurrent invocations of the single
66# rule that builds them all.
67aic7xxx_seq.h: aic7xxx_reg.h
68ifeq ($(CONFIG_AIC7XXX_REG_PRETTY_PRINT),y)
69aic7xxx_reg.h: aic7xxx_reg_print.c
70endif
71$(aic7xxx-gen-y): $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
72 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ 63 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \
73 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ 64 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
74 $(src)/aic7xxx.seq 65 $(src)/aic7xxx.seq
66
67$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h
68else
69$(obj)/aic7xxx_reg_print.c: $(src)/aic7xxx_reg_print.c_shipped
75endif 70endif
76 71
77aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_seq.h \ 72aic79xx-gen-$(CONFIG_AIC79XX_BUILD_FIRMWARE) := $(obj)/aic79xx_reg.h
78 $(obj)/aic79xx_reg.h
79aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c 73aic79xx-gen-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) += $(obj)/aic79xx_reg_print.c
80 74
81aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \ 75aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
82 -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h 76 -p $(obj)/aic79xx_reg_print.c -i aic79xx_osm.h
83 77
84ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) 78ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
85# Create a dependency chain in generated files 79$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
86# to avoid concurrent invocations of the single
87# rule that builds them all.
88aic79xx_seq.h: aic79xx_reg.h
89ifeq ($(CONFIG_AIC79XX_REG_PRETTY_PRINT),y)
90aic79xx_reg.h: aic79xx_reg_print.c
91endif
92$(aic79xx-gen-y): $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
93 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ 80 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \
94 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ 81 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
95 $(src)/aic79xx.seq 82 $(src)/aic79xx.seq
83
84$(aic79xx-gen-y): $(obj)/aic79xx_seq.h
85else
86$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
96endif 87endif
97 88
98$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] 89$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl]