Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 12 additions & 40 deletions drivers/net/ethernet/intel/i40e/Makefile
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
################################################################################
#
# Intel Ethernet Controller XL710 Family Linux Driver
# Copyright(c) 2013 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.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
#
# Contact Information:
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
#
################################################################################

#
# Makefile for the Intel(R) Ethernet Connection XL710 (i40e.ko) driver
#

obj-$(CONFIG_I40E) += i40e.o

i40e-objs := i40e_main.o \
i40e_ethtool.o \
i40e_adminq.o \
i40e_common.o \
i40e_hmc.o \
i40e_lan_hmc.o \
i40e_nvm.o \
i40e_debugfs.o \
i40e_diag.o \
i40e_txrx.o \
i40e_virtchnl_pf.o
i40e_ethtool.o \
i40e_adminq.o \
i40e_common.o \
i40e_hmc.o \
i40e_lan_hmc.o \
i40e_nvm.o \
i40e_debugfs.o \
i40e_diag.o \
i40e_txrx.o \
i40e_ptp.o \
i40e_virtchnl_pf.o

180 changes: 180 additions & 0 deletions drivers/net/ethernet/intel/i40e/Makefile.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
################################################################################
#
# Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
# Copyright(c) 2013 - 2016 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:
# e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
# Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
#
################################################################################

ifneq ($(KERNELRELEASE),)
# kbuild part of makefile
#
# Makefile for the Intel(R) 40-10 Gigabit Ethernet Connection Network Driver
#

obj-$(CONFIG_I40E) += i40e.o

i40e-y := i40e_main.o \
i40e_ethtool.o \
i40e_adminq.o \
i40e_common.o \
i40e_hmc.o \
i40e_lan_hmc.o \
i40e_nvm.o \
i40e_debugfs.o \
i40e_diag.o \
i40e_txrx.o \
i40e_ptp.o \
i40e_virtchnl_pf.o

i40e-$(CONFIG_DCB) += i40e_dcb.o i40e_dcb_nl.o
i40e-$(CONFIG_FCOE:m=y) += i40e_fcoe.o
i40e-y += kcompat.o

else # ifneq($(KERNELRELEASE),)
# normal makefile

DRIVER := i40e

#ifeq (,$(wildcard common.mk))
# $(error Cannot find common.mk build rules)
#else
include /home/ewald/build-iso/pkgs/linux-image/drivers/net/ethernet/intel/i40e/common.mk
#endif

# i40e does not support building on kernels older than 2.6.32
$(call minimum_kver_check,2,6,32)

############################
# Module Install Directory #
############################

# Default to using updates/drivers/net/ethernet/intel/ path, since depmod since
# v3.1 defaults to checking updates folder first, and only checking kernels/
# and extra afterwards. We use updates instead of kernel/* due to desire to
# prevent over-writing built-in modules files.
INSTALL_MOD_DIR ?= updates/drivers/net/ethernet/intel/${DRIVER}

######################
# Kernel Build Macro #
######################

# kernel build function
# ${1} is the kernel build target
# ${2] may contain any extra rules to pass directly to the sub-make process
kernelbuild = ${MAKE} $(if ${GCC_I_SYS},CC:="${GCC_I_SYS}") \
$(if ${EXTRA_CFLAGS},ccflags-y:="${EXTRA_CFLAGS}") \
-C ${KSRC} \
$(if ${KOBJ},O:=${KOBJ}) \
CONFIG_${DRIVER_UPPERCASE}=m \
M:=$(call readlink,.) \
$(if ${INSTALL_MOD_PATH},INSTALL_MOD_PATH:=${INSTALL_MOD_PATH}) \
INSTALL_MOD_DIR:=${INSTALL_MOD_DIR} \
${2} ${1};

###############
# Build rules #
###############

# Standard compilation, with regular output
default:
@+$(call kernelbuild,modules)

# Noisy output, for extra debugging
noisy:
@+$(call kernelbuild,modules,V=1)

# Silence any output generated
silent:
@+$(call kernelbuild,modules,>/dev/null)

# Enable higher warning level
checkwarnings: clean
@+$(call kernelbuild,modules,W=1)

# Run sparse static analyzer
sparse: clean
@+$(call kernelbuild,modules,C=2 CF="-D__CHECK_ENDIAN__ -Wbitwise -Wcontext")

# Run coccicheck static analyzer
ccc: clean
@+$(call kernelbuild,modules,coccicheck MODE=report)

# Build manfiles
manfile:
@gzip -c ../${DRIVER}.${MANSECTION} > ${DRIVER}.${MANSECTION}.gz

# Clean the module subdirectories
clean:
@+$(call kernelbuild,clean)
@-rm -rf *.${MANSECTION}.gz *.ko

# Install the modules and manpage
install: default manfile
@echo "Copying manpages..."
@install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz
@echo "Installing modules..."
@$(call kernelbuild,modules_install)
@echo "Running depmod..."
@$(call cmd_depmod)
ifeq (${cmd_initrd},)
@echo "Unable to update initrd. You may need to do this manually."
else
@echo "Updating initrd..."
-@$(call cmd_initrd)
endif

uninstall:
rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko;
$(call cmd_depmod)
if [ -e ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz ] ; then \
rm -f ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz ; \
fi;

########
# Help #
########
help:
@echo 'Cleaning targets:'
@echo ' clean - Clean files generated by kernel module build'
@echo 'Build targets:'
@echo ' default - Build module(s) with standard verbosity'
@echo ' noisy - Build module(s) with V=1 verbosity -- very noisy'
@echo ' silent - Build module(s), squelching all output'
@echo 'Static Analysis:'
@echo ' checkwarnings - Clean, then build module(s) with W=1 warnings enabled'
@echo ' sparse - Clean, then check module(s) using sparse'
@echo ' ccc - Clean, then check module(s) using coccicheck'
@echo 'Other targets:'
@echo ' manfile - Generate a gzipped manpage'
@echo ' install - Build then install the module(s) and manpage'
@echo ' uninstall - Uninstall the module(s) and manpage'
@echo ' help - Display this help message'
@echo 'Variables:'
@echo ' LINUX_VERSION - Debug tool to force kernel LINUX_VERSION_CODE. Use at your own risk.'
@echo ' W=N - Kernel variable for setting warning levels'
@echo ' V=N - Kernel variable for setting output verbosity'
@echo ' INSTALL_MOD_PATH - Add prefix for the module and manpage installation path'
@echo ' INSTALL_MOD_DIR - Use module directory other than updates/drivers/net/ethernet/intel/${DRIVER}'
@echo ' KSRC - Specifies the full path to the kernel tree to build against'
@echo ' Other variables may be available for tuning make process, see'
@echo ' Kernel Kbuild documentation for more information'

.PHONY: default noisy clean manfile silent sparse ccc install uninstall help

endif # ifneq($(KERNELRELEASE),)
1 change: 1 addition & 0 deletions drivers/net/ethernet/intel/i40e/Module.supported
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i40e.ko external
Loading