examples/msr/Makefile
author Florian Pose <fp@igh-essen.com>
Thu, 13 Jul 2006 13:10:57 +0000
branchstable-1.1
changeset 1714 f149465f4c63
parent 267 88177083f137
permissions -rw-r--r--
Created stable-1.1 branch for new interfaces.
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
#
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
     5
#  Sample module for use with IgH MSR library.
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
     6
#
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
#  $Id$
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
#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
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
#  This file is part of the IgH EtherCAT Master.
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
#  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
    14
#  and/or modify it under the terms of the GNU General Public License
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    15
#  as published by the Free Software Foundation; either version 2 of the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    16
#  License, or (at your option) any later version.
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
#  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
    19
#  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
    20
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
#  GNU General Public License for more details.
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
#
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    23
#  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
    24
#  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
    25
#  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
    26
#
246
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    27
#  The right to use EtherCAT Technology is granted and comes free of
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    28
#  charge under condition of compatibility of product made by
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    29
#  Licensee. People intending to distribute/sell products based on the
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    30
#  code, have to sign an agreement to guarantee that products using
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    31
#  software based on IgH EtherCAT master stay compatible with the actual
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    32
#  EtherCAT specification (which are released themselves as an open
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    33
#  standard) as the (only) precondition to have the right to use EtherCAT
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    34
#  Technology, IP and trade marks.
0bf7c769de06 Changed license headers and added EtherCAT license notice.
Florian Pose <fp@igh-essen.com>
parents: 232
diff changeset
    35
#
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    36
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    37
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    38
MODULE := ec_msr_sample
224
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
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    41
#  kbuild section
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    42
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    43
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    44
ifneq ($(KERNELRELEASE),)
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    45
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    46
obj-m := $(MODULE).o
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    47
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    48
$(MODULE)-objs := msr_sample.o \
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    49
			rt_lib/msr-core/msr_lists.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    50
			rt_lib/msr-core/msr_main.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    51
			rt_lib/msr-core/msr_charbuf.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    52
			rt_lib/msr-core/msr_reg.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    53
			rt_lib/msr-core/msr_interpreter.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    54
			rt_lib/msr-core/msr_messages.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    55
			rt_lib/msr-core/msr_proc.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    56
			rt_lib/msr-core/msr_error_reg.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    57
			rt_lib/msr-utils/msr_utils.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    58
			rt_lib/msr-utils/msr_time.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    59
			rt_lib/msr-math/msr_base64.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    60
			rt_lib/msr-math/msr_hex_bin.o \
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    61
			libm.o
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    62
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    63
EXTRA_CFLAGS := -I$(src)/rt_lib/msr-include -I/usr/realtime/include \
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    64
		-D_SIMULATION -mhard-float
224
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
#  default section
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    68
#------------------------------------------------------------------------------
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    69
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    70
else
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    71
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    72
ifneq ($(wildcard kernel.conf),)
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    73
include kernel.conf
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    74
else
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    75
KERNEL := $(shell uname -r)
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    76
endif
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    77
267
88177083f137 Consistent Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    78
KERNEL_DIR := /lib/modules/$(KERNEL)/build
88177083f137 Consistent Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    79
CURRENT_DIR := $(shell pwd)
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    80
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    81
modules:
267
88177083f137 Consistent Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    82
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR)
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    83
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    84
clean:
267
88177083f137 Consistent Makefiles.
Florian Pose <fp@igh-essen.com>
parents: 246
diff changeset
    85
	$(MAKE) -C $(KERNEL_DIR) M=$(CURRENT_DIR) clean
224
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
install:
232
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    88
	@./install.sh $(MODULE) $(KERNEL)
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    89
f6594a07cdda MSR example finished.
Florian Pose <fp@igh-essen.com>
parents: 224
diff changeset
    90
endif
224
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    91
4828e5e419bf Renamed rt example to msr.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    92
#------------------------------------------------------------------------------