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 += SUB_PROG_CFLAGS
|
|
37 |
|
|
38 |
obj-m := $(TIMERS_DRIVER).o
|
|
39 |
|
|
40 |
#else
|
|
41 |
# Normal Makefile
|
|
42 |
PREFIX = SUB_PREFIX
|
|
43 |
KERNELDIR := SUB_KERNELDIR
|
|
44 |
|
|
45 |
all: driver
|
|
46 |
|
|
47 |
driver:
|
|
48 |
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules
|
|
49 |
|
|
50 |
clean:
|
|
51 |
$(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
|
|
52 |
rm -f Module.symvers
|
|
53 |
|
|
54 |
mrproper: clean
|
|
55 |
|
|
56 |
install:
|
|
57 |
|
|
58 |
|
|
59 |
#endif
|