1# Copyright (c) 2021 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_var.gni") 16import("//developtools/profiler/build/config.gni") 17 18ohos_static_library("libdacconfig") { 19 output_name = "libdacconfig" 20 21 sources = [ "dac_config.cpp" ] 22 23 part_name = "e2fsprogs" 24 subsystem_name = "thirdparty" 25} 26config("e2fsprogs-defaults") { 27 cflags = [ 28 "-Wno-incompatible-pointer-types", 29 "-Wno-tautological-constant-out-of-range-compare", 30 ] 31} 32 33###################################################### 34##Build e2fsdroid 35ohos_executable("e2fsdroid") { 36 configs = [ ":e2fsprogs-defaults" ] 37 38 defines = [ "HAVE_SYS_TYPES_H" ] 39 sources = [ 40 "base_fs.c", 41 "basefs_allocator.c", 42 "block_list.c", 43 "block_range.c", 44 "e2fsdroid.c", 45 "fsmap.c", 46 "perms.c", 47 ] 48 49 include_dirs = [ 50 ".", 51 "//third_party/e2fsprogs/lib", 52 "//third_party/e2fsprogs/lib/ext2fs", 53 "//third_party/e2fsprogs/misc", 54 "//third_party/selinux/libselinux/include", 55 ] 56 57 deps = [ 58 "//third_party/e2fsprogs/contrib/android:libdacconfig", 59 "//third_party/e2fsprogs/lib/et:libext2_com_err", 60 "//third_party/e2fsprogs/lib/ext2fs:libext2fs", 61 "//third_party/e2fsprogs/misc:libext2_misc", 62 "//third_party/selinux:libselinux", 63 ] 64 65 install_enable = true 66 subsystem_name = "thirdparty" 67 part_name = "e2fsprogs" 68 install_images = [ 69 "system", 70 "updater", 71 ] 72} 73