1# Copyright (c) 2025 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("//base/print/print_fwk/print.gni") 15import("//build/ohos.gni") 16 17cflags_cc = [] 18 19config("sane_service_config") { 20 include_dirs = [ 21 "include", 22 "${target_gen_dir}", 23 ] 24 25 cflags_cc += [ 26 "-fno-exceptions", 27 "-fdata-sections", 28 "-ffunction-sections", 29 "-fno-asynchronous-unwind-tables", 30 "-fno-unwind-tables", 31 "-flto", 32 "-Os", 33 ] 34} 35 36_include_dirs = [ "${print_utils_path}/include" ] 37 38_sources = [ "src/sane_service_ability.cpp" ] 39 40_deps = [ "${print_path}/frameworks/ISaneBackends:sane_backends" ] 41 42_public_configs = [ ":sane_service_config" ] 43 44_external_deps = [ 45 "access_token:libaccesstoken_sdk", 46 "backends:sane", 47 "c_utils:utils", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 "ipc:ipc_napi", 51 "ipc:ipc_single", 52 "napi:ace_napi", 53 "safwk:system_ability_fwk", 54 "samgr:samgr_proxy", 55] 56 57ohos_shared_library("sane_service") { 58 include_dirs = _include_dirs 59 sources = _sources 60 deps = _deps 61 public_configs = _public_configs 62 external_deps = _external_deps 63 64 subsystem_name = "print" 65 part_name = "print_fwk" 66} 67 68ohos_static_library("sane_service_test") { 69 include_dirs = _include_dirs 70 sources = _sources 71 deps = _deps 72 public_configs = _public_configs 73 external_deps = _external_deps 74 75 subsystem_name = "print" 76 part_name = "print_fwk" 77} 78