devices/Kbuild.in
author Florian Pose <fp@igh.de>
Wed, 14 Feb 2018 11:46:03 +0100
branchstable-1.5
changeset 2723 37d89f56e9f1
parent 2685 740291442c05
child 2709 e0c2f17ebed1
permissions -rw-r--r--
Do not call watchdog function while frames are received.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  $Id$
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
     5
#  Copyright (C) 2006-2008  Florian Pose, Ingenieurgemeinschaft IgH
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  This file is part of the IgH EtherCAT Master.
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
     9
#  The IgH EtherCAT Master is free software; you can redistribute it and/or
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    10
#  modify it under the terms of the GNU General Public License version 2, as
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    11
#  published by the Free Software Foundation.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
#
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    13
#  The IgH EtherCAT Master is distributed in the hope that it will be useful,
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    16
#  Public License for more details.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    18
#  You should have received a copy of the GNU General Public License along
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    19
#  with the IgH EtherCAT Master; if not, write to the Free Software
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
#
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    22
#  ---
2421
bc2d4bf9cbe5 Removed trailing spaces.
Florian Pose <fp@igh-essen.com>
parents: 2216
diff changeset
    23
#
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    24
#  The license mentioned above concerns the source code only. Using the
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    25
#  EtherCAT technology and brand is only permitted in compliance with the
1326
ef907b0b5125 merge -c1603 branches/stable-1.4: Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1234
diff changeset
    26
#  industrial property and similar rights of Beckhoff Automation GmbH.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
#
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    28
#  ---
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1353
diff changeset
    29
#
892
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 732
diff changeset
    30
#  vim: syntax=make
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 732
diff changeset
    31
#
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
#------------------------------------------------------------------------------
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    34
REV := $(shell if test -s $(src)/../revision; then \
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    35
		cat $(src)/../revision; \
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    36
	else \
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    37
		hg id -i $(src)/.. 2>/dev/null || echo "unknown"; \
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    38
	fi)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
1540
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    40
ifeq (@ENABLE_GENERIC@,1)
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    41
	EC_GENERIC_OBJ := generic.o
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    42
	obj-m += ec_generic.o
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    43
	ec_generic-objs := $(EC_GENERIC_OBJ)
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    44
	CFLAGS_$(EC_GENERIC_OBJ) = -DREV=$(REV)
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    45
endif
49430a3fe73d Basic generic Ethernet device module.
Florian Pose <fp@igh-essen.com>
parents: 1528
diff changeset
    46
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 685
diff changeset
    47
ifeq (@ENABLE_8139TOO@,1)
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 685
diff changeset
    48
	EC_8139TOO_OBJ := 8139too-@KERNEL_8139TOO@-ethercat.o
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    49
	obj-m += ec_8139too.o
584
150c8a1caf25 Fixed REV variable in devices Kbuild file.
Florian Pose <fp@igh-essen.com>
parents: 582
diff changeset
    50
	ec_8139too-objs := $(EC_8139TOO_OBJ)
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    51
	CFLAGS_$(EC_8139TOO_OBJ) = -DREV=$(REV)
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    52
endif
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    53
2549
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2421
diff changeset
    54
ifeq (@ENABLE_CCAT@,1)
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2421
diff changeset
    55
	obj-m += ccat/
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2421
diff changeset
    56
endif
933a1b36b05f Add ccat driver for Beckhoff CCAT communication controller in Beckhoff CX20xx device
Patrick Bruenn <p.bruenn@beckhoff.com>
parents: 2421
diff changeset
    57
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 685
diff changeset
    58
ifeq (@ENABLE_E100@,1)
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 685
diff changeset
    59
	EC_E100_OBJ := e100-@KERNEL_E100@-ethercat.o
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    60
	obj-m += ec_e100.o
584
150c8a1caf25 Fixed REV variable in devices Kbuild file.
Florian Pose <fp@igh-essen.com>
parents: 582
diff changeset
    61
	ec_e100-objs := $(EC_E100_OBJ)
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    62
	CFLAGS_$(EC_E100_OBJ) = -DREV=$(REV)
582
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    63
endif
39f1704b0c99 Added --enable-8139too; cleaned up configure.ac and devices/Kbuild.
Florian Pose <fp@igh-essen.com>
parents: 581
diff changeset
    64
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 685
diff changeset
    65
ifeq (@ENABLE_E1000@,1)
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 897
diff changeset
    66
	obj-m += e1000/
667
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 585
diff changeset
    67
endif
9feff35c9617 First version with e1000 driver (to be continued...)
Florian Pose <fp@igh-essen.com>
parents: 585
diff changeset
    68
2216
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
    69
ifeq (@ENABLE_E1000E@,1)
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
    70
	obj-m += e1000e/
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
    71
endif
37c77787ea29 Added e1000e driver for 2.6.34. Thanks to Siwei Zhuang.
Florian Pose <fp@igh-essen.com>
parents: 1809
diff changeset
    72
2685
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2549
diff changeset
    73
ifeq (@ENABLE_IGB@,1)
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2549
diff changeset
    74
	obj-m += igb/
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2549
diff changeset
    75
endif
740291442c05 Added clean igb driver from kernel 3.18 (no EtherCAT yet).
Florian Pose <fp@igh.de>
parents: 2549
diff changeset
    76
1353
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    77
ifeq (@ENABLE_R8169@,1)
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    78
	EC_R8169_OBJ := r8169-@KERNEL_R8169@-ethercat.o
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    79
	obj-m += ec_r8169.o
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    80
	ec_r8169-objs := $(EC_R8169_OBJ)
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1453
diff changeset
    81
	CFLAGS_$(EC_R8169_OBJ) = -DREV=$(REV)
1353
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    82
endif
22b1de4c74e4 First version of r8169 driver.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    83
1453
79042b9458b1 Symbol versions; Makefile improvements.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    84
KBUILD_EXTRA_SYMBOLS := \
1809
586be70ff70a Improved handling and installation of the modules' symbol versions.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
    85
	@abs_top_builddir@/$(LINUX_SYMVERS) \
586be70ff70a Improved handling and installation of the modules' symbol versions.
Florian Pose <fp@igh-essen.com>
parents: 1540
diff changeset
    86
	@abs_top_builddir@/master/$(LINUX_SYMVERS)
1453
79042b9458b1 Symbol versions; Makefile improvements.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
    87
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    88
#------------------------------------------------------------------------------