################################################################################
#
# Intel PRO/1000 Linux driver
# Copyright(c) 1999 - 2017 Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contact Information:
# Linux NICS <linux.nics@intel.com>
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
#
################################################################################

###########################################################################
# Driver files
FAMILYC = 82571.c ich8lan.c 80003es2lan.c
FAMILYH = 82571.h ich8lan.h 80003es2lan.h

# core driver files
CFILES = netdev.c ethtool.c param.c $(FAMILYC) \
         mac.c nvm.c phy.c manage.c kcompat.c
HFILES = e1000.h hw.h regs.h defines.h \
         mac.h nvm.h phy.h manage.h $(FAMILYH) kcompat.h
ifeq (,$(BUILD_KERNEL))
BUILD_KERNEL=$(shell uname -r)
endif

DRIVER_NAME = e1000e


# Use NO_PTP_SUPPORT compile flag to disable IEEE-1588 PTP(documented in README)
ifneq ($(filter %NO_PTP_SUPPORT,$(CFLAGS_EXTRA)),-DNO_PTP_SUPPORT)
# Do not attempt to enable PTP on kernels that do not support it
ifdef CONFIG_PTP_1588_CLOCK
CFILES += ptp.c
endif # CONFIG_PTP_1588_CLOCK
endif # NO_PTP_SUPPORT


ifdef CONFIG_SMP
  EXTRA_CFLAGS += -D__SMP__
endif

obj-$(CONFIG_E1000E) += $(DRIVER_NAME).o
$(DRIVER_NAME)-objs := $(CFILES:.c=.o)
