15bebb993Sopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd. 25bebb993Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 35bebb993Sopenharmony_ci# you may not use this file except in compliance with the License. 45bebb993Sopenharmony_ci# You may obtain a copy of the License at 55bebb993Sopenharmony_ci# 65bebb993Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 75bebb993Sopenharmony_ci# 85bebb993Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 95bebb993Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 105bebb993Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115bebb993Sopenharmony_ci# See the License for the specific language governing permissions and 125bebb993Sopenharmony_ci# limitations under the License. 135bebb993Sopenharmony_ci 145bebb993Sopenharmony_ciimport("//build/ohos.gni") 155bebb993Sopenharmony_ciimport("//build/ohos/ndk/ndk.gni") 165bebb993Sopenharmony_ciimport("//foundation/filemanagement/file_api/file_api.gni") 175bebb993Sopenharmony_ci 185bebb993Sopenharmony_ciohos_shared_library("ohenvironment") { 195bebb993Sopenharmony_ci cflags = [ 205bebb993Sopenharmony_ci "-fdata-sections", 215bebb993Sopenharmony_ci "-ffunction-sections", 225bebb993Sopenharmony_ci "-Oz", 235bebb993Sopenharmony_ci ] 245bebb993Sopenharmony_ci cflags_cc = [ 255bebb993Sopenharmony_ci "-fvisibility-inlines-hidden", 265bebb993Sopenharmony_ci "-Oz", 275bebb993Sopenharmony_ci ] 285bebb993Sopenharmony_ci sanitize = { 295bebb993Sopenharmony_ci integer_overflow = true 305bebb993Sopenharmony_ci ubsan = true 315bebb993Sopenharmony_ci boundary_sanitize = true 325bebb993Sopenharmony_ci cfi = true 335bebb993Sopenharmony_ci cfi_cross_dso = true 345bebb993Sopenharmony_ci debug = false 355bebb993Sopenharmony_ci } 365bebb993Sopenharmony_ci include_dirs = [ "./" ] 375bebb993Sopenharmony_ci 385bebb993Sopenharmony_ci sources = [ "./environment.c" ] 395bebb993Sopenharmony_ci deps = [ "${file_api_path}/interfaces/kits/native:environment_native" ] 405bebb993Sopenharmony_ci external_deps = [] 415bebb993Sopenharmony_ci 425bebb993Sopenharmony_ci output_name = "ohenvironment" 435bebb993Sopenharmony_ci output_extension = "so" 445bebb993Sopenharmony_ci relative_install_dir = "ndk" 455bebb993Sopenharmony_ci part_name = "file_api" 465bebb993Sopenharmony_ci subsystem_name = "filemanagement" 475bebb993Sopenharmony_ci} 485bebb993Sopenharmony_ci 495bebb993Sopenharmony_ciohos_ndk_headers("oh_environment_header") { 505bebb993Sopenharmony_ci dest_dir = "$ndk_headers_out_dir/filemanagement/environment/" 515bebb993Sopenharmony_ci sources = [ "./environment.h" ] 525bebb993Sopenharmony_ci} 535bebb993Sopenharmony_ci 545bebb993Sopenharmony_ciohos_ndk_library("libohenvironment") { 555bebb993Sopenharmony_ci output_name = "ohenvironment" 565bebb993Sopenharmony_ci output_extension = "so" 575bebb993Sopenharmony_ci ndk_description_file = "./libenvironment.ndk.json" 585bebb993Sopenharmony_ci system_capability = 595bebb993Sopenharmony_ci "SystemCapability.FileManagement.File.Environment.FolderObtain" 605bebb993Sopenharmony_ci} 61