# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos_var.gni") import("//developtools/profiler/build/config.gni") ohos_static_library("libdacconfig") { output_name = "libdacconfig" sources = [ "dac_config.cpp" ] part_name = "e2fsprogs" subsystem_name = "thirdparty" } config("e2fsprogs-defaults") { cflags = [ "-Wno-incompatible-pointer-types", "-Wno-tautological-constant-out-of-range-compare", ] } ###################################################### ##Build e2fsdroid ohos_executable("e2fsdroid") { configs = [ ":e2fsprogs-defaults" ] defines = [ "HAVE_SYS_TYPES_H" ] sources = [ "base_fs.c", "basefs_allocator.c", "block_list.c", "block_range.c", "e2fsdroid.c", "fsmap.c", "perms.c", ] include_dirs = [ ".", "//third_party/e2fsprogs/lib", "//third_party/e2fsprogs/lib/ext2fs", "//third_party/e2fsprogs/misc", "//third_party/selinux/libselinux/include", ] deps = [ "//third_party/e2fsprogs/contrib/android:libdacconfig", "//third_party/e2fsprogs/lib/et:libext2_com_err", "//third_party/e2fsprogs/lib/ext2fs:libext2fs", "//third_party/e2fsprogs/misc:libext2_misc", "//third_party/selinux:libselinux", ] install_enable = true subsystem_name = "thirdparty" part_name = "e2fsprogs" install_images = [ "system", "updater", ] }