629
|
1 |
#! gmake
|
|
2 |
|
|
3 |
#
|
|
4 |
# Copyright (C) 2010 Cosateq GmbH & Co.KG
|
|
5 |
# http://www.cosateq.com/
|
|
6 |
# http://www.scale-rt.com/
|
|
7 |
#
|
|
8 |
# This file is part of canfestival, a library implementing the canopen
|
|
9 |
# stack
|
|
10 |
#
|
|
11 |
# This library is free software; you can redistribute it and/or
|
|
12 |
# modify it under the terms of the GNU Lesser General Public
|
|
13 |
# License as published by the Free Software Foundation; either
|
|
14 |
# version 2.1 of the License, or (at your option) any later version.
|
|
15 |
#
|
|
16 |
# This library is distributed in the hope that it will be useful,
|
|
17 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 |
# Lesser General Public License for more details.
|
|
20 |
#
|
|
21 |
# You should have received a copy of the GNU Lesser General Public
|
|
22 |
# License along with this library; if not, write to the Free Software
|
|
23 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
24 |
#
|
|
25 |
|
|
26 |
#ifneq ($(KERNELRELEASE),)
|
|
27 |
# Kbuild part of Makefile
|
|
28 |
TARGET = SUB_TARGET
|
|
29 |
CAN_DRIVER = SUB_CAN_DRIVER
|
|
30 |
TIMERS_DRIVER = SUB_TIMERS_DRIVER
|
|
31 |
|
|
32 |
EXTRA_CFLAGS := -I$(src)/../../include
|
|
33 |
EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET)
|
|
34 |
EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER)
|
|
35 |
EXTRA_CFLAGS += -I$(src)/../../include/$(TIMERS_DRIVER)
|
|
36 |
EXTRA_CFLAGS += -I/usr/src/comedi/include
|
|
37 |
EXTRA_CFLAGS += SUB_PROG_CFLAGS
|
|
38 |
|
|
39 |
OBJS := test_copcican_comedi.o
|
|
40 |
|
|
41 |
obj-m := test_copcican_comedi.o
|
|
42 |
test_copcican_comediko-objs := $(OBJS)
|
|
43 |
|
|
44 |
#else
|
|
45 |
# Normal Makefile
|
|
46 |
CC = SUB_CC
|
|
47 |
PREFIX = SUB_PREFIX
|
|
48 |
KERNELDIR := SUB_KERNELDIR
|
|
49 |
|
|
50 |
all: test_copcican_comedi
|
|
51 |
|
|
52 |
test_copcican_comedi:
|
|
53 |
cat ../../drivers/can_copcican_comedi/Module.symvers > Module.symvers
|
|
54 |
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules
|
|
55 |
|
|
56 |
clean:
|
|
57 |
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
|
|
58 |
rm -f Module.symvers
|
|
59 |
|
|
60 |
mrproper: clean
|
|
61 |
rm -f test_copcican_comedi.c
|
|
62 |
|
|
63 |
install:
|
|
64 |
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules_install
|
|
65 |
|
|
66 |
#endif
|