xref: /src/sys/modules/mt76/mt7921/Makefile (revision 201fc8a55a4832174b5943e17ac90800aebe5772)
1.include <kmod.opts.mk>
2
3DEVDIR=	${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921
4
5.PATH: ${DEVDIR}
6
7KMOD=	if_mt7921
8
9# Common stuff.
10SRCS=	init.c main.c mac.c mcu.c
11
12# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded.
13.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI}
14SRCS+=	pci.c pci_mac.c pci_mcu.c
15.endif
16
17# USB parts; USB can be loaded and is unconditional on any kernel config.
18.if defined(WITH_USB) && ${WITH_USB} > 0
19SRCS+=	usb.c
20.endif
21
22# SDIO parts; SDIO depends on an MMCCAM kernel.
23.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM}
24SRCS+=	sdio.c sdio_mac.c sdio_mcu.c
25.endif
26
27.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0
28SRCS+=	debugfs.c
29CFLAGS+=	-DCONFIG_MT7921_DEBUGFS=${WITH_DEBUGFS}
30.endif
31
32CFLAGS+=	-DKBUILD_MODNAME='"mt7921"'
33CFLAGS+=	-I${DEVDIR}
34
35.include <bsd.kmod.mk>
36