author | Florian Pose <fp@igh-essen.com> |
Thu, 03 Aug 2006 12:59:01 +0000 | |
branch | stable-1.1 |
changeset 1715 | e675450f2174 |
parent 293 | 14aeb79aa992 |
child 361 | 29af81543ce1 |
permissions | -rw-r--r-- |
41 | 1 |
#------------------------------------------------------------------------------ |
0 | 2 |
# |
3 |
# Makefile |
|
4 |
# |
|
180 | 5 |
# IgH EtherCAT master module |
0 | 6 |
# |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
7 |
# $Id$ |
0 | 8 |
# |
197
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
diff
changeset
|
9 |
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
diff
changeset
|
10 |
# |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
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:
196
diff
changeset
|
12 |
# |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
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:
196
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:
238
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:
238
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:
196
diff
changeset
|
17 |
# |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
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:
196
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:
196
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:
196
diff
changeset
|
21 |
# GNU General Public License for more details. |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
diff
changeset
|
22 |
# |
b9a6e2c22745
GPLv2 License and enhanced Doxygen output.
Florian Pose <fp@igh-essen.com>
parents:
196
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:
196
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:
196
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:
196
diff
changeset
|
26 |
# |
246
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
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:
238
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:
238
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:
238
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:
238
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:
238
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:
238
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:
238
diff
changeset
|
34 |
# Technology, IP and trade marks. |
0bf7c769de06
Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents:
238
diff
changeset
|
35 |
# |
41 | 36 |
#------------------------------------------------------------------------------ |
0 | 37 |
|
41 | 38 |
#------------------------------------------------------------------------------ |
180 | 39 |
# kbuild section |
6
e36a85dc2730
ISR-Aufruf in read_process_data
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
5
diff
changeset
|
40 |
|
272
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
41 |
ifneq ($(KERNELRELEASE),) |
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
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 |
|
1715
e675450f2174
MERGE trunk -r463:494 -> branches/stable-1.1 (Version 1.1)
Florian Pose <fp@igh-essen.com>
parents:
293
diff
changeset
|
45 |
ec_master-objs := module.o master.o device.o slave.o datagram.o \ |
e675450f2174
MERGE trunk -r463:494 -> branches/stable-1.1 (Version 1.1)
Florian Pose <fp@igh-essen.com>
parents:
293
diff
changeset
|
46 |
domain.o mailbox.o ethernet.o debug.o fsm.o |
0 | 47 |
|
267 | 48 |
REV := $(shell svnversion $(src) 2>/dev/null || echo "unknown") |
196
f8a1e9f364a3
Introduced version number define.
Florian Pose <fp@igh-essen.com>
parents:
191
diff
changeset
|
49 |
|
f8a1e9f364a3
Introduced version number define.
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 | 52 |
#------------------------------------------------------------------------------ |
272
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
53 |
# default section |
0 | 54 |
|
22
e8c2cd004e0b
Portierung der Module in drivers/ und mini/ nach Kernel 2.6.
Florian Pose <fp@igh-essen.com>
parents:
16
diff
changeset
|
55 |
else |
9
144d220c8ca0
Verbesserte Makefiles (Kernel-Verzeichnisse nicht mehr im SVN).
Florian Pose <fp@igh-essen.com>
parents:
6
diff
changeset
|
56 |
|
180 | 57 |
ifneq ($(wildcard ../ethercat.conf),) |
58 |
include ../ethercat.conf |
|
50 | 59 |
else |
180 | 60 |
KERNEL := $(shell uname -r) |
50 | 61 |
endif |
62 |
||
267 | 63 |
KERNEL_DIR := /lib/modules/$(KERNEL)/build |
64 |
CURRENT_DIR := $(shell pwd) |
|
281
c91bbf7bc52c
Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents:
272
diff
changeset
|
65 |
INSTALL_MOD_DIR := ethercat/master |
180 | 66 |
|
41 | 67 |
modules: |
272
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
68 |
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) modules |
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
69 |
|
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
70 |
install: modules_install |
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
71 |
|
efb1c792a6a4
Applied patches by Maximilian Schwerin.
Florian Pose <fp@igh-essen.com>
parents:
267
diff
changeset
|
72 |
modules_install: |
281
c91bbf7bc52c
Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents:
272
diff
changeset
|
73 |
$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) \ |
c91bbf7bc52c
Better modules_install targets.
Florian Pose <fp@igh-essen.com>
parents:
272
diff
changeset
|
74 |
INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) modules_install |
0 | 75 |
|
180 | 76 |
clean: |
267 | 77 |
$(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
|
78 |
@rm -f Modules.symvers |
0 | 79 |
|
41 | 80 |
#------------------------------------------------------------------------------ |
10
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
81 |
|
67c739ece5d5
depend-Sektion in den Makefiles korrigiert.
Florian Pose <fp@igh-essen.com>
parents:
9
diff
changeset
|
82 |
endif |