1# Copyright (c) 2022 Huawei Device Co., Ltd. 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("//build/ohos/ndk/ndk.gni") 16 17config("libpurgeable_config") { 18 include_dirs = [ 19 "include", 20 "c/include", 21 "common/include", 22 "cpp/include", 23 "interfaces/kits/c", 24 "//foundation/resourceschedule/ffrt/interfaces/kits/", 25 ] 26 cflags_cc = [ "-fexceptions" ] 27} 28 29ohos_shared_library("libpurgeablemem") { 30 sources = [ 31 "c/src/purgeable_mem_builder_c.c", 32 "c/src/purgeable_mem_c.c", 33 "c/src/purgeable_memory.c", 34 "common/src/pm_state_c.c", 35 "common/src/ux_page_table_c.c", 36 "cpp/src/purgeable_ashmem.cpp", 37 "cpp/src/purgeable_mem.cpp", 38 "cpp/src/purgeable_mem_base.cpp", 39 "cpp/src/purgeable_mem_builder.cpp", 40 "cpp/src/purgeable_resource_manager.cpp", 41 "cpp/src/ux_page_table.cpp", 42 ] 43 external_deps = [ 44 "c_utils:utils", 45 "ffrt:libffrt", 46 "hilog:libhilog", 47 "hitrace:hitrace_meter", 48 "init:libbegetutil", 49 "ipc:ipc_core", 50 ] 51 public_configs = [ ":libpurgeable_config" ] 52 subsystem_name = "commonlibrary" 53 part_name = "memory_utils" 54} 55 56ohos_shared_library("purgeable_memory_ndk") { 57 include_dirs = [ "interfaces/kits/c" ] 58 59 sources = [ "c/src/purgeable_memory.c" ] 60 deps = [ ":libpurgeablemem" ] 61 external_deps = [ 62 "c_utils:utils", 63 "hilog:libhilog", 64 ] 65 66 relative_install_dir = "ndk" 67 subsystem_name = "commonlibrary" 68 part_name = "memory_utils" 69} 70