xref: /freebsd/sys/modules/mt76/Makefile.inc (revision 64038db825d64fb4827fc8ee264ea0fa1a046d82)
1# Common information shared by all submodule builds.
2
3COMMONDIR=	${SRCTOP}/sys/contrib/dev/mediatek/mt76
4DEVDIR=		${SRCTOP}/sys/contrib/dev/mediatek/mt76/${MT76_DRIVER_NAME}
5
6KMOD?=		if_${MT76_DRIVER_NAME}
7
8# Bus attachment for the core part and that each driver can check
9# what the common code supports.
10MT76_PCI=		1
11MT76_SDIO=		0
12MT76_USB=		0
13
14# General options for common code so drivers can check.
15MT76_ACPI?=		0
16MT76_CONFIG_PM?=	0
17MT76_SOC_WED?=		0
18
19# Other
20SRCS+=	${LINUXKPI_GENSRCS}
21SRCS+=	opt_wlan.h opt_inet6.h opt_inet.h
22
23# This is true for all architectures we build for.
24CFLAGS+=	-DCONFIG_ARCH_DMA_ADDR_T_64BIT
25
26.if defined(MT76_CONFIG_PM) && ${MT76_CONFIG_PM} > 0
27CFLAGS+=	-DCONFIG_PM
28.endif
29
30.if defined(MT76_SOC_WED) && ${MT76_SOC_WED} > 0
31CFLAGS+=	-DCONFIG_NET_MEDIATEK_SOC_WED
32.endif
33
34CFLAGS+=	-I${COMMONDIR}
35.if ${MT76_DRIVER_NAME} != "mt76_core"
36CFLAGS+=	-I${DEVDIR}
37.endif
38CFLAGS+=	${LINUXKPI_INCLUDES}
39# Helpful after fresh imports.
40#CFLAGS+=	-ferror-limit=0
41
42CFLAGS+=        -DKBUILD_MODNAME='"${MT76_DRIVER_NAME}"'
43CFLAGS+=	-DLINUXKPI_VERSION=70000
44
45