4 # Copyright (C) 2006 Laurent Bessard
6 # This file is part of canfestival, a library implementing the canopen
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifneq ($(KERNELRELEASE),)
25 # Kbuild part of Makefile
27 CAN_DRIVER = SUB_CAN_DRIVER
28 TIMERS_DRIVER = SUB_TIMERS_DRIVER
30 EXTRA_CFLAGS := -I$(src)/../../include
31 EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET)
32 EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER)
33 EXTRA_CFLAGS += -I$(src)/../../include/$(TIMERS_DRIVER)
34 EXTRA_CFLAGS += SUB_PROG_CFLAGS
36 OBJS := kernel_module.o
41 OBJS += TestMasterSlave.o
44 canf_ktest-objs := $(OBJS)
50 KERNELDIR := SUB_KERNELDIR
54 canf_ktest: canf_ktest_console TestSlave.c TestMaster.c
55 cat ../../drivers/can_virtual_kernel/Module.symvers > Module.symvers
56 cat ../../src/Module.symvers >> Module.symvers
57 $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules
60 $(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
62 rm -f console/canf_ktest_console
69 $(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install
70 mkdir -p $(PREFIX)/bin/
71 cp console/canf_ktest_console $(PREFIX)/bin/
75 rm -f $(PREFIX)/bin/canf_ktest_console
77 canf_ktest_console: console/console.c console/console.h
78 $(CC) console/console.c -o console/canf_ktest_console
80 TestSlave.c: TestSlave.od
81 $(MAKE) -C ../../objdictgen gnosis
82 python ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c
84 TestMaster.c: TestMaster.od
85 $(MAKE) -C ../../objdictgen gnosis
86 python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c