devices/e1000e/Kbuild.in
author Florian Pose <fp@igh-essen.com>
Fri, 16 Sep 2016 12:35:09 +0200
branchstable-1.5
changeset 2658 7690a5df7539
parent 2585 26480934a057
permissions -rw-r--r--
Use SYNC0 + SYNC1 cycle times for cyclic start time generation.
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
#
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
#  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
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
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
ifeq (@ENABLE_E1000E@,1)
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
	EC_E1000E_OBJ := \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
		82571-@KERNEL_E1000E@-ethercat.o \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
		ethtool-@KERNEL_E1000E@-ethercat.o \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
		ich8lan-@KERNEL_E1000E@-ethercat.o \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
		netdev-@KERNEL_E1000E@-ethercat.o \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
		param-@KERNEL_E1000E@-ethercat.o \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
		phy-@KERNEL_E1000E@-ethercat.o
2491
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    50
2585
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    51
	ifeq (@E1000E_LAYOUT@,2)
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    52
		EC_E1000E_OBJ += \
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    53
			80003es2lan-@KERNEL_E1000E@-ethercat.o \
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    54
			mac-@KERNEL_E1000E@-ethercat.o \
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    55
			manage-@KERNEL_E1000E@-ethercat.o \
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    56
			nvm-@KERNEL_E1000E@-ethercat.o \
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    57
			ptp-@KERNEL_E1000E@-ethercat.o
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    58
	endif
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    59
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    60
	ifeq (@E1000E_LAYOUT@,1)
2491
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    61
		EC_E1000E_OBJ += \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    62
			80003es2lan-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    63
			mac-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    64
			manage-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    65
			nvm-@KERNEL_E1000E@-ethercat.o
2585
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    66
	endif
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    67
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2491
diff changeset
    68
	ifeq (@E1000E_LAYOUT@,0)
2491
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    69
		EC_E1000E_OBJ += \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    70
			es2lan-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    71
			lib-@KERNEL_E1000E@-ethercat.o
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    72
	endif
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    73
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    74
	obj-m += ec_e1000e.o
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
	ec_e1000e-objs := $(EC_E1000E_OBJ)
2491
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    76
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    77
	CFLAGS_netdev-@KERNEL_E1000E@-ethercat.o = -DREV=$(REV)
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
endif
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
KBUILD_EXTRA_SYMBOLS := \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
	@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
    82
	@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
    83
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
#------------------------------------------------------------------------------