summaryrefslogtreecommitdiff
path: root/tools/aapt
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-09-09 20:03:39 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-09-09 20:03:39 +0000
commit848755812040389041fdaee5f75be6348c79a6a1 (patch)
tree7cb7f2be6af29f141114649ab9c1ffa3e8b86088 /tools/aapt
parentc80623a641c5b633b077bea2d7f2e2aeae7bf020 (diff)
parenteb211c23d572422e80e5e1159c28d7bed2283da2 (diff)
Merge changes Ia3bcece1,Icd26dc1e am: ec462238f6 am: c201a6bb7d am: 9539d236e7
am: eb211c23d5 Change-Id: I0b4d324af3a1d7dad4648a9d0ffe0d8c44bee6a9
Diffstat (limited to 'tools/aapt')
-rw-r--r--tools/aapt/Android.mk28
-rw-r--r--tools/aapt/Command.cpp18
-rw-r--r--tools/aapt/Main.cpp17
3 files changed, 21 insertions, 42 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk
index 04f46d9b27fc..e74a3dfbb839 100644
--- a/tools/aapt/Android.mk
+++ b/tools/aapt/Android.mk
@@ -62,19 +62,10 @@ aaptHostStaticLibs := \
libcutils \
libexpat \
libziparchive \
- libbase
-
-aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\"
-aaptCFlags += -Wall -Werror
-
-aaptHostLdLibs_linux := -lrt -ldl -lpthread
-
-# Statically link libz for MinGW (Win SDK under Linux),
-# and dynamically link for all others.
-aaptHostStaticLibs_windows := libz
-aaptHostLdLibs_linux += -lz
-aaptHostLdLibs_darwin := -lz
+ libbase \
+ libz
+aaptCFlags := -Wall -Werror
# ==========================================================
# Build the host static library: libaapt
@@ -84,11 +75,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libaapt
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_CFLAGS := -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
LOCAL_CFLAGS_darwin := -D_DARWIN_UNLIMITED_STREAMS
LOCAL_SRC_FILES := $(aaptSources)
LOCAL_STATIC_LIBRARIES := $(aaptHostStaticLibs)
-LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -99,13 +88,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE := aapt
LOCAL_MODULE_HOST_OS := darwin linux windows
-LOCAL_CFLAGS := $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
-LOCAL_LDLIBS_darwin := $(aaptHostLdLibs_darwin)
-LOCAL_LDLIBS_linux := $(aaptHostLdLibs_linux)
+LOCAL_CFLAGS := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" $(aaptCFlags)
LOCAL_SRC_FILES := $(aaptMain)
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
-LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
include $(BUILD_HOST_EXECUTABLE)
@@ -117,13 +102,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libaapt_tests
LOCAL_CFLAGS := $(aaptCFlags)
-LOCAL_CPPFLAGS := $(aaptCppFlags)
-LOCAL_LDLIBS_darwin := $(aaptHostLdLibs_darwin)
-LOCAL_LDLIBS_linux := $(aaptHostLdLibs_linux)
LOCAL_SRC_FILES := $(aaptTests)
-LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
-LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
include $(BUILD_HOST_NATIVE_TEST)
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index ba731801e507..5e8580255197 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -29,24 +29,6 @@
using namespace android;
-#ifndef AAPT_VERSION
- #define AAPT_VERSION ""
-#endif
-
-/*
- * Show version info. All the cool kids do it.
- */
-int doVersion(Bundle* bundle)
-{
- if (bundle->getFileSpecCount() != 0) {
- printf("(ignoring extra arguments)\n");
- }
- printf("Android Asset Packaging Tool, v0.2-" AAPT_VERSION "\n");
-
- return 0;
-}
-
-
/*
* Open the file read only. The call fails if the file doesn't exist.
*
diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp
index 417b7ae087e1..d714687ee914 100644
--- a/tools/aapt/Main.cpp
+++ b/tools/aapt/Main.cpp
@@ -20,6 +20,23 @@ using namespace android;
static const char* gProgName = "aapt";
+#ifndef AAPT_VERSION
+ #define AAPT_VERSION ""
+#endif
+
+/*
+ * Show version info. All the cool kids do it.
+ */
+int doVersion(Bundle* bundle)
+{
+ if (bundle->getFileSpecCount() != 0) {
+ printf("(ignoring extra arguments)\n");
+ }
+ printf("Android Asset Packaging Tool, v0.2-" AAPT_VERSION "\n");
+
+ return 0;
+}
+
/*
* When running under Cygwin on Windows, this will convert slash-based
* paths into back-slash-based ones. Otherwise the ApptAssets file comparisons