#$FreeBSD$

KMODDIR ?= /boot/kernel

.include <bsd.own.mk>

.PATH:  ${.CURDIR}

KMOD    = if_ix
SRCS    = device_if.h bus_if.h pci_if.h
SRCS    += if_ix.c ix_txrx.c ixgbe_osdep_pf.c if_sriov.c if_bypass.c if_fdir.c
SRCS    += ixgbe_netmap.c freebsd_compat_common.c
SRCS    += ixgbe_fw_logging.c
# Shared source
SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c
SRCS    += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
SRCS    += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c
.if exists(ixgbe_e610.c)
SRCS	+= ixgbe_e610.c
.endif
CFLAGS  += -DSMP
CFLAGS  += --system-header-prefix=dev/pci

# If building this driver as a standalone module, or using IXGBE_LEGACY_BUILD,
# keep these flags:
CFLAGS  += -DINET -DINET6 -DIXGBE_STANDALONE_BUILD

# Enable debug messages and sysctls
# CFLAGS  += -DIXGBE_DEBUG

# NOTE: you can only define RSS if the OS version has support (11.0)
#CFLAGS  += -DRSS

# IXGBE_LEGACY_TX can be defined to use the older stack interface,
# however it will limit all transmission to the 0 queue, and is thus
# not recommended.
# CFLAGS += -DIXGBE_LEGACY_TX

# Enable SR-IOV PF support
SRIOV_ENABLE = 0

.if $(SRIOV_ENABLE)
CFLAGS += -DPCI_IOV
SRCS += pci_iov_if.h
.endif

clean:
	rm -f opt_bdg.h device_if.h bus_if.h pci_if.h setdef* *_StripErr
	rm -f *.o *.kld *.ko .depend.*
	rm -f @ export_syms machine x86

.include <bsd.kmod.mk>
