1# $FreeBSD: head/sys/modules/cxgb/Makefile 211690 2010-08-23 06:13:29Z imp $
2SUBDIR= cxgb
3SUBDIR+= ${_toecore}
4SUBDIR+= ${_tom}
5SUBDIR+= ${_iw_cxgb}
6SUBDIR+= cxgb_t3fw
7
8.if defined(SYSDIR)
9_sysdir = ${SYSDIR}
10.endif
11
12# Based on bsd.kmod.mk but we don't modify SYSDIR in this one.
13.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
14 /sys /usr/src/sys
15.if !defined(_sysdir) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
16_sysdir = ${_dir}
17.endif
18.endfor
19.if !defined(_sysdir) || !exists(${_sysdir}/kern/) || \
20 !exists(${_sysdir}/conf/kmod.mk)
21.error "can't find kernel source tree"
22.endif
23
24_toe_header = ${_sysdir}/netinet/toedev.h
25
26.if exists(${_toe_header})
27_toecore = toecore
28#_tom = tom
29.endif
30
31.if ${MACHINE_CPUARCH} == "i386" && exists(${_toe_header})
32_iw_cxgb = iw_cxgb
33.endif
34
35.if ${MACHINE_CPUARCH} == "amd64" && exists(${_toe_header})
36_iw_cxgb = iw_cxgb
37.endif
38
39.include <bsd.subdir.mk>
2SUBDIR= cxgb
3SUBDIR+= ${_toecore}
4SUBDIR+= ${_tom}
5SUBDIR+= ${_iw_cxgb}
6SUBDIR+= cxgb_t3fw
7
8.if defined(SYSDIR)
9_sysdir = ${SYSDIR}
10.endif
11
12# Based on bsd.kmod.mk but we don't modify SYSDIR in this one.
13.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
14 /sys /usr/src/sys
15.if !defined(_sysdir) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
16_sysdir = ${_dir}
17.endif
18.endfor
19.if !defined(_sysdir) || !exists(${_sysdir}/kern/) || \
20 !exists(${_sysdir}/conf/kmod.mk)
21.error "can't find kernel source tree"
22.endif
23
24_toe_header = ${_sysdir}/netinet/toedev.h
25
26.if exists(${_toe_header})
27_toecore = toecore
28#_tom = tom
29.endif
30
31.if ${MACHINE_CPUARCH} == "i386" && exists(${_toe_header})
32_iw_cxgb = iw_cxgb
33.endif
34
35.if ${MACHINE_CPUARCH} == "amd64" && exists(${_toe_header})
36_iw_cxgb = iw_cxgb
37.endif
38
39.include <bsd.subdir.mk>