aboutsummaryrefslogtreecommitdiffstats
path: root/tools/zipalign
diff options
context:
space:
mode:
Diffstat (limited to 'tools/zipalign')
-rw-r--r--tools/zipalign/Android.bp31
-rw-r--r--tools/zipalign/Android.mk38
2 files changed, 31 insertions, 38 deletions
diff --git a/tools/zipalign/Android.bp b/tools/zipalign/Android.bp
new file mode 100644
index 0000000000..cfc6aecdf0
--- /dev/null
+++ b/tools/zipalign/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright 2008 The Android Open Source Project
+//
+// Zip alignment tool
+//
+
+cc_binary_host {
+ name: "zipalign",
+
+ srcs: [
+ "ZipAlign.cpp",
+ "ZipEntry.cpp",
+ "ZipFile.cpp",
+ ],
+
+ static_libs: [
+ "libandroidfw",
+ "libutils",
+ "libcutils",
+ "liblog",
+ "libzopfli",
+ "libz",
+ ],
+
+ target: {
+ windows: {
+ host_ldlibs: ["-lpthread"],
+ enabled: true,
+ },
+ },
+}
diff --git a/tools/zipalign/Android.mk b/tools/zipalign/Android.mk
deleted file mode 100644
index 8c0240a27c..0000000000
--- a/tools/zipalign/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright 2008 The Android Open Source Project
-#
-# Zip alignment tool
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- ZipAlign.cpp \
- ZipEntry.cpp \
- ZipFile.cpp
-
-LOCAL_C_INCLUDES += external/zlib \
- external/zopfli/src
-
-LOCAL_STATIC_LIBRARIES := \
- libandroidfw \
- libutils \
- libcutils \
- liblog \
- libzopfli
-
-LOCAL_LDLIBS_linux += -lrt
-
-LOCAL_STATIC_LIBRARIES_windows += libz
-LOCAL_LDLIBS_linux += -lz
-LOCAL_LDLIBS_darwin += -lz
-
-ifneq ($(strip $(BUILD_HOST_static)),)
-LOCAL_LDLIBS += -lpthread
-endif # BUILD_HOST_static
-
-LOCAL_MODULE := zipalign
-LOCAL_MODULE_HOST_OS := darwin linux windows
-
-include $(BUILD_HOST_EXECUTABLE)