Makefile
author Florian Pose <fp@igh-essen.com>
Mon, 29 May 2006 09:08:56 +0000
branchstable-1.0
changeset 1619 0d4119024f55
parent 1618 5cff10efb927
child 1621 4bbe090553f7
permissions -rw-r--r--
MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
     1
#------------------------------------------------------------------------------
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
169
b3ecbec2c487 Better installer and startup scripts.
Florian Pose <fp@igh-essen.com>
parents: 167
diff changeset
     3
#  EtherCAT Makefile
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
149
0ed43f09130f Keywords 2
Florian Pose <fp@igh-essen.com>
parents: 148
diff changeset
     5
#  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
1618
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     7
#  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: 195
diff changeset
     8
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     9
#  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: 195
diff changeset
    10
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    11
#  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: 195
diff changeset
    12
#  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
    13
#  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
    14
#  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: 195
diff changeset
    15
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    16
#  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: 195
diff changeset
    17
#  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: 195
diff changeset
    18
#  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: 195
diff changeset
    19
#  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: 195
diff changeset
    20
#
5cff10efb927 MERGE trunk -r355:360 -> branches/stable-1.0 (Doxygen, INSTALL, and GPLv2)
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    21
#  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: 195
diff changeset
    22
#  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: 195
diff changeset
    23
#  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: 195
diff changeset
    24
#
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    25
#  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
    26
#  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
    27
#  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
    28
#  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
    29
#  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
    30
#  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
    31
#  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
    32
#  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
    33
#
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    34
#------------------------------------------------------------------------------
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    35
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    36
#------------------------------------------------------------------------------
195
674071846ee3 Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents: 180
diff changeset
    37
#  kbuild section
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    38
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    39
ifneq ($(KERNELRELEASE),)
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    40
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    41
obj-m := master/ devices/
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    42
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    43
#------------------------------------------------------------------------------
195
674071846ee3 Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents: 180
diff changeset
    44
#  default section
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    45
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
else
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    47
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    48
ifneq ($(wildcard ethercat.conf),)
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    49
include ethercat.conf
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    50
else
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    51
KERNEL := $(shell uname -r)
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    52
endif
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    53
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    54
KERNEL_DIR := /lib/modules/$(KERNEL)/build
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    55
CURRENT_DIR := $(shell pwd)
169
b3ecbec2c487 Better installer and startup scripts.
Florian Pose <fp@igh-essen.com>
parents: 167
diff changeset
    56
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    57
modules:
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    58
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    59
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    60
clean: cleandoc
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    61
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    63
doc:
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    64
	doxygen Doxyfile
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    65
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    66
cleandoc:
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    67
	@rm -rf doc
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    68
167
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    69
install:
1619
0d4119024f55 MERGE -r361:425 trunk -> branches/stable-1.0: EoE, License, State machines.
Florian Pose <fp@igh-essen.com>
parents: 1618
diff changeset
    70
	@script/install.sh $(KERNEL)
167
37c65411b411 Added install script
Florian Pose <fp@igh-essen.com>
parents: 149
diff changeset
    71
73
9f4ea66d89a3 Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents: 71
diff changeset
    72
#------------------------------------------------------------------------------
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    73
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    74
endif