Included support for PiMX1 board with SJA1000 on MX_DIS1 expansion board.
[lincan.git] / lincan / src / Makefile.omk
1 lincan_cards_NAMES = pip pccan smartcan nsi cc_can104 ems_cpcpci \
2                 pc_i03 pcm3680 aim104 m437 pcccan ssv bfadcan pikronisa eb8245 \
3                 kv_pcican msmcan oscar adlink7841 unican virtual template
4
5 lincan_morecards_NAMES = hms30c7202_can ns_dev_can ipci165 pimx1
6
7 default_CONFIG = CONFIG_OC_LINCAN=y CONFIG_OC_LINCANRTL=n CONFIG_OC_LINCANVME=n
8 default_CONFIG += CONFIG_OC_LINCAN_PORTIO_ONLY=n CONFIG_OC_LINCAN_MEMIO_ONLY=n
9 default_CONFIG += $(foreach n, $(lincan_cards_NAMES), CONFIG_OC_LINCAN_CARD_$(n)=y)
10 default_CONFIG += $(foreach n, $(lincan_morecards_NAMES), CONFIG_OC_LINCAN_CARD_$(n)=n)
11
12
13 lincan_cards_SELECTED = $(filter %.y, $(foreach x, $(lincan_cards_NAMES) $(lincan_morecards_NAMES), $(x).$(CONFIG_OC_LINCAN_CARD_$(x))))
14 lincan_cards_SELECTED := $(lincan_cards_SELECTED:%.y=%)
15
16 LOCAL_CONFIG_H = lincan_config.h
17
18 ifeq ($(CONFIG_OC_LINCAN),y)
19
20 rtlinux_INCLUDES = -I $(srcdir)/../include -I .
21 kernel_INCLUDES = -I $(srcdir)/../include -I .
22 #kernel_INCLUDES += -DCAN_DEBUG
23 kernel_INCLUDES += -DWITH_DEVFS_FS
24
25 lincan_cards_SOURCES = $(lincan_cards_SELECTED:%=%.c)
26
27 ifeq ($(CONFIG_OC_LINCAN_CARD_unican),y)
28 lincan_cards_SOURCES += unican_cl2.c
29 endif
30
31 ifeq ($(CONFIG_OC_LINCAN_CARD_ipci165),y)
32 lincan_cards_SOURCES += ipci165_fw.c kthread.c
33 endif
34
35 ifneq ($(filter hms30c7202_can ns_dev_can,$(lincan_cards_SELECTED)),)
36 $(warning Not finished C_CAN support requested)
37 lincan_cards_SOURCES += c_can.c c_can_irq.c 
38 endif
39
40 ifneq ($(CONFIG_OC_LINCANRTL),y)
41
42 kernel_MODULES = lincan
43
44 else #CONFIG_OC_LINCANRTL
45
46 rtlinux_MODULES = lincan
47
48 rtlinux_INCLUDES +=  -DCAN_WITH_RTL
49 lincan_rtl_SOURCES = open_rtl.c close_rtl.c read_rtl.c write_rtl.c ioctl_rtl.c \
50                 can_quertl.c can_devrtl.c
51 endif #CONFIG_OC_LINCANRTL
52
53 lincan_SOURCES = can_queue.c can_quekern.c main.c modparms.c \
54                 devcommon.c setup.c finish.c irq.c boardlist.c \
55                 sja1000p.c sja1000.c i82527.c  \
56                 open.c close.c read.c write.c ioctl.c select.c fasync.c \
57                 proc.c ioctl_query.c ioctl_remote.c \
58                 $(lincan_cards_SOURCES) $(lincan_rtl_SOURCES)
59                 
60 endif #CONFIG_OC_LINCAN