summaryrefslogtreecommitdiff
path: root/debugfs
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2017-01-12 09:48:04 -0800
committerTheodore Ts'o <tytso@mit.edu>2017-05-23 23:00:54 -0400
commita95c632b53a3d80f6ed4bf9c1c0fdf270c6b04a6 (patch)
tree5531dff371b3f536aee548432c21643855cd8820 /debugfs
parent82eb7e909022ab9a5a87e4b8d31b9b4c0c887e5f (diff)
AOSP: Convert e2fsprogs targets to soong.
This patch also removes all the "-host" and "_static" suffix from all the libraries adding "unique_host_soname: true". This prevents confusions with the host installed libraries. A new "libext2_misc" library is introduced to export some files from the misc/ directory to other binaries in this project. Bug: 34220783 Test: mmma external/e2fsprogs Change-Id: Ia1b689991346b11f8cb38f7c6ee356e666e01d6d From AOSP commit: 7a9e1a96766d31a41b88f0a539fcc3d532b5c530 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs')
-rw-r--r--debugfs/Android.bp71
-rw-r--r--debugfs/Android.mk93
2 files changed, 71 insertions, 93 deletions
diff --git a/debugfs/Android.bp b/debugfs/Android.bp
new file mode 100644
index 00000000..be0042ad
--- /dev/null
+++ b/debugfs/Android.bp
@@ -0,0 +1,71 @@
+// Copyright 2017 The Android Open Source Project
+
+//########################
+// Build the debugfs binary
+
+cc_defaults {
+ name: "debugfs-defaults",
+ srcs: [
+ "debug_cmds.c",
+ "debugfs.c",
+ "util.c",
+ "ncheck.c",
+ "icheck.c",
+ "ls.c",
+ "lsdel.c",
+ "dump.c",
+ "set_fields.c",
+ "logdump.c",
+ "htree.c",
+ "unused.c",
+ "e2freefrag.c",
+ "filefrag.c",
+ "extent_cmds.c",
+ "extent_inode.c",
+ "zap.c",
+ "create_inode.c",
+ "quota.c",
+ "xattrs.c",
+ "journal.c",
+ "revoke.c",
+ "recovery.c",
+ "do_journal.c",
+ ],
+ cflags: [
+ "-W",
+ "-Wall",
+ "-fno-strict-aliasing",
+ "-DDEBUGFS",
+ ],
+ include_dirs: [
+ "external/e2fsprogs/misc",
+ "external/e2fsprogs/e2fsck"
+ ],
+}
+
+debugfs_libs = [
+ "libext2fs",
+ "libext2_blkid",
+ "libext2_uuid",
+ "libext2_ss",
+ "libext2_quota",
+ "libext2_com_err",
+ "libext2_e2p",
+]
+
+cc_binary {
+ name: "debugfs",
+ host_supported: true,
+ defaults: ["debugfs-defaults"],
+
+ shared_libs: debugfs_libs,
+ system_shared_libs: ["libc"],
+}
+
+cc_binary {
+ name: "debugfs_static",
+ static_executable: true,
+ defaults: ["debugfs-defaults"],
+
+ static_libs: debugfs_libs,
+}
diff --git a/debugfs/Android.mk b/debugfs/Android.mk
deleted file mode 100644
index 91dc8c32..00000000
--- a/debugfs/Android.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-#########################
-# Build the debugfs binary
-
-debugfs_src_files := \
- debug_cmds.c \
- debugfs.c \
- util.c \
- ncheck.c\
- icheck.c \
- ls.c \
- lsdel.c \
- dump.c \
- set_fields.c \
- logdump.c \
- htree.c \
- unused.c \
- e2freefrag.c \
- filefrag.c \
- extent_cmds.c \
- extent_inode.c \
- zap.c \
- create_inode.c \
- quota.c \
- xattrs.c \
- journal.c \
- revoke.c \
- recovery.c \
- do_journal.c
-
-debugfs_shared_libraries := \
- libext2fs \
- libext2_blkid \
- libext2_uuid \
- libext2_ss \
- libext2_quota \
- libext2_com_err \
- libext2_e2p
-
-debugfs_system_shared_libraries := libc
-
-debugfs_static_libraries := \
- libext2fs \
- libext2_blkid \
- libext2_uuid_static \
- libext2_ss \
- libext2_quota \
- libext2_com_err \
- libext2_e2p
-
-debugfs_system_static_libraries := libc
-
-debugfs_c_includes := \
- external/e2fsprogs/e2fsck \
- external/e2fsprogs/misc \
- external/e2fsprogs/lib
-
-debugfs_cflags := -O2 -g -W -Wall -fno-strict-aliasing -DDEBUGFS
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(debugfs_src_files)
-LOCAL_C_INCLUDES := $(debugfs_c_includes)
-LOCAL_CFLAGS := $(debugfs_cflags)
-LOCAL_SYSTEM_SHARED_LIBRARIES := $(debugfs_system_shared_libraries)
-LOCAL_SHARED_LIBRARIES := $(debugfs_shared_libraries)
-LOCAL_MODULE := debugfs
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(debugfs_src_files)
-LOCAL_C_INCLUDES := $(debugfs_c_includes)
-LOCAL_CFLAGS := $(debugfs_cflags)
-LOCAL_STATIC_LIBRARIES := $(debugfs_static_libraries) $(debugfs_system_static_libraries)
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_MODULE := debugfs_static
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(debugfs_src_files)
-LOCAL_C_INCLUDES := $(debugfs_c_includes)
-LOCAL_CFLAGS := $(debugfs_cflags)
-LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(debugfs_shared_libraries))
-LOCAL_MODULE := debugfs_host
-LOCAL_MODULE_STEM := debugfs
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_HOST_EXECUTABLE)