Makefile
author Florian Pose <fp@igh-essen.com>
Fri, 02 Jun 2006 14:25:45 +0000
changeset 269 a03be9a6fed6
parent 250 440ae5f6d2c3
child 272 efb1c792a6a4
permissions -rw-r--r--
EEPROM writing via SysFS.
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
#
197
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     7
#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     8
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
     9
#  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
    10
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    11
#  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
    12
#  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
    13
#  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
    14
#  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
    15
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    16
#  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
    17
#  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
    18
#  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
    19
#  GNU General Public License for more details.
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    20
#
b9a6e2c22745 GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents: 195
diff changeset
    21
#  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
    22
#  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
    23
#  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
    24
#
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
diff changeset
    25
#  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
    26
#  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
    27
#  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
    28
#  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
    29
#  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
    30
#  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
    31
#  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
    32
#  Technology, IP and trade marks.
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 242
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
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    39
ifneq ($(KERNELRELEASE),)
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
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
#------------------------------------------------------------------------------
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    44
#  default section
45
f525f7db2d90 Verbesserte Makefiles (MODPOST-Warnungen entfernt).
Florian Pose <fp@igh-essen.com>
parents: 26
diff changeset
    45
46
f2d7a73d2f32 Makefiles nochmals verbessert.
Florian Pose <fp@igh-essen.com>
parents: 45
diff changeset
    46
else
0
05c992bf5847 trunk, tags und branches
Florian Pose <fp@igh-essen.com>
parents:
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
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
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
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    54
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
    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:
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
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
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
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:
250
440ae5f6d2c3 Created scripts directory and improved install and init scripts.
Florian Pose <fp@igh-essen.com>
parents: 246
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