1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Composite Makefile
DIRSEP=/
TI_DSPLINK_RELATIVE_PATH := ../
# include the CURRENTCFG.mk
include $(DSPLINK)$(DIRSEP)config$(DIRSEP)BUILD$(DIRSEP)CURRENTCFG.MK
# Generate the list of sources
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)arch$(DIRSEP)SOURCES
ARCH_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)arch$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)SOURCES
LDRV_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
LDRV_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)gen$(DIRSEP)SOURCES
GEN_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)gen$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)SOURCES
PMGR_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
PMGR_SOURCES += $(addpreifx $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES
PMGR_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP)SOURCES
OSAL_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES
OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES))
DSPLINK_SOURCES := $(ARCH_SOURCES) $(LDRV_SOURCES) $(GEN_SOURCES) $(OSAL_SOURCES) $(PMGR_SOURCES)
DSPLINK_OBJS := $(foreach srcFile, $(DSPLINK_SOURCES),$(basename $(srcFile)).o)
################################################################################################
# USER SIDE
# Generate the list of sources
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)SOURCES
API_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
API_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES))
# CFLAGS
EXTRA_CFLAGS = $(addprefix -D, $(TI_DSPLINK_GPP_DEFINES))
EXTRA_CFLAGS += $(addprefix -I, $(TI_DSPLINK_GPP_INC_PATH))
EXTRA_CFLAGS += -DEXPORT_SYMTAB
EXTRA_CFLAGS += -DTRACE_KERNEL
ifneq ($(KERNELRELEASE),)
obj-m := dsplinkk.o
libs-m := $(shell pwd)
lib-m := $(foreach srcFile, $(API_SOURCES),$(basename $(srcFile)).o)
dsplinkk-objs := $(DSPLINK_OBJS)
else
KDIR := /opt/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500
PWD := $(shell pwd)
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif
clean:
find $(DSPLINK) -name "*.o" -exec rm {} \;
rm -fr dsplinkk.ko dsplinkk.mod.c Module.symvers
|