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