devices/e1000e/Kbuild.in
author Florian Pose <fp@igh-essen.com>
Tue, 12 Feb 2013 10:32:37 +0100
branchstable-1.5
changeset 2516 3680924f6f87
parent 2491 5e9221a78855
child 2585 26480934a057
permissions -rw-r--r--
Replaced VM_RESERVED for kernel 3.7.
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
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    51
	ifeq (@E1000E_LAYOUT_3_4@,1)
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    52
		EC_E1000E_OBJ += \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    53
			80003es2lan-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    54
			mac-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    55
			manage-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    56
			nvm-@KERNEL_E1000E@-ethercat.o
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    57
	else
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    58
		EC_E1000E_OBJ += \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    59
			es2lan-@KERNEL_E1000E@-ethercat.o \
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    60
			lib-@KERNEL_E1000E@-ethercat.o
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    61
	endif
5e9221a78855 Added e1000e driver for kernel 3.4.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    62
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    63
	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
    64
	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
    65
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    66
	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
    67
endif
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    68
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
KBUILD_EXTRA_SYMBOLS := \
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    70
	@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
    71
	@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
    72
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
#------------------------------------------------------------------------------