Makefile revision 269812
1172029Spjd
2172029Spjd# $FreeBSD: head/sys/modules/aic7xxx/ahc/Makefile 269812 2014-08-11 14:50:49Z imp $
3172029Spjd
4172029SpjdSYSDIR?=${.CURDIR}/../../..
5172029Spjd.include "${SYSDIR}/conf/kern.opts.mk"
6172029Spjd
7172029Spjd.PATH:	${SYSDIR}/dev/aic7xxx
8172029SpjdKMOD=	ahc
9172029Spjd.if ${MK_EISA} != "no"
10172029SpjdSUBDIR+= ahc_eisa
11172029Spjd.endif
12172029SpjdSUBDIR+= ahc_isa ahc_pci
13172029Spjd
14172029SpjdGENSRCS= aic7xxx_seq.h aic7xxx_reg.h
15172029SpjdAHC_REG_PRETTY_PRINT=1
16172029SpjdREG_PRINT_OPT=
17172029Spjd.ifdef AHC_REG_PRETTY_PRINT
18172029SpjdGENSRCS+= aic7xxx_reg_print.c
19172029SpjdCFLAGS+= -DAHC_REG_PRETTY_PRINT=1
20172029SpjdREG_PRINT_OPT= -p aic7xxx_reg_print.c
21172029Spjd.endif
22172029SpjdBEFORE_DEPEND = ${GENSRCS}
23172029Spjd
24172029Spjd../aicasm/aicasm: ${SYSDIR}/dev/aic7xxx/aicasm/*.[chyl]
25172029Spjd	( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; )
26172029Spjd
27172029Spjd.if make(ahcfirmware)
28172029Spjdahcfirmware: ${GENSRCS}
29172029Spjd${GENSRCS}:								 \
30172029Spjd		${SYSDIR}/dev/aic7xxx/aic7xxx.{reg,seq}	 \
31172029Spjd		${SYSDIR}/cam/scsi/scsi_message.h 
32172029Spjd	../aicasm/aicasm ${INCLUDES} -I${SYSDIR}/cam/scsi	 \
33172029Spjd			-I${SYSDIR}/dev/aic7xxx		 \
34172029Spjd			-o aic7xxx_seq.h -r aic7xxx_reg.h		 \
35172029Spjd			${REG_PRINT_OPT}				 \
36172029Spjd			-i ${SYSDIR}/dev/aic7xxx/aic7xxx_osm.h \
37172029Spjd			${SYSDIR}/dev/aic7xxx/aic7xxx.seq
38172029Spjd.else
39172029Spjd${GENSRCS}:
40172029Spjd	@echo "Error: ${.TARGET} is missing.  Run 'make ahcfirmware'"
41172029Spjd.endif
42172029Spjd
43172029Spjd
44172029SpjdSRCS= ${GENSRCS}
45172029SpjdSRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c aic7770.c
46172029SpjdSRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h
47172029SpjdSRCS+= device_if.h bus_if.h pci_if.h
48172029Spjd
49172029Spjd.if make(cleanfirmware)
50172029Spjdcleanfirmware: clean
51172029SpjdCLEANFILES= ${GENSRCS}
52172029Spjd.endif
53172029Spjd
54172029Spjd.include <bsd.kmod.mk>
55172029Spjd