1# Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/lite/config/component/lite_component.gni")
15lite_component("hi3516dv300_nnie_sample") {
16  features = [ ":ohos_nnie_demo" ]
17}
18
19need_link_mpp_lib = true
20if (need_link_mpp_lib) {
21  mpp_lib_path = "//device/soc/hisilicon/hi3516dv300/sdk_linux/out"
22}
23
24executable("ohos_nnie_demo") {
25  output_name = "ohos_nnie_demo"
26  sources = [
27    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/loadbmp.c",
28    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_audio.c",
29    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_isp.c",
30    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_region.c",
31    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_sys.c",
32    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_venc.c",
33    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_vi.c",
34    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_vo.c",
35    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common/sample_comm_vpss.c",
36    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/common/sample_comm_ive.c",
37    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/common/sample_comm_nnie.c",
38    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/common/sample_comm_svp.c",
39    "sample/sample_nnie.c",
40    "sample_nnie_main.c",
41    "sample_nnie_software/sample_svp_nnie_software.c",
42  ]
43
44  include_dirs = [
45    "//device/soc/hisilicon/hi3516dv300/sdk_linux/include",
46    "//device/soc/hisilicon/hi3516dv300/sdk_linux/drv/mpp/cbb/include",
47    "//device/soc/hisilicon/hi3516dv300/sdk_linux/drv/mpp/cbb/init",
48    "//device/soc/hisilicon/hi3516dv300/sdk_linux/mpp/include",
49    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/common",
50    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/common",
51    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/nnie/sample",
52    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/svp/nnie/sample_nnie_software",
53    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/vio/",
54    "//device/soc/hisilicon/hi3516dv300/sdk_linux/sample/platform/audio/adp",
55    "//third_party/bounds_checking_function/include",
56  ]
57
58  defines = [
59    "SENSOR0_TYPE=SONY_IMX335_MIPI_4M_30FPS_12BIT",
60    "SENSOR1_TYPE=SONY_IMX335_MIPI_4M_30FPS_12BIT",
61  ]
62
63  if (need_link_mpp_lib) {
64    outdir = rebase_path("$mpp_lib_path/lib")
65    ldflags = [ "-L$outdir" ]
66    ldflags += [ "-laaccomm" ]
67    ldflags += [ "-laacdec" ]
68    ldflags += [ "-laacenc" ]
69    ldflags += [ "-laacsbrdec" ]
70    ldflags += [ "-laacsbrenc" ]
71    ldflags += [ "-ldnvqe" ]
72    ldflags += [ "-lhdmi" ]
73    ldflags += [ "-lhi3516cv500_acodec" ]
74    ldflags += [ "-lhi3516cv500_adec" ]
75    ldflags += [ "-lhi3516cv500_aenc" ]
76    ldflags += [ "-lhi3516cv500_aio" ]
77    ldflags += [ "-lhi3516cv500_ai" ]
78    ldflags += [ "-lhi3516cv500_ao" ]
79    ldflags += [ "-lhi3516cv500_base" ]
80    ldflags += [ "-lhi3516cv500_chnl" ]
81    ldflags += [ "-lhi3516cv500_dis" ]
82    ldflags += [ "-lhi3516cv500_gdc" ]
83    ldflags += [ "-lhi3516cv500_h264e" ]
84    ldflags += [ "-lhi3516cv500_h265e" ]
85    ldflags += [ "-lhi3516cv500_isp" ]
86    ldflags += [ "-lhi3516cv500_ive" ]
87    ldflags += [ "-lhi3516cv500_jpegd" ]
88    ldflags += [ "-lhi3516cv500_jpege" ]
89    ldflags += [ "-lhi3516cv500_nnie" ]
90    ldflags += [ "-lhi3516cv500_rc" ]
91    ldflags += [ "-lhi3516cv500_rgn" ]
92    ldflags += [ "-lhi3516cv500_sys" ]
93    ldflags += [ "-lhi3516cv500_vdec" ]
94    ldflags += [ "-lhi3516cv500_vedu" ]
95    ldflags += [ "-lhi3516cv500_venc" ]
96    ldflags += [ "-lhi3516cv500_vfmw" ]
97    ldflags += [ "-lhi3516cv500_vgs" ]
98    ldflags += [ "-lhi3516cv500_vi" ]
99    ldflags += [ "-lhi3516cv500_vo" ]
100    ldflags += [ "-lhi3516cv500_vpss" ]
101    ldflags += [ "-l_hiacs" ]
102    ldflags += [ "-l_hiae" ]
103    ldflags += [ "-l_hiawb_natura" ]
104    ldflags += [ "-l_hiawb" ]
105    ldflags += [ "-l_hicalcflicker" ]
106    ldflags += [ "-l_hidehaze" ]
107    ldflags += [ "-l_hidrc" ]
108    ldflags += [ "-lhifisheyecalibrate" ]
109    ldflags += [ "-l_hiir_auto" ]
110    ldflags += [ "-lhi_irq" ]
111    ldflags += [ "-l_hildci" ]
112    ldflags += [ "-lhi_osal" ]
113    ldflags += [ "-lhi_sensor_i2c" ]
114    ldflags += [ "-lhive_AEC" ]
115    ldflags += [ "-lhive_AGC" ]
116    ldflags += [ "-lhive_ANR" ]
117    ldflags += [ "-lhive_common" ]
118    ldflags += [ "-lhive_EQ" ]
119    ldflags += [ "-lhive_HPF" ]
120    ldflags += [ "-lhive_record" ]
121    ldflags += [ "-lhive_RES_ext" ]
122    ldflags += [ "-lhive_RES" ]
123    ldflags += [ "-lhive_talkv2" ]
124    ldflags += [ "-lhive_wnr" ]
125    ldflags += [ "-lisp" ]
126    ldflags += [ "-live" ]
127    ldflags += [ "-lmd" ]
128    ldflags += [ "-lmpi" ]
129    ldflags += [ "-lmpp_vbs" ]
130    ldflags += [ "-lnnie" ]
131    ldflags += [ "-lsdk" ]
132    ldflags += [ "-lsecurec" ]
133    ldflags += [ "-lsns_imx335" ]
134    ldflags += [ "-ltde" ]
135    ldflags += [ "-lupvqe" ]
136    ldflags += [ "-lvb_server" ]
137    ldflags += [ "-lVoiceEngine" ]
138
139    deps = []
140  }
141}
142