224
|
1 |
#------------------------------------------------------------------------------
|
|
2 |
#
|
|
3 |
# Makefile
|
|
4 |
#
|
232
|
5 |
# Sample module for use with IgH MSR library.
|
|
6 |
#
|
224
|
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; version 2 of the License.
|
|
16 |
#
|
|
17 |
# The IgH EtherCAT Master is distributed in the hope that it will be
|
|
18 |
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20 |
# GNU General Public License for more details.
|
|
21 |
#
|
|
22 |
# You should have received a copy of the GNU General Public License
|
|
23 |
# along with the IgH EtherCAT Master; if not, write to the Free Software
|
|
24 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
25 |
#
|
|
26 |
#------------------------------------------------------------------------------
|
|
27 |
|
232
|
28 |
MODULE := ec_msr_sample
|
224
|
29 |
|
|
30 |
#------------------------------------------------------------------------------
|
|
31 |
# kbuild section
|
|
32 |
#------------------------------------------------------------------------------
|
|
33 |
|
232
|
34 |
ifneq ($(KERNELRELEASE),)
|
224
|
35 |
|
232
|
36 |
obj-m := $(MODULE).o
|
224
|
37 |
|
232
|
38 |
$(MODULE)-objs := msr_sample.o \
|
224
|
39 |
rt_lib/msr-core/msr_lists.o \
|
|
40 |
rt_lib/msr-core/msr_main.o \
|
|
41 |
rt_lib/msr-core/msr_charbuf.o \
|
|
42 |
rt_lib/msr-core/msr_reg.o \
|
|
43 |
rt_lib/msr-core/msr_interpreter.o \
|
|
44 |
rt_lib/msr-core/msr_messages.o \
|
|
45 |
rt_lib/msr-core/msr_proc.o \
|
|
46 |
rt_lib/msr-core/msr_error_reg.o \
|
|
47 |
rt_lib/msr-utils/msr_utils.o \
|
|
48 |
rt_lib/msr-utils/msr_time.o \
|
|
49 |
rt_lib/msr-math/msr_base64.o \
|
|
50 |
rt_lib/msr-math/msr_hex_bin.o \
|
|
51 |
libm.o
|
|
52 |
|
232
|
53 |
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \
|
|
54 |
-D_SIMULATION -mhard-float
|
224
|
55 |
|
|
56 |
#------------------------------------------------------------------------------
|
|
57 |
# default section
|
|
58 |
#------------------------------------------------------------------------------
|
|
59 |
|
|
60 |
else
|
232
|
61 |
|
|
62 |
ifneq ($(wildcard kernel.conf),)
|
|
63 |
include kernel.conf
|
|
64 |
else
|
224
|
65 |
KERNEL := $(shell uname -r)
|
|
66 |
endif
|
|
67 |
|
|
68 |
KERNELDIR := /lib/modules/$(KERNEL)/build
|
|
69 |
|
|
70 |
modules:
|
|
71 |
$(MAKE) -C $(KERNELDIR) M=`pwd`
|
|
72 |
|
|
73 |
clean:
|
|
74 |
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
|
|
75 |
|
|
76 |
install:
|
232
|
77 |
@./install.sh $(MODULE) $(KERNEL)
|
|
78 |
|
|
79 |
endif
|
224
|
80 |
|
|
81 |
#------------------------------------------------------------------------------
|