aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-10-31 10:23:28 -0700
committerDan Willemsen <dwillemsen@google.com>2018-10-31 10:23:28 -0700
commit646af625ced09e5d81e07fe8c02c32017e3cbc07 (patch)
tree4010a398224a72347fda547566f29e9b08e18b91
parent587a2cb18bb55fbd821c1af7d4997c7345347f5d (diff)
downloadgptfdisk-646af625ced09e5d81e07fe8c02c32017e3cbc07.tar.gz
Convert to Android.bp
See build/soong/README.md for more information. Test: cd external/gptfdisk; mma Change-Id: Ie108b4ed8387b0864e63f73a0817eb131b7ef6dc
-rw-r--r--Android.bp39
-rw-r--r--Android.mk52
2 files changed, 39 insertions, 52 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..11e2767
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,39 @@
+cc_binary {
+ name: "sgdisk",
+ host_supported: true,
+
+ srcs: [
+ "sgdisk.cc",
+ "gptcl.cc",
+ "crc32.cc",
+ "support.cc",
+ "guid.cc",
+ "gptpart.cc",
+ "mbrpart.cc",
+ "basicmbr.cc",
+ "mbr.cc",
+ "gpt.cc",
+ "bsd.cc",
+ "parttypes.cc",
+ "attributes.cc",
+ "diskio.cc",
+ "diskio-unix.cc",
+ "android_popt.cc",
+ ],
+ cflags: [
+ "-Wno-unused-parameter",
+ "-Wno-pragma-pack",
+ "-Werror",
+ ],
+
+ shared_libs: ["libext2_uuid"],
+
+ target: {
+ darwin: {
+ cflags: [
+ "-D_FILE_OFFSET_BITS=64",
+ "-Doff64_t=off_t",
+ ],
+ },
+ },
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 1d862dc..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-sgdisk_src_files := \
- sgdisk.cc \
- gptcl.cc \
- crc32.cc \
- support.cc \
- guid.cc \
- gptpart.cc \
- mbrpart.cc \
- basicmbr.cc \
- mbr.cc \
- gpt.cc \
- bsd.cc \
- parttypes.cc \
- attributes.cc \
- diskio.cc \
- diskio-unix.cc \
- android_popt.cc \
-
-include $(CLEAR_VARS)
-
-LOCAL_CPP_EXTENSION := .cc
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH) external/e2fsprogs/lib
-LOCAL_SRC_FILES := $(sgdisk_src_files)
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-pragma-pack -Werror
-
-LOCAL_SHARED_LIBRARIES := libext2_uuid
-
-LOCAL_MODULE := sgdisk
-
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-
-LOCAL_CPP_EXTENSION := .cc
-
-ifeq ($(HOST_OS),darwin)
-LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64 -Doff64_t=off_t
-endif
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH) external/e2fsprogs/lib
-LOCAL_SRC_FILES := $(sgdisk_src_files)
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-pragma-pack -Werror
-
-LOCAL_SHARED_LIBRARIES := libext2_uuid
-
-LOCAL_MODULE := sgdisk_host
-LOCAL_MODULE_STEM := sgdisk
-
-include $(BUILD_HOST_EXECUTABLE)