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