examples/msr/Makefile
author Florian Pose <fp@igh-essen.com>
Thu, 11 May 2006 09:24:15 +0000
changeset 230 382bdb9138ec
parent 224 4828e5e419bf
child 232 f6594a07cdda
permissions -rw-r--r--
RTAI sample with optimized jitter.
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
#  Makefile
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
#  $Id$
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
#  This file is part of the IgH EtherCAT Master.
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
#  The IgH EtherCAT Master is free software; you can redistribute it
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
#  and/or modify it under the terms of the GNU General Public License
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
#  as published by the Free Software Foundation; version 2 of the License.
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
#  The IgH EtherCAT Master is distributed in the hope that it will be
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
#  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
#  GNU General Public License for more details.
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
#  You should have received a copy of the GNU General Public License
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
#  along with the IgH EtherCAT Master; if not, write to the Free Software
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    24
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    25
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    26
ifneq ($(KERNELRELEASE),)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    27
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    28
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    29
#  kbuild section
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    30
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    31
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    32
ifneq ($(wildcard $(src)/rt.conf),)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    33
include $(src)/rt.conf
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    34
else
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    35
MODULENAME := rt
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
endif
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    38
obj-m := $(MODULENAME).o
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    39
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    40
$(MODULENAME)-objs := msr_rt.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
			rt_lib/msr-core/msr_lists.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
			rt_lib/msr-core/msr_main.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
			rt_lib/msr-core/msr_charbuf.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    44
			rt_lib/msr-core/msr_reg.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
			rt_lib/msr-core/msr_interpreter.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    46
			rt_lib/msr-core/msr_messages.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
			rt_lib/msr-core/msr_proc.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    48
			rt_lib/msr-core/msr_error_reg.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
			rt_lib/msr-utils/msr_utils.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
			rt_lib/msr-utils/msr_time.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
			rt_lib/msr-math/msr_base64.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
			rt_lib/msr-math/msr_hex_bin.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
			libm.o
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -D_SIMULATION \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
		-I/usr/include -mhard-float \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
		-DSVNREV=$(shell svnversion $(src)) -DUSER=$(USER)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
else
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    63
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    64
#  default section
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    65
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    66
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    67
ifneq ($(wildcard rt.conf),)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    68
include rt.conf
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
else
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    70
MODULENAME := msr_rt
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    71
KERNEL := $(shell uname -r)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    72
endif
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    73
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    74
KERNELDIR := /lib/modules/$(KERNEL)/build
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
modules:
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    77
	$(MAKE) -C $(KERNELDIR) M=`pwd`
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    78
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    79
clean:
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
	$(MAKE) -C $(KERNELDIR) M=`pwd` clean
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    82
install:
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
	@./install.sh $(MODULENAME) $(KERNEL)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    85
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    86
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    87
endif