aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/aic7xxx
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2014-01-07 19:33:17 +0000
committerScott Long <scottl@FreeBSD.org>2014-01-07 19:33:17 +0000
commit50b464aa1a87076b331f38021a9915a75bdeacb5 (patch)
tree579e19cfd8bb738f48a901c328fe79035fae08f8 /sys/modules/aic7xxx
parent955a2deb52a33690d79a3525c2d8131e1750058b (diff)
Notes
Diffstat (limited to 'sys/modules/aic7xxx')
-rw-r--r--sys/modules/aic7xxx/Makefile16
-rw-r--r--sys/modules/aic7xxx/ahc/Makefile15
-rw-r--r--sys/modules/aic7xxx/ahc/ahc_eisa/Makefile7
-rw-r--r--sys/modules/aic7xxx/ahc/ahc_isa/Makefile7
-rw-r--r--sys/modules/aic7xxx/ahc/ahc_pci/Makefile5
-rw-r--r--sys/modules/aic7xxx/ahd/Makefile10
6 files changed, 43 insertions, 17 deletions
diff --git a/sys/modules/aic7xxx/Makefile b/sys/modules/aic7xxx/Makefile
index 08567a624528..9bf3e52fd196 100644
--- a/sys/modules/aic7xxx/Makefile
+++ b/sys/modules/aic7xxx/Makefile
@@ -3,4 +3,20 @@
SUBDIR= ahc ahd
+firmware: aicasm/aicasm ahdfirmware ahcfirmware
+
+aicasm/aicasm:
+ ( cd ${.CURDIR}/aicasm ; ${MAKE} aicasm )
+
+ahdfirmware:
+ ( cd ${.CURDIR}/ahd ; ${MAKE} ahdfirmware )
+
+ahcfirmware:
+ ( cd ${.CURDIR}/ahc ; ${MAKE} ahcfirmware )
+
+cleanfirmware:
+ ( cd .${CURDIR}/aicasm ; ${MAKE} clean )
+ ( cd .${CURDIR}/ahc ; ${MAKE} cleanfirmware )
+ ( cd .${CURDIR}/ahd ; ${MAKE} cleanfirmware )
+
.include <bsd.subdir.mk>
diff --git a/sys/modules/aic7xxx/ahc/Makefile b/sys/modules/aic7xxx/ahc/Makefile
index b69fbaf83280..0b1c557eae5e 100644
--- a/sys/modules/aic7xxx/ahc/Makefile
+++ b/sys/modules/aic7xxx/ahc/Makefile
@@ -15,21 +15,34 @@ REG_PRINT_OPT= -p aic7xxx_reg_print.c
.endif
BEFORE_DEPEND = ${GENSRCS}
+../aicasm/aicasm: ${.CURDIR}/../../../dev/aic7xxx/aicasm/*.[chyl]
+ ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; )
+
+.if make(ahcfirmware)
+ahcfirmware: ${GENSRCS}
${GENSRCS}: \
${.CURDIR}/../../../dev/aic7xxx/aic7xxx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h
- aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
+ ../aicasm/aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi \
-I${.CURDIR}/../../../dev/aic7xxx \
-o aic7xxx_seq.h -r aic7xxx_reg.h \
${REG_PRINT_OPT} \
-i ${.CURDIR}/../../../dev/aic7xxx/aic7xxx_osm.h \
${.CURDIR}/../../../dev/aic7xxx/aic7xxx.seq
+.else
+${GENSRCS}:
+ @echo "Error: ${.TARGET} is missing. Run 'make ahcfirmware'"
+.endif
+
SRCS= ${GENSRCS}
SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c aic7770.c
SRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h
SRCS+= device_if.h bus_if.h pci_if.h
+.if make(cleanfirmware)
+cleanfirmware: clean
CLEANFILES= ${GENSRCS}
+.endif
.include <bsd.kmod.mk>
diff --git a/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile b/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile
index 5e5d9c208857..992c118c5656 100644
--- a/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile
+++ b/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile
@@ -4,15 +4,10 @@
.PATH: ${.CURDIR}/../../../../dev/aic7xxx
KMOD= ahc_eisa
-../aic7xxx_reg.h:
- ( cd .. ; ${MAKE} aic7xxx_reg.h )
-
-SRCS= ahc_eisa.c ../aic7xxx_reg.h
+SRCS= ahc_eisa.c
SRCS+= device_if.h bus_if.h eisa_if.h
SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I..
-CLEANFILES= ../aic7xxx_reg.h ../aic7xxx_seq.h
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/aic7xxx/ahc/ahc_isa/Makefile b/sys/modules/aic7xxx/ahc/ahc_isa/Makefile
index 965e74db9c32..f479a15af54c 100644
--- a/sys/modules/aic7xxx/ahc/ahc_isa/Makefile
+++ b/sys/modules/aic7xxx/ahc/ahc_isa/Makefile
@@ -4,15 +4,10 @@
.PATH: ${.CURDIR}/../../../../dev/aic7xxx
KMOD= ahc_isa
-../aic7xxx_reg.h:
- ( cd .. ; ${MAKE} aic7xxx_reg.h )
-
-SRCS= ahc_isa.c ../aic7xxx_reg.h
+SRCS= ahc_isa.c
SRCS+= device_if.h bus_if.h pci_if.h isa_if.h
SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I..
-CLEANFILES= ../aic7xxx_reg.h ../aic7xxx_seq.h
-
.include <bsd.kmod.mk>
diff --git a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
index c6e85598aabd..6535d2e9d72a 100644
--- a/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
+++ b/sys/modules/aic7xxx/ahc/ahc_pci/Makefile
@@ -4,10 +4,7 @@
.PATH: ${.CURDIR}/../../../../dev/aic7xxx
KMOD= ahc_pci
-../aic7xxx_reg.h:
- ( cd .. ; ${MAKE} aic7xxx_reg.h )
-
-SRCS= ahc_pci.c aic7xxx_pci.c ../aic7xxx_reg.h
+SRCS= ahc_pci.c aic7xxx_pci.c
SRCS+= device_if.h bus_if.h pci_if.h
SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
diff --git a/sys/modules/aic7xxx/ahd/Makefile b/sys/modules/aic7xxx/ahd/Makefile
index b1e790063ef3..79c96ecb261f 100644
--- a/sys/modules/aic7xxx/ahd/Makefile
+++ b/sys/modules/aic7xxx/ahd/Makefile
@@ -15,6 +15,8 @@ REG_PRINT_OPT= -p aic79xx_reg_print.c
.endif
BEFORE_DEPEND= ${GENSRCS}
+.if make(ahdfirmware)
+ahdfirmware: ${GENSRCS}
${GENSRCS}: \
${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq} \
${.CURDIR}/../../../cam/scsi/scsi_message.h
@@ -24,13 +26,21 @@ ${GENSRCS}: \
${REG_PRINT_OPT} \
-i ${.CURDIR}/../../../dev/aic7xxx/aic79xx_osm.h \
${.CURDIR}/../../../dev/aic7xxx/aic79xx.seq
+.else
+${GENSRCS}:
+ @echo "Error: ${.TARGET} is missing. Run 'make ahdfirmware'."
+.endif
+
SRCS= ${GENSRCS}
SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c
SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h
SRCS+= device_if.h bus_if.h pci_if.h
+.if make(cleanfirmware)
+cleanfirmware: clean
CLEANFILES= ${GENSRCS}
+.endif
.include <bsd.kmod.mk>