1SYSDIR?=${SRCTOP}/sys 2.include "${SYSDIR}/conf/kern.opts.mk" 3 4.PATH: ${SYSDIR}/dev/aic7xxx 5KMOD= ahc 6SUBDIR+= ahc_isa ahc_pci 7 8GENSRCS= aic7xxx_seq.h aic7xxx_reg.h 9# AHC_REG_PRETTY_PRINT=1 10REG_PRINT_OPT= 11.ifdef AHC_REG_PRETTY_PRINT 12GENSRCS+= aic7xxx_reg_print.c 13CFLAGS+= -DAHC_REG_PRETTY_PRINT=1 14REG_PRINT_OPT= -p aic7xxx_reg_print.c 15.endif 16BEFORE_DEPEND = ${GENSRCS} 17 18../aicasm/aicasm: ${SYSDIR}/dev/aic7xxx/aicasm/*.[chyl] 19 ( cd ${.CURDIR}/../aicasm; ${MAKE} aicasm; ) 20 21.if make(ahcfirmware) 22ahcfirmware: ${GENSRCS} 23${GENSRCS}: \ 24 ${SYSDIR}/dev/aic7xxx/aic7xxx.{reg,seq} \ 25 ${SYSDIR}/cam/scsi/scsi_message.h 26 ../aicasm/aicasm ${INCLUDES} -I${SYSDIR}/cam/scsi \ 27 -I${SYSDIR}/dev/aic7xxx \ 28 -o aic7xxx_seq.h -r aic7xxx_reg.h \ 29 ${REG_PRINT_OPT} \ 30 -i "<dev/aic7xxx/aic7xxx_osm.h>" \ 31 ${SYSDIR}/dev/aic7xxx/aic7xxx.seq 32.elif defined(.MAKE.LEVEL) 33# This target interfers with fmake's world view and causes this message 34# to appear when building the tree from 8.x worlds where fmake is the 35# default. fmake doens't define .MAKE.LEVEL so key off that to omit it, 36# while still allowing more-modern makes to theoretically update things. 37${GENSRCS}: .NOMETA 38 @echo "Error: ${.TARGET} is missing. Run 'make ahcfirmware'" 39.endif 40 41 42SRCS= ${GENSRCS} 43SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c aic7770.c 44SRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h 45SRCS+= device_if.h bus_if.h pci_if.h 46 47.if make(cleanfirmware) 48cleanfirmware: clean 49CLEANFILES= ${GENSRCS} 50.endif 51 52EXPORT_SYMS= YES 53 54.include <bsd.kmod.mk> 55