1
2# $FreeBSD$
3
4.PATH:	${.CURDIR}/../../../dev/aic7xxx
5KMOD=	ahd
6
7WERROR=
8GENSRCS= aic79xx_seq.h aic79xx_reg.h
9REG_PRINT_OPT=
10AHD_REG_PRETTY_PRINT=1
11.ifdef AHD_REG_PRETTY_PRINT
12GENSRCS += aic79xx_reg_print.c
13CFLAGS+= -DAHD_REG_PRETTY_PRINT=1
14REG_PRINT_OPT= -p aic79xx_reg_print.c
15.endif
16BEFORE_DEPEND= ${GENSRCS}
17
18.if make(ahdfirmware)
19ahdfirmware: ${GENSRCS}
20${GENSRCS}:								 \
21		${.CURDIR}/../../../dev/aic7xxx/aic79xx.{reg,seq}	 \
22		${.CURDIR}/../../../cam/scsi/scsi_message.h
23	aicasm ${INCLUDES} -I${.CURDIR}/../../../cam/scsi	 \
24			-I${.CURDIR}/../../../dev/aic7xxx		 \
25			-o aic79xx_seq.h -r aic79xx_reg.h		 \
26			${REG_PRINT_OPT}				 \
27			-i ${.CURDIR}/../../../dev/aic7xxx/aic79xx_osm.h \
28			${.CURDIR}/../../../dev/aic7xxx/aic79xx.seq
29.else
30${GENSRCS}:
31	@echo "Error: ${.TARGET} is missing.  Run 'make ahdfirmware'."
32.endif
33
34
35SRCS= ${GENSRCS}
36SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c
37SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h
38SRCS+= device_if.h bus_if.h pci_if.h
39
40.if make(cleanfirmware)
41cleanfirmware: clean
42CLEANFILES= ${GENSRCS}
43.endif
44
45.include <bsd.kmod.mk>
46
47CWARNFLAGS.ahd_pci.c=	${NO_WCONSTANT_CONVERSION}
48CWARNFLAGS+=		${CWARNFLAGS.${.IMPSRC:T}}
49