master/Kbuild.in
author Florian Pose <fp@igh-essen.com>
Wed, 13 Jan 2010 00:04:47 +0100
branchstable-1.4
changeset 1769 5c317e78a5ef
parent 1685 399ef727bf62
child 1707 11ec009e145d
permissions -rw-r--r--
merge
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 \
a82793a6d1a0 Added Kbuild files to BUILT_SOURCES in Makefile.am files to create dependencies.
Florian Pose <fp@igh-essen.com>
parents: 1055
diff changeset
    37
	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
    38
	fsm_coe.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_master.o \
1174
235f34ca50e2 Major Pdo configuration change: Read mapping of unknown Pdos during
Florian Pose <fp@igh-essen.com>
parents: 1164
diff changeset
    40
	fsm_pdo.o \
235f34ca50e2 Major Pdo configuration change: Read mapping of unknown Pdos during
Florian Pose <fp@igh-essen.com>
parents: 1164
diff changeset
    41
	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
    42
	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
    43
	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
    44
	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
    45
	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
    46
	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
    47
	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
    48
	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
    49
	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
    50
	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
    51
	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
    52
	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
    53
	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
    54
	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
    55
	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
    56
	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
    57
	sync_config.o
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    58
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    59
ifeq (@ENABLE_EOE@,1)
715
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 679
diff changeset
    60
	ec_master-objs += ethernet.o
f12ff7c08623 Added --enable-eoe conditional.
Florian Pose <fp@igh-essen.com>
parents: 679
diff changeset
    61
endif
732
0e6e1ef2b6bc Removed config.kbuild and replaced Kbuild files by Kbuild.in files.
Florian Pose <fp@igh-essen.com>
parents: 715
diff changeset
    62
ifeq (@ENABLE_DEBUG_IF@,1)
392
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    63
	ec_master-objs += debug.o
eaee3c8d6ae0 Debug interfaces not compiled by default.
Florian Pose <fp@igh-essen.com>
parents: 382
diff changeset
    64
endif
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    65
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    66
REV := $(shell if test -s $(src)/../svnrevision; then \
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    67
		cat $(src)/../svnrevision; \
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    68
	else \
1164
bc6a17d40275 Fixed svnversion path argument.
Florian Pose <fp@igh-essen.com>
parents: 1074
diff changeset
    69
		svnversion $(src)/.. 2>/dev/null || echo "unknown"; \
366
148ac5ef18ae Added SVN revision to distribution.
Florian Pose <fp@igh-essen.com>
parents: 364
diff changeset
    70
	fi)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    71
444
31223539fc00 Compiler flag -DSVNREV only for module.c to avoid unnecessary recompiling.
Florian Pose <fp@igh-essen.com>
parents: 436
diff changeset
    72
CFLAGS_module.o := -DSVNREV=$(REV)
364
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
9028b20e3c12 EtherCAT master with Autotools.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    74
#------------------------------------------------------------------------------