|
1 #------------------------------------------------------------------------------ |
|
2 # |
|
3 # Makefile |
|
4 # |
|
5 # Sample module for use with IgH MSR library. |
|
6 # |
|
7 # $Id$ |
|
8 # |
|
9 # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
|
10 # |
|
11 # This file is part of the IgH EtherCAT Master. |
|
12 # |
|
13 # The IgH EtherCAT Master is free software; you can redistribute it |
|
14 # and/or modify it under the terms of the GNU General Public License |
|
15 # as published by the Free Software Foundation; either version 2 of the |
|
16 # License, or (at your option) any later version. |
|
17 # |
|
18 # The IgH EtherCAT Master is distributed in the hope that it will be |
|
19 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 # GNU General Public License for more details. |
|
22 # |
|
23 # You should have received a copy of the GNU General Public License |
|
24 # along with the IgH EtherCAT Master; if not, write to the Free Software |
|
25 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
26 # |
|
27 # The right to use EtherCAT Technology is granted and comes free of |
|
28 # charge under condition of compatibility of product made by |
|
29 # Licensee. People intending to distribute/sell products based on the |
|
30 # code, have to sign an agreement to guarantee that products using |
|
31 # software based on IgH EtherCAT master stay compatible with the actual |
|
32 # EtherCAT specification (which are released themselves as an open |
|
33 # standard) as the (only) precondition to have the right to use EtherCAT |
|
34 # Technology, IP and trade marks. |
|
35 # |
|
36 #------------------------------------------------------------------------------ |
|
37 |
|
38 MODULE := ec_msr_sample |
|
39 |
|
40 #------------------------------------------------------------------------------ |
|
41 # kbuild section |
|
42 #------------------------------------------------------------------------------ |
|
43 |
|
44 ifneq ($(KERNELRELEASE),) |
|
45 |
|
46 obj-m := $(MODULE).o |
|
47 |
|
48 $(MODULE)-objs := msr_sample.o \ |
|
49 rt_lib/msr-core/msr_lists.o \ |
|
50 rt_lib/msr-core/msr_main.o \ |
|
51 rt_lib/msr-core/msr_charbuf.o \ |
|
52 rt_lib/msr-core/msr_reg.o \ |
|
53 rt_lib/msr-core/msr_interpreter.o \ |
|
54 rt_lib/msr-core/msr_messages.o \ |
|
55 rt_lib/msr-core/msr_proc.o \ |
|
56 rt_lib/msr-core/msr_error_reg.o \ |
|
57 rt_lib/msr-utils/msr_utils.o \ |
|
58 rt_lib/msr-utils/msr_time.o \ |
|
59 rt_lib/msr-math/msr_base64.o \ |
|
60 rt_lib/msr-math/msr_hex_bin.o \ |
|
61 libm.o |
|
62 |
|
63 EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \ |
|
64 -D_SIMULATION -mhard-float |
|
65 |
|
66 #------------------------------------------------------------------------------ |
|
67 # default section |
|
68 #------------------------------------------------------------------------------ |
|
69 |
|
70 else |
|
71 |
|
72 ifneq ($(wildcard kernel.conf),) |
|
73 include kernel.conf |
|
74 else |
|
75 KERNEL := $(shell uname -r) |
|
76 endif |
|
77 |
|
78 KERNELDIR := /lib/modules/$(KERNEL)/build |
|
79 |
|
80 modules: |
|
81 $(MAKE) -C $(KERNELDIR) M=`pwd` |
|
82 |
|
83 clean: |
|
84 $(MAKE) -C $(KERNELDIR) M=`pwd` clean |
|
85 |
|
86 install: |
|
87 @./install.sh $(MODULE) $(KERNEL) |
|
88 |
|
89 endif |
|
90 |
|
91 #------------------------------------------------------------------------------ |