devices/e1000e/Kbuild.in
author Florian Pose <fp@gh.de>
Tue, 03 May 2016 15:14:42 +0200
changeset 2645 b7ac213beac5
parent 2589 2b9c78543663
permissions -rw-r--r--
Do not touch AL state of EoE slaves.
2076
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  $Id$
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
1baafcd263cc 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
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
1baafcd263cc 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.
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
1baafcd263cc 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
1baafcd263cc 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
1baafcd263cc 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.
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
#
1baafcd263cc 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,
1baafcd263cc 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
1baafcd263cc 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
1baafcd263cc 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.
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#
1baafcd263cc 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
1baafcd263cc 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
1baafcd263cc 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
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
#
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
#  ---
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    23
#
2076
1baafcd263cc 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
1baafcd263cc 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
1baafcd263cc 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.
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
#
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
#  ---
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
#
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
#  vim: syntax=make
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
#
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
#------------------------------------------------------------------------------
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
TOPDIR := $(src)/../..
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
1baafcd263cc 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 \
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
		cat $(TOPDIR)/revision; \
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
	else \
1baafcd263cc 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"; \
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
	fi)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
1baafcd263cc 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)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
	EC_E1000E_OBJ := \
1baafcd263cc 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 \
1baafcd263cc 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 \
1baafcd263cc 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 \
1baafcd263cc 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 \
1baafcd263cc 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 \
1baafcd263cc 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
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    50
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    51
	ifeq (@E1000E_LAYOUT@,2)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    52
		EC_E1000E_OBJ += \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    53
			80003es2lan-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    54
			mac-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    55
			manage-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    56
			nvm-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    57
			ptp-@KERNEL_E1000E@-ethercat.o
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    58
	endif
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    59
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    60
	ifeq (@E1000E_LAYOUT@,1)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    61
		EC_E1000E_OBJ += \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    62
			80003es2lan-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    63
			mac-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    64
			manage-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    65
			nvm-@KERNEL_E1000E@-ethercat.o
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    66
	endif
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    67
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    68
	ifeq (@E1000E_LAYOUT@,0)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    69
		EC_E1000E_OBJ += \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    70
			es2lan-@KERNEL_E1000E@-ethercat.o \
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    71
			lib-@KERNEL_E1000E@-ethercat.o
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    72
	endif
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    73
2076
1baafcd263cc 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
1baafcd263cc 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)
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents: 2076
diff changeset
    76
2076
1baafcd263cc 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)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
endif
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
KBUILD_EXTRA_SYMBOLS := \
1baafcd263cc 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) \
1baafcd263cc 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)
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
1baafcd263cc Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
#------------------------------------------------------------------------------