master/Kbuild.in
author Patrick Bruenn <p.bruenn@beckhoff.com>
Wed, 23 Apr 2014 17:06:15 +0200
branchstable-1.5
changeset 2555 18c226b66533
parent 2443 2c3ccdde3919
child 2700 93ef210e9b56
permissions -rw-r--r--
replace symlink in example with the real file
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
#
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
     5
#  Copyright (C) 2006-2012  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: 1209
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: 1209
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: 1209
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: 1209
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: 1209
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: 1209
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: 1209
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: 1209
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: 1209
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: 1335
diff changeset
    22
#  ---
2421
bc2d4bf9cbe5 Removed trailing spaces.
Florian Pose <fp@igh-essen.com>
parents: 2269
diff changeset
    23
#
1363
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
    24
#  The license mentioned above concerns the source code only. Using the EtherCAT
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
    25
#  technology and brand is only permitted in compliance with the industrial
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
    26
#  property and similar rights of Beckhoff Automation GmbH.
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
    27
#
11c0b2caa253 Improved and added license headers.
Florian Pose <fp@igh-essen.com>
parents: 1335
diff changeset
    28
#  ---
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
#
892
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 879
diff changeset
    30
#  vi: syntax=make
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 879
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
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
obj-m := ec_master.o
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
847
92266462d411 Saparated ec_sdo_t, ec_sdo_entry_t and ec_sdo_request_t.
Florian Pose <fp@igh-essen.com>
parents: 830
diff changeset
    36
ec_master-objs := \
922
fede1d8f5b71 Added the new ethercat comman-line tool with lsec functionality.
Florian Pose <fp@igh-essen.com>
parents: 919
diff changeset
    37
	cdev.o \
2438
9c3e629a220c Added API for querying CoE emergency requests.
Florian Pose <fp@igh-essen.com>
parents: 2433
diff changeset
    38
	coe_emerg_ring.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    39
	datagram.o \
2269
1d0711235a61 Redundant outputs via datagram pairs.
Florian Pose <fp@igh-essen.com>
parents: 1877
diff changeset
    40
	datagram_pair.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    41
	device.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    42
	domain.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    43
	fmmu_config.o \
1335
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    44
	foe_request.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    45
	fsm_change.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    46
	fsm_coe.o \
1335
09c6fce1ae45 merge -c1616 branches/1.4-foe: Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1326
diff changeset
    47
	fsm_foe.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    48
	fsm_master.o \
1174
235f34ca50e2 Major Pdo configuration change: Read mapping of unknown Pdos during
Florian Pose <fp@igh-essen.com>
parents: 1164
diff changeset
    49
	fsm_pdo.o \
235f34ca50e2 Major Pdo configuration change: Read mapping of unknown Pdos during
Florian Pose <fp@igh-essen.com>
parents: 1164
diff changeset
    50
	fsm_pdo_entry.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    51
	fsm_sii.o \
1831
1875b9fea0ba Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents: 1583
diff changeset
    52
	fsm_slave.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    53
	fsm_slave_config.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    54
	fsm_slave_scan.o \
1831
1875b9fea0ba Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents: 1583
diff changeset
    55
	fsm_soe.o \
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    56
	ioctl.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    57
	mailbox.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    58
	master.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    59
	module.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    60
	pdo.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    61
	pdo_entry.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    62
	pdo_list.o \
2443
2c3ccdde3919 Added interface to read/write register contents; re-worked register requests.
Florian Pose <fp@igh-essen.com>
parents: 2438
diff changeset
    63
	reg_request.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    64
	sdo.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    65
	sdo_entry.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    66
	sdo_request.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    67
	slave.o \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    68
	slave_config.o \
1877
7b77000f9764 Included list of common SoE error messages.
Florian Pose <fp@igh-essen.com>
parents: 1831
diff changeset
    69
	soe_errors.o \
1831
1875b9fea0ba Implemented reading Sercos-over-EtherCAT services. To be continued...
Florian Pose <fp@igh-essen.com>
parents: 1583
diff changeset
    70
	soe_request.o \
1074
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    71
	sync.o \
1209
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    72
	sync_config.o \
8be462afb7f4 Added VoE handler.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    73
	voe_handler.o
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    74
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    75
ifeq (@ENABLE_EOE@,1)
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    76
ec_master-objs += ethernet.o
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 679
diff changeset
    77
endif
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    78
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    79
ifeq (@ENABLE_DEBUG_IF@,1)
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    80
ec_master-objs += debug.o
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    81
endif
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    82
2433
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    83
ifeq (@ENABLE_RTDM@,1)
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    84
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    85
ec_master-objs += rtdm.o
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    86
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    87
ifeq (@ENABLE_XENOMAI@, 1)
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    88
CFLAGS_rtdm.o := -I@XENOMAI_DIR@/include
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    89
endif
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    90
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    91
ifeq (@ENABLE_RTAI@, 1)
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    92
CFLAGS_rtdm.o := -I@RTAI_DIR@/include
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    93
endif
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    94
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    95
ec_master-objs += rtdm-ioctl.o
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    96
CFLAGS_rtdm-ioctl.o := -DEC_IOCTL_RTDM
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    97
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    98
endif # ENABLE_RTDM
3bdd7a747fae Re-worked and seamlessly integrated RTDM interface.
Florian Pose <fp@igh-essen.com>
parents: 2421
diff changeset
    99
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
   100
REV := $(shell if test -s $(src)/../revision; then \
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
   101
		cat $(src)/../revision; \
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
   102
	else \
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
   103
		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
   104
	fi)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   105
1528
dbc617badc33 Switched from Subversion to Mercurial.
Florian Pose <fp@igh-essen.com>
parents: 1363
diff changeset
   106
CFLAGS_module.o := -DREV=$(REV)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   107
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
   108
#------------------------------------------------------------------------------