1# Copyright (C) 2021 HiHope Open Source Organization . 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/ohos.gni") 15import("//device/soc/rockchip/rk3568/hardware/omx_il/rk_omx.gni") 16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 17 18ohos_static_library("RkOMX_OSAL") { 19 sources = [ 20 "Rockchip_OSAL_ColorUtils.cpp", 21 "Rockchip_OSAL_ETC.c", 22 "Rockchip_OSAL_Env.c", 23 "Rockchip_OSAL_Event.c", 24 "Rockchip_OSAL_Library.c", 25 "Rockchip_OSAL_Log.c", 26 "Rockchip_OSAL_Memory.c", 27 "Rockchip_OSAL_Mutex.c", 28 "Rockchip_OSAL_OHOS.cpp", 29 "Rockchip_OSAL_Queue.c", 30 "Rockchip_OSAL_RGA_Process.c", 31 "Rockchip_OSAL_Semaphore.c", 32 "Rockchip_OSAL_SharedMemory.c", 33 "Rockchip_OSAL_Thread.c", 34 ] 35 36 include_dirs = [ 37 ".", 38 "//device/soc/rockchip/rk3568/hardware/mpp/mpp/legacy", 39 "//device/soc/rockchip/rk3568/hardware/mpp/include", 40 "//device/soc/rockchip/rk3568/hardware/omx_il/component/common", 41 "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/dec", 42 "//device/soc/rockchip/rk3568/hardware/omx_il/component/video/enc", 43 "//device/soc/rockchip/rk3568/hardware/omx_il/include/khronos", 44 "//device/soc/rockchip/rk3568/hardware/omx_il/include/rockchip", 45 "//device/soc/rockchip/rk3568/hardware/omx_il/include/librkvpu", 46 "//device/soc/rockchip/rk3568/hardware/omx_il/include/librkvpu", 47 "//device/soc/rockchip/rk3568/hardware/rga/include", 48 "//drivers/hdf_core/framework/include/utils", 49 "//drivers/hdf_core/adapter/uhdf2/osal/include", 50 "//drivers/peripheral/base", 51 "//drivers/peripheral/display/interfaces/include", 52 "//drivers/peripheral/codec/interfaces/include", 53 "//third_party/libdrm/include/drm", 54 "//third_party/openmax/api/1.1.2", 55 "//commonlibrary/c_utils/base/include", 56 ] 57 58 cflags = [ 59 "-Wno-implicit-function-declaration", 60 "-Wno-unused-variable", 61 "-DAVS100=1", 62 "-DOHOS", 63 ] 64 65 cflags_cc = [ 66 "-Wno-implicit-function-declaration", 67 "-Wno-unused-variable", 68 "-Wno-format", 69 "-Wno-switch", 70 "-DAVS100=1", 71 "-DOHOS", 72 ] 73 74 if (USE_AFBC) { 75 cflags += [ "-DSUPPORT_AFBC" ] 76 cflags_cc += [ "-DSUPPORT_AFBC" ] 77 } 78 79 if (USE_GPU) { 80 cflags += [ "-DROCKCHIP_GPU_LIB_ENABLE" ] 81 cflags_cc += [ "-DROCKCHIP_GPU_LIB_ENABLE" ] 82 } 83 84 if (USE_RGA) { 85 cflags += [ "-DSUPPORT_RGA" ] 86 cflags_cc += [ "-DSUPPORT_RGA" ] 87 } 88 89 cflags += [ "-DOHOS_BUFFER_HANDLE" ] 90 cflags_cc += [ "-DOHOS_BUFFER_HANDLE" ] 91 92 deps = 93 [ "//device/soc/rockchip/rk3568/hardware/mpp/mpp/legacy:librockchip_vpu" ] 94 95 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 96} 97