master/Makefile
author Florian Pose <fp@igh-essen.com>
Mon, 29 May 2006 09:54:18 +0000
branchstable-1.0
changeset 1620 9d7453c16ade
parent 1619 0d4119024f55
child 1621 4bbe090553f7
permissions -rw-r--r--
Consistent example configuration files.
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
     1
#------------------------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  Makefile
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
     5
#  IgH EtherCAT master module
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
     7
#  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
1618
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
     9
#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    10
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    11
#  This file is part of the IgH EtherCAT Master.
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    12
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    13
#  The IgH EtherCAT Master is free software; you can redistribute it
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    14
#  and/or modify it under the terms of the GNU General Public License
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    15
#  as published by the Free Software Foundation; either version 2 of the
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    16
#  License, or (at your option) any later version.
1618
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    17
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    18
#  The IgH EtherCAT Master is distributed in the hope that it will be
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    19
#  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    20
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    21
#  GNU General Public License for more details.
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    22
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    23
#  You should have received a copy of the GNU General Public License
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    24
#  along with the IgH EtherCAT Master; if not, write to the Free Software
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    25
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 1617
diff changeset
    26
#
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    27
#  The right to use EtherCAT Technology is granted and comes free of
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    28
#  charge under condition of compatibility of product made by
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    29
#  Licensee. People intending to distribute/sell products based on the
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    30
#  code, have to sign an agreement to guarantee that products using
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    31
#  software based on IgH EtherCAT master stay compatible with the actual
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    32
#  EtherCAT specification (which are released themselves as an open
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    33
#  standard) as the (only) precondition to have the right to use EtherCAT
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    34
#  Technology, IP and trade marks.
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    35
#
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    36
#------------------------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
22
e8c2cd004e0b Portierung der Module in drivers/ und mini/ nach Kernel 2.6.
Florian Pose <fp@igh-essen.com>
parents: 16
diff changeset
    38
ifneq ($(KERNELRELEASE),)
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    40
#------------------------------------------------------------------------------
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    41
#  kbuild section
6
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    42
54
7506e67dd122 Vereinheitlichte Schnittstellen, Include-Verzeichnis und Module getrennt.
Florian Pose <fp@igh-essen.com>
parents: 50
diff changeset
    43
obj-m := ec_master.o
6
e36a85dc2730 ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents: 5
diff changeset
    44
98
f564d0929292 MERGE branches/async 222:233 -> trunk (Kommando-Warteschlangen).
Florian Pose <fp@igh-essen.com>
parents: 73
diff changeset
    45
ec_master-objs := module.o master.o device.o slave.o command.o types.o \
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    46
		domain.o mailbox.o canopen.o ethernet.o debug.o fsm.o
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
1617
9f83a343ae75 MERGE trunk -r354:355 -> branches/stable-1.0 (version numbers)
Florian Pose <fp@igh-essen.com>
parents: 191
diff changeset
    48
REV := $(shell svnversion $(src) 2>/dev/null)
9f83a343ae75 MERGE trunk -r354:355 -> branches/stable-1.0 (version numbers)
Florian Pose <fp@igh-essen.com>
parents: 191
diff changeset
    49
9f83a343ae75 MERGE trunk -r354:355 -> branches/stable-1.0 (version numbers)
Florian Pose <fp@igh-essen.com>
parents: 191
diff changeset
    50
EXTRA_CFLAGS := -DSVNREV=$(REV) -DUSER=$(USER)
34
c1e8d61fa395 Compile-Informationen hinzugef?gt.
Florian Pose <fp@igh-essen.com>
parents: 27
diff changeset
    51
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    52
#------------------------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
22
e8c2cd004e0b Portierung der Module in drivers/ und mini/ nach Kernel 2.6.
Florian Pose <fp@igh-essen.com>
parents: 16
diff changeset
    54
else
9
144d220c8ca0 Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents: 6
diff changeset
    55
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    56
#------------------------------------------------------------------------------
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    57
#  default section
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    59
ifneq ($(wildcard ../ethercat.conf),)
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    60
include ../ethercat.conf
50
458e704afc6e Makefiles verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    61
else
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    62
KERNEL := $(shell uname -r)
50
458e704afc6e Makefiles verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    63
endif
458e704afc6e Makefiles verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    64
191
ca805255a935 Prepared Free-Run mode
Florian Pose <fp@igh-essen.com>
parents: 180
diff changeset
    65
KERNELDIR := /lib/modules/$(KERNEL)/build
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    66
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    67
modules:
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    68
	$(MAKE) -C $(KERNELDIR) M=`pwd`
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 145
diff changeset
    70
clean:
50
458e704afc6e Makefiles verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    71
	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    72
41
42c66194c0c8 Schoenheitskorrekturen.
Florian Pose <fp@igh-essen.com>
parents: 34
diff changeset
    73
#------------------------------------------------------------------------------
10
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    74
67c739ece5d5 depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents: 9
diff changeset
    75
endif