1101131Sscottl
2101131Sscottl# $FreeBSD$
3101131Sscottl
4101131Sscottl.PATH:	${.CURDIR}/../../../dev/aic7xxx
5101131SscottlKMOD=	ahd
6101131Sscottl
7140867SimpWERROR=
8136854SruGENSRCS= aic79xx_seq.h aic79xx_reg.h
9109708SgibbsREG_PRINT_OPT=
10109708SgibbsAHD_REG_PRETTY_PRINT=1
11109708Sgibbs.ifdef AHD_REG_PRETTY_PRINT
12109708SgibbsGENSRCS += aic79xx_reg_print.c
13109708SgibbsCFLAGS+= -DAHD_REG_PRETTY_PRINT=1
14109708SgibbsREG_PRINT_OPT= -p aic79xx_reg_print.c
15109708Sgibbs.endif
16109708SgibbsBEFORE_DEPEND= ${GENSRCS}
17101131Sscottl
18270284Sian.if make(ahdfirmware)
19270284Sianahdfirmware: ${GENSRCS}
20109708Sgibbs${GENSRCS}:								 \
21109708Sgibbs		${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq}	 \
22270274Sian		${.CURDIR}/../../../cam/scsi/scsi_message.h
23270274Sian	aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi	 \
24102690Sgibbs			-I${.CURDIR}/../../../dev/aic7xxx		 \
25102690Sgibbs			-o aic79xx_seq.h -r aic79xx_reg.h		 \
26109708Sgibbs			${REG_PRINT_OPT}				 \
27102690Sgibbs			-i ${.CURDIR}/../../../dev/aic7xxx/aic79xx_osm.h \
28102690Sgibbs			${.CURDIR}/../../../dev/aic7xxx/aic79xx.seq
29270284Sian.else
30270284Sian${GENSRCS}:
31270284Sian	@echo "Error: ${.TARGET} is missing.  Run 'make ahdfirmware'."
32270284Sian.endif
33101131Sscottl
34270284Sian
35101131SscottlSRCS= ${GENSRCS}
36101131SscottlSRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c
37101131SscottlSRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h
38101131SscottlSRCS+= device_if.h bus_if.h pci_if.h
39101131Sscottl
40270284Sian.if make(cleanfirmware)
41270284Siancleanfirmware: clean
42109708SgibbsCLEANFILES= ${GENSRCS}
43270284Sian.endif
44101131Sscottl
45101131Sscottl.include <bsd.kmod.mk>
46228805Sdim
47228805SdimCWARNFLAGS.ahd_pci.c=	${NO_WCONSTANT_CONVERSION}
48228805SdimCWARNFLAGS+=		${CWARNFLAGS.${.IMPSRC:T}}
49