summaryrefslogtreecommitdiff
path: root/hifi/xaf/hifi-dpf/build_hikey/Makefile
blob: e1980a0dfe32220f55da26d0b34b0131ba8c5c40 (plain)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#
# Copyright (C) 2018 Cadence Design Systems, Inc.
# 
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to use this Software with Cadence processor cores only and 
# not with any other processors and platforms, subject to
# the following conditions:
# 
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#


.PHONY: all install clean HIKEY960

NOSTRIP = 1
XF_TRACE = 1

ROOTDIR = ..
CODEC_NAME = hikey

PLUGINO2OBJS =
PLUGINLIBS =
PLUGININCLUDES =

XA_MP3_DECODER ?= 0
XA_VORBIS_DECODER ?= 1
XA_MIXER 	   ?= 1
XA_PCM 	   ?= 1


vpath %.c $(ROOTDIR)/ipc/xt-shmem/hikey
vpath %.c $(ROOTDIR)/ipc/xt-shmem
vpath %.c $(ROOTDIR)/core/util
vpath %.c $(ROOTDIR)/core/util/gdbstub
vpath %.c $(ROOTDIR)/core
vpath %.c $(ROOTDIR)/app
vpath %.c $(ROOTDIR)/audio

vpath %.S $(ROOTDIR)/ipc/xt-shmem/hikey
vpath %.S $(ROOTDIR)/core/util/gdbstub

vpath %.c $(ROOTDIR)/plugins/cadence/mixer

LIBXAFASMOBJS = \
			reset.o \
			int_vector.o \
			arch_hifi330.o \
			gdbstub-entry.o

LIBXAFO2OBJS = \
            cpu_c.o \
			dsp_debug.o \
			dsp_comm.o \
			mutex.o \
			rbtree.o \
			xf-core.o \
			xf-io.o \
			xf-mem.o \
			xf-msg.o \
			xf-sched.o \
			xa-factory.o \
			xf-shmem.o \
			tinyvprintf.o \
			xf-isr.o \
			gdbstub.o \
			xa-class-base.o \
			xa-class-audio-codec.o \
			xa-class-mixer.o \
			xf-main.o 

ifeq ($(XF_TRACE),1)
  CFLAGS         += -DXF_TRACE=1
  CFLAGS         += -DXAF_PROFILE_DSP=1
endif

ifeq ($(XA_MP3_DECODER),1)
  vpath %.c $(ROOTDIR)/plugins/cadence/mp3_dec
  CFLAGS         += -DXA_MP3_DECODER=1
  PLUGINO2OBJS   += xa-mp3-decoder.o
  PLUGINLIBS     += $(ROOTDIR)/plugins/cadence/mp3_dec/lib/hifi2/xa_mp3_dec.a 
  PLUGININCLUDES += -I$(ROOTDIR)/plugins/cadence/mp3_dec
endif

ifeq ($(XA_PCM),1)
  vpath %.c $(ROOTDIR)/plugins/cadence/pcm_proc
  CFLAGS         += -DXA_PCM=1
  PLUGINO2OBJS   += xa-pcm.o
  PLUGINLIBS     += 
  PLUGININCLUDES += -I$(ROOTDIR)/plugins/cadence/pcm_proc
endif  

ifeq ($(XA_VORBIS_DECODER),1)
  vpath %.c $(ROOTDIR)/plugins/cadence/vorbis_dec
  CFLAGS         += -DXA_VORBIS_DECODER=1
  PLUGINO2OBJS   += xa-vorbis-decoder.o
  PLUGINLIBS     += $(ROOTDIR)/plugins/cadence/vorbis_dec/lib/hifi3/xa_vorbis_dec.a
  PLUGININCLUDES += -I$(ROOTDIR)/plugins/cadence/vorbis_dec
endif

ifeq ($(XA_MIXER),1)
  vpath %.c $(ROOTDIR)/plugins/cadence/mixer
  CFLAGS         += -DXA_MIXER=1
  PLUGINO2OBJS   += xa-mixer.o
  PLUGINLIBS     += 
  PLUGININCLUDES += -I$(ROOTDIR)/plugins/cadence/mixer
endif

LIBO2OBJS = $(LIBXAFO2OBJS) $(LIBMP3DECO2OBJS) $(LIBMIXERO2OBJS) $(PLUGINO2OBJS)
LIBASMOBJS = $(LIBXAFASMOBJS)
 
INCLUDES += \
    -I$(ROOTDIR)/include \
    -I$(ROOTDIR)/include/audio \
    -I$(ROOTDIR)/include/sys/xt-shmem \
	-I$(ROOTDIR)/include/sys/xt-shmem/board-hikey \
    -I$(ROOTDIR)/plugins/cadence/mp3_dec 
    
INCLUDES += $(PLUGININCLUDES)

LDFLAGS += -nostdlib -lhal -lhandlers-board -lc -lgcc 
LDFLAGS += -mlsp="./hifi_hikey_lsp"

HIKEY960: $(CODEC_NAME) 

include $(ROOTDIR)/build_hikey/common.mk