220
|
1 |
#------------------------------------------------------------------------------
|
|
2 |
#
|
|
3 |
# Makefile
|
|
4 |
#
|
|
5 |
# $Id$
|
|
6 |
#
|
|
7 |
# Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH
|
|
8 |
#
|
|
9 |
# This file is part of the IgH EtherCAT Master.
|
|
10 |
#
|
|
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
|
|
13 |
# as published by the Free Software Foundation; version 2 of the License.
|
|
14 |
#
|
|
15 |
# 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 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18 |
# GNU General Public License for more details.
|
|
19 |
#
|
|
20 |
# 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 |
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
23 |
#
|
|
24 |
#------------------------------------------------------------------------------
|
|
25 |
|
|
26 |
ifneq ($(KERNELRELEASE),)
|
|
27 |
|
|
28 |
#------------------------------------------------------------------------------
|
|
29 |
# kbuild section
|
|
30 |
#------------------------------------------------------------------------------
|
|
31 |
|
|
32 |
ifneq ($(wildcard $(src)/rt.conf),)
|
|
33 |
include $(src)/rt.conf
|
|
34 |
else
|
|
35 |
MODULENAME := rt
|
|
36 |
endif
|
|
37 |
|
|
38 |
obj-m := $(MODULENAME).o
|
|
39 |
|
|
40 |
$(MODULENAME)-objs := msr_rt.o \
|
|
41 |
rt_lib/msr-core/msr_lists.o \
|
|
42 |
rt_lib/msr-core/msr_main.o \
|
|
43 |
rt_lib/msr-core/msr_charbuf.o \
|
|
44 |
rt_lib/msr-core/msr_reg.o \
|
|
45 |
rt_lib/msr-core/msr_interpreter.o \
|
|
46 |
rt_lib/msr-core/msr_messages.o \
|
|
47 |
rt_lib/msr-core/msr_proc.o \
|
|
48 |
rt_lib/msr-core/msr_error_reg.o \
|
|
49 |
rt_lib/msr-utils/msr_utils.o \
|
|
50 |
rt_lib/msr-utils/msr_time.o \
|
|
51 |
rt_lib/msr-math/msr_base64.o \
|
|
52 |
rt_lib/msr-math/msr_hex_bin.o \
|
|
53 |
libm.o
|
|
54 |
|
|
55 |
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -D_SIMULATION \
|
|
56 |
-I/usr/include -mhard-float \
|
|
57 |
-DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER)
|
|
58 |
|
|
59 |
#------------------------------------------------------------------------------
|
|
60 |
|
|
61 |
else
|
|
62 |
|
|
63 |
#------------------------------------------------------------------------------
|
|
64 |
# default section
|
|
65 |
#------------------------------------------------------------------------------
|
|
66 |
|
|
67 |
ifneq ($(wildcard rt.conf),)
|
|
68 |
include rt.conf
|
|
69 |
else
|
|
70 |
MODULENAME := msr_rt
|
|
71 |
KERNEL := $(shell uname -r)
|
|
72 |
endif
|
|
73 |
|
|
74 |
KERNELDIR := /lib/modules/$(KERNEL)/build
|
|
75 |
|
|
76 |
modules:
|
|
77 |
$(MAKE) -C $(KERNELDIR) M=`pwd`
|
|
78 |
|
|
79 |
clean:
|
|
80 |
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
|
|
81 |
|
|
82 |
install:
|
|
83 |
@./install.sh $(MODULENAME) $(KERNEL)
|
|
84 |
|
|
85 |
#------------------------------------------------------------------------------
|
|
86 |
|
|
87 |
endif
|