Makefile
author Florian Pose <fp@igh-essen.com>
Tue, 01 Aug 2006 15:19:11 +0000
changeset 321 64e20e6e9d0b
parent 287 529c27d9d4d7
permissions -rw-r--r--
Renamed master parameter ec_eoe_devices to ec_eoeif_count.
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
#
272
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
     3
#  Makefile
281
c91bbf7bc52c Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents: 272
diff changeset
     4
#
272
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
     5
#  IgH EtherCAT master
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
149
0ed43f09130f Keywords 2
Florian Pose <fp@igh-essen.com>
parents: 148
diff changeset
     7
#  $Id$
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
197
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     9
#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    10
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    11
#  This file is part of the IgH EtherCAT Master.
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    12
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    13
#  The IgH EtherCAT Master is free software; you can redistribute it
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    14
#  and/or modify it under the terms of the GNU General Public License
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    15
#  as published by the Free Software Foundation; either version 2 of the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    16
#  License, or (at your option) any later version.
197
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    17
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    18
#  The IgH EtherCAT Master is distributed in the hope that it will be
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    19
#  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    20
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    21
#  GNU General Public License for more details.
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    22
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    23
#  You should have received a copy of the GNU General Public License
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    24
#  along with the IgH EtherCAT Master; if not, write to the Free Software
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    25
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    26
#
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    27
#  The right to use EtherCAT Technology is granted and comes free of
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    28
#  charge under condition of compatibility of product made by
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    29
#  Licensee. People intending to distribute/sell products based on the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    30
#  code, have to sign an agreement to guarantee that products using
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    31
#  software based on IgH EtherCAT master stay compatible with the actual
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    32
#  EtherCAT specification (which are released themselves as an open
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    33
#  standard) as the (only) precondition to have the right to use EtherCAT
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    34
#  Technology, IP and trade marks.
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    35
#
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    36
#------------------------------------------------------------------------------
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    37
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    38
#------------------------------------------------------------------------------
195
674071846ee3 Translated all comments and documentation to english language.
Florian Pose <fp@igh-essen.com>
parents: 180
diff changeset
    39
#  kbuild section
12
920e3b41a61f "make kerneldirs" erstellt die Default-Datei kerneldirs.mk zum Editieren.
Florian Pose <fp@igh-essen.com>
parents: 0
diff changeset
    40
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    41
ifneq ($(KERNELRELEASE),)
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    42
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    43
obj-m := master/ devices/
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    44
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    45
#------------------------------------------------------------------------------
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    46
#  default section
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    47
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    48
else
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    50
ifneq ($(wildcard ethercat.conf),)
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    51
include ethercat.conf
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    52
else
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    53
KERNEL := $(shell uname -r)
71
79d7b9cfdeb9 Slave interface und Makefile ge?ndert.
Florian Pose <fp@igh-essen.com>
parents: 59
diff changeset
    54
endif
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    55
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    56
KERNEL_DIR := /lib/modules/$(KERNEL)/build
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    57
CURRENT_DIR := $(shell pwd)
281
c91bbf7bc52c Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents: 272
diff changeset
    58
INSTALL_MOD_DIR := ethercat
169
b3ecbec2c487 Better installer and startup scripts.
Florian Pose <fp@igh-essen.com>
parents: 167
diff changeset
    59
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    60
modules:
272
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    61
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    62
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    63
install: modules_install
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    64
	@script/install.sh $(KERNEL)
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    65
efb1c792a6a4 Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents: 250
diff changeset
    66
modules_install:
281
c91bbf7bc52c Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents: 272
diff changeset
    67
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \
c91bbf7bc52c Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents: 272
diff changeset
    68
		INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    69
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    70
clean: cleandoc
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    71
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
287
529c27d9d4d7 Removing "Modules.symvers" on make clean.
Florian Pose <fp@igh-essen.com>
parents: 281
diff changeset
    72
	@rm -f Modules.symvers
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
180
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    74
doc:
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    75
	doxygen Doxyfile
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    76
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    77
cleandoc:
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    78
	@rm -rf doc
786d4cba38fb Advanced build system
Florian Pose <fp@igh-essen.com>
parents: 169
diff changeset
    79
73
9f4ea66d89a3 Dynamische FMMU-Konfiguration, zwei Kopieroperationen eingespart, Einr?ckungen angepasst.
Florian Pose <fp@igh-essen.com>
parents: 71
diff changeset
    80
#------------------------------------------------------------------------------
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    81
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    82
endif