master/Kbuild.in
author Florian Pose <fp@igh-essen.com>
Mon, 19 Jan 2009 14:46:55 +0000
branch1.4-foe
changeset 1709 63e4bc918640
parent 1707 11ec009e145d
permissions -rw-r--r--
Implemented going to bootstrap state BOOT.
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
#
1685
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
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
#
1685
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
     9
#  The IgH EtherCAT Master is free software; you can redistribute it and/or
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    10
#  modify it under the terms of the GNU General Public License version 2, as
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
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
#
1685
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    13
#  The IgH EtherCAT Master is distributed in the hope that it will be useful,
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    14
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    15
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    16
#  Public License for more details.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#
1685
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    18
#  You should have received a copy of the GNU General Public License along
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
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
#
1685
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    22
#  Using the EtherCAT technology and brand is permitted in compliance with the
399ef727bf62 Changed licence headers to avoid conflicts with the GPL; restricted licence to GPLv2 only.
Florian Pose <fp@igh-essen.com>
parents: 1174
diff changeset
    23
#  industrial property and similar rights of Beckhoff Automation GmbH.
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
#
892
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 879
diff changeset
    25
#  vi: syntax=make
1e1e567fc53b Added vim modelines and properties.
Florian Pose <fp@igh-essen.com>
parents: 879
diff changeset
    26
#
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
#------------------------------------------------------------------------------
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
obj-m := ec_master.o
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
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
    31
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
    32
	cdev.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
    33
	datagram.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
    34
	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
    35
	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
    36
	fmmu_config.o \
1707
11ec009e145d Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1685
diff changeset
    37
	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
    38
	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
    39
	fsm_coe.o \
1707
11ec009e145d Included FoE patch from Olav Zarges.
Florian Pose <fp@igh-essen.com>
parents: 1685
diff changeset
    40
	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
    41
	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
    42
	fsm_pdo.o \
235f34ca50e2 Major Pdo configuration change: Read mapping of unknown Pdos during
Florian Pose <fp@igh-essen.com>
parents: 1164
diff changeset
    43
	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
    44
	fsm_sii.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
    45
	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
    46
	fsm_slave_scan.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
    47
	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
    48
	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
    49
	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
    50
	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
    51
	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
    52
	pdo_list.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
    53
	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
    54
	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
    55
	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
    56
	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
    57
	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
    58
	sync.o \
1055
2be8918682fa Store sync manager configurations in ec_slave_config_t instead of Pdo
Florian Pose <fp@igh-essen.com>
parents: 933
diff changeset
    59
	sync_config.o
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    60
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    61
ifeq (@ENABLE_EOE@,1)
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 679
diff changeset
    62
	ec_master-objs += ethernet.o
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 679
diff changeset
    63
endif
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    64
ifeq (@ENABLE_DEBUG_IF@,1)
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    65
	ec_master-objs += debug.o
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    66
endif
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    67
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    68
REV := $(shell if test -s $(src)/../svnrevision; then \
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    69
		cat $(src)/../svnrevision; \
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    70
	else \
1164
bc6a17d40275 Fixed svnversion path argument.
Florian Pose <fp@igh-essen.com>
parents: 1074
diff changeset
    71
		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    72
	fi)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 436
diff changeset
    74
CFLAGS_module.o := -DSVNREV=$(REV)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
#------------------------------------------------------------------------------