summaryrefslogtreecommitdiffstats
path: root/sys/modules/cxgb/Makefile
blob: 71cbb7add81370d38caf5dd2e36d1beb57c879f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $FreeBSD$
SUBDIR= cxgb
SUBDIR+= ${_toecore}
SUBDIR+= ${_tom}
SUBDIR+= ${_iw_cxgb}
SUBDIR+= cxgb_t3fw

.if defined(SYSDIR)
_sysdir = ${SYSDIR}
.endif

# Based on bsd.kmod.mk but we don't modify SYSDIR in this one.
.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \
    /sys /usr/src/sys
.if !defined(_sysdir) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk)
_sysdir = ${_dir}
.endif
.endfor
.if !defined(_sysdir) || !exists(${_sysdir}/kern/) || \
    !exists(${_sysdir}/conf/kmod.mk)
.error "can't find kernel source tree"
.endif

_toe_header = ${_sysdir}/netinet/toedev.h

.if exists(${_toe_header})
_toecore = toecore
#_tom = tom
.endif

.if ${MACHINE_ARCH} == "i386" && exists(${_toe_header})
_iw_cxgb = iw_cxgb
.endif

.if ${MACHINE_ARCH} == "amd64" && exists(${_toe_header})
_iw_cxgb = iw_cxgb
.endif

.include <bsd.subdir.mk>
OpenPOWER on IntegriCloud