devices/igb/Kbuild.in
author Edouard Tisserant <edouard.tisserant@gmail.com>
Fri, 14 Sep 2018 17:59:33 +0200
branchstable-1.5
changeset 2710 05359dee3578
parent 2685 740291442c05
permissions -rw-r--r--
rtdmnet module should follow same (un)loading rules as generic module
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  $Id$
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
2685
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
     5
#  Copyright (C) 2006-2017  Florian Pose, Ingenieurgemeinschaft IgH
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  This file is part of the IgH EtherCAT Master.
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
#  The IgH EtherCAT Master is free software; you can redistribute it and/or
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
#  modify it under the terms of the GNU General Public License version 2, as
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
#  published by the Free Software Foundation.
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
#  The IgH EtherCAT Master is distributed in the hope that it will be useful,
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
#  Public License for more details.
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
#  You should have received a copy of the GNU General Public License along
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
#  with the IgH EtherCAT Master; if not, write to the Free Software
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
#  ---
2421
bc2d4bf9cbe5 Removed trailing spaces.
Florian Pose <fp@igh-essen.com>
parents: 2216
diff changeset
    23
#
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
#  The license mentioned above concerns the source code only. Using the
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
#  EtherCAT technology and brand is only permitted in compliance with the
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
#  industrial property and similar rights of Beckhoff Automation GmbH.
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
#  ---
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
#  vim: syntax=make
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
#------------------------------------------------------------------------------
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
TOPDIR := $(src)/../..
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
REV := $(shell if test -s $(TOPDIR)/revision; then \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
		cat $(TOPDIR)/revision; \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
	else \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
		hg id -i $(TOPDIR) 2>/dev/null || echo "unknown"; \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
	fi)
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
2685
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    42
ifeq (@ENABLE_IGB@,1)
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    43
	obj-m += ec_igb.o
2491
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    44
2685
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    45
	ec_igb-objs := \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    46
		e1000_82575-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    47
		e1000_i210-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    48
		e1000_mac-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    49
		e1000_mbx-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    50
		e1000_nvm-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    51
		e1000_phy-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    52
		igb_ethtool-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    53
		igb_hwmon-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    54
		igb_main-@KERNEL_IGB@-ethercat.o \
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    55
		igb_ptp-@KERNEL_IGB@-ethercat.o
2585
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    56
2685
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2585
diff changeset
    57
	CFLAGS_igb_main-@KERNEL_IGB@-ethercat.o = -DREV=$(REV)
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
endif
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
KBUILD_EXTRA_SYMBOLS := \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
	@abs_top_builddir@/$(LINUX_SYMVERS) \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
	@abs_top_builddir@/master/$(LINUX_SYMVERS)
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    63
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    64
#------------------------------------------------------------------------------