# SPDX-License-Identifier: GPL-2.0-only
#
# Makefile for Mellanox NODNIC driver
#

#
# Normal in-tree build: controlled by CONFIG_MLX5_NODNIC.
#
# When building this directory explicitly via 'make M=... modules' or as an
# external module via 'make -C <kernel> M=<path> modules', Kbuild sets
# KBUILD_EXTMOD. In that case, build mlx5_nodnic.ko unconditionally (since the user
# explicitly asked for this module), even if CONFIG_MLX5_NODNIC wasn't selected in
# that kernel .config.
#
ifneq ($(KBUILD_EXTMOD),)
obj-m += mlx5_nodnic.o
else
obj-$(CONFIG_MLX5_NODNIC) += mlx5_nodnic.o
endif

mlx5_nodnic-y := main.o en.o tx.o rx.o nodnic_pci_vsc.o health.o


