Structured comments updated.
[lincan.git] / lincan / src / Makefile.omk
1 lincan_cards_NAMES = pip pccan smartcan nsi cc_can104 \
2                 pc_i03 pcm3680 aim104 m437 pcccan ssv \
3                 bfadcan pikronisa kv_pcican msmcan unican virtual template
4
5 default_CONFIG = CONFIG_OC_LINCAN=y CONFIG_OC_LINCANRTL=n
6 default_CONFIG += CONFIG_OC_LINCAN_PORTIO_ONLY=n CONFIG_OC_LINCAN_MEMIO_ONLY=n
7 default_CONFIG += $(foreach n, $(lincan_cards_NAMES), CONFIG_OC_LINCAN_CARD_$(n)=y)
8
9
10 lincan_cards_SELECTED = $(filter %.y, $(foreach x, $(lincan_cards_NAMES), $(x).$(CONFIG_OC_LINCAN_CARD_$(x))))
11 lincan_cards_SELECTED := $(lincan_cards_SELECTED:%.y=%)
12
13
14 LOCAL_CONFIG_H = lincan_config.h
15
16 ifeq ($(CONFIG_OC_LINCAN),y)
17
18 rtlinux_INCLUDES = -I $(srcdir)/../include -I .
19 kernel_INCLUDES = -I $(srcdir)/../include -I .
20 #kernel_INCLUDES += -DCAN_DEBUG
21 kernel_INCLUDES += -DWITH_DEVFS_FS
22
23 lincan_cards_SOURCES = $(lincan_cards_SELECTED:%=%.c)
24
25 ifneq ($(CONFIG_OC_LINCANRTL),y)
26
27 kernel_MODULES = lincan
28
29 else #CONFIG_OC_LINCANRTL
30
31 rtlinux_MODULES = lincan
32
33 rtlinux_INCLUDES +=  -DCAN_WITH_RTL
34 lincan_rtl_SOURCES = open_rtl.c close_rtl.c read_rtl.c write_rtl.c ioctl_rtl.c \
35                 can_quertl.c can_devrtl.c
36 endif #CONFIG_OC_LINCANRTL
37
38 lincan_SOURCES = can_queue.c can_quekern.c main.c modparms.c \
39                 devcommon.c setup.c finish.c irq.c boardlist.c \
40                 sja1000p.c sja1000.c i82527.c  \
41                 open.c close.c read.c write.c ioctl.c select.c fasync.c \
42                 proc.c ioctl_query.c $(lincan_cards_SOURCES) $(lincan_rtl_SOURCES)
43                 
44 endif #CONFIG_OC_LINCAN