8 # |
8 # |
9 # This file is part of the IgH EtherCAT Master. |
9 # This file is part of the IgH EtherCAT Master. |
10 # |
10 # |
11 # The IgH EtherCAT Master is free software; you can redistribute it |
11 # The IgH EtherCAT Master is free software; you can redistribute it |
12 # and/or modify it under the terms of the GNU General Public License |
12 # and/or modify it under the terms of the GNU General Public License |
13 # as published by the Free Software Foundation; version 2 of the License. |
13 # as published by the Free Software Foundation; either version 2 of the |
|
14 # License, or (at your option) any later version. |
14 # |
15 # |
15 # The IgH EtherCAT Master is distributed in the hope that it will be |
16 # The IgH EtherCAT Master is distributed in the hope that it will be |
16 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 # GNU General Public License for more details. |
19 # GNU General Public License for more details. |
19 # |
20 # |
20 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
21 # along with the IgH EtherCAT Master; if not, write to the Free Software |
22 # along with the IgH EtherCAT Master; if not, write to the Free Software |
22 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
23 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
23 # |
24 # |
|
25 # The right to use EtherCAT Technology is granted and comes free of |
|
26 # charge under condition of compatibility of product made by |
|
27 # Licensee. People intending to distribute/sell products based on the |
|
28 # code, have to sign an agreement to guarantee that products using |
|
29 # software based on IgH EtherCAT master stay compatible with the actual |
|
30 # EtherCAT specification (which are released themselves as an open |
|
31 # standard) as the (only) precondition to have the right to use EtherCAT |
|
32 # Technology, IP and trade marks. |
|
33 # |
24 #------------------------------------------------------------------------------ |
34 #------------------------------------------------------------------------------ |
25 |
|
26 ifneq ($(KERNELRELEASE),) |
|
27 |
35 |
28 #------------------------------------------------------------------------------ |
36 #------------------------------------------------------------------------------ |
29 # kbuild section |
37 # kbuild section |
30 |
38 |
|
39 ifneq ($(KERNELRELEASE),) |
|
40 |
31 obj-m := master/ devices/ |
41 obj-m := master/ devices/ |
32 |
|
33 #------------------------------------------------------------------------------ |
|
34 |
|
35 else |
|
36 |
42 |
37 #------------------------------------------------------------------------------ |
43 #------------------------------------------------------------------------------ |
38 # default section |
44 # default section |
39 |
45 |
|
46 else |
|
47 |
40 ifneq ($(wildcard ethercat.conf),) |
48 ifneq ($(wildcard ethercat.conf),) |
41 include ethercat.conf |
49 include ethercat.conf |
42 else |
50 else |
43 KERNEL := `uname -r` |
51 KERNEL := $(shell uname -r) |
44 DEVICEINDEX := 99 |
|
45 endif |
52 endif |
46 |
53 |
47 KERNELDIR := /lib/modules/$(KERNEL)/build |
54 KERNEL_DIR := /lib/modules/$(KERNEL)/build |
|
55 CURRENT_DIR := $(shell pwd) |
48 |
56 |
49 modules: |
57 modules: |
50 $(MAKE) -C $(KERNELDIR) M=`pwd` |
58 $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) |
51 |
59 |
52 clean: cleandoc |
60 clean: cleandoc |
53 $(MAKE) -C $(KERNELDIR) M=`pwd` clean |
61 $(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean |
54 |
62 |
55 doc: |
63 doc: |
56 doxygen Doxyfile |
64 doxygen Doxyfile |
57 |
65 |
58 cleandoc: |
66 cleandoc: |
59 @rm -rf doc |
67 @rm -rf doc |
60 |
68 |
61 |
|
62 install: |
69 install: |
63 @./install.sh $(KERNEL) $(DEVICEINDEX) |
70 @script/install.sh $(KERNEL) |
64 |
71 |
65 #------------------------------------------------------------------------------ |
72 #------------------------------------------------------------------------------ |
66 |
73 |
67 endif |
74 endif |