Merge changes Ia3bcece1,Icd26dc1e
am: ec462238f6
Change-Id: Ied36c517ed7fa80dc85b07b1532821dc93628d40
This commit is contained in:
@@ -62,19 +62,10 @@ aaptHostStaticLibs := \
|
|||||||
libcutils \
|
libcutils \
|
||||||
libexpat \
|
libexpat \
|
||||||
libziparchive \
|
libziparchive \
|
||||||
libbase
|
libbase \
|
||||||
|
libz
|
||||||
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
|
|
||||||
|
|
||||||
|
aaptCFlags := -Wall -Werror
|
||||||
|
|
||||||
# ==========================================================
|
# ==========================================================
|
||||||
# Build the host static library: libaapt
|
# Build the host static library: libaapt
|
||||||
@@ -84,11 +75,9 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_MODULE := libaapt
|
LOCAL_MODULE := libaapt
|
||||||
LOCAL_MODULE_HOST_OS := darwin linux windows
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
||||||
LOCAL_CFLAGS := -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags)
|
LOCAL_CFLAGS := -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags)
|
||||||
LOCAL_CPPFLAGS := $(aaptCppFlags)
|
|
||||||
LOCAL_CFLAGS_darwin := -D_DARWIN_UNLIMITED_STREAMS
|
LOCAL_CFLAGS_darwin := -D_DARWIN_UNLIMITED_STREAMS
|
||||||
LOCAL_SRC_FILES := $(aaptSources)
|
LOCAL_SRC_FILES := $(aaptSources)
|
||||||
LOCAL_STATIC_LIBRARIES := $(aaptHostStaticLibs)
|
LOCAL_STATIC_LIBRARIES := $(aaptHostStaticLibs)
|
||||||
LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
|
|
||||||
|
|
||||||
include $(BUILD_HOST_STATIC_LIBRARY)
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
||||||
|
|
||||||
@@ -99,13 +88,9 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_MODULE := aapt
|
LOCAL_MODULE := aapt
|
||||||
LOCAL_MODULE_HOST_OS := darwin linux windows
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
||||||
LOCAL_CFLAGS := $(aaptCFlags)
|
LOCAL_CFLAGS := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" $(aaptCFlags)
|
||||||
LOCAL_CPPFLAGS := $(aaptCppFlags)
|
|
||||||
LOCAL_LDLIBS_darwin := $(aaptHostLdLibs_darwin)
|
|
||||||
LOCAL_LDLIBS_linux := $(aaptHostLdLibs_linux)
|
|
||||||
LOCAL_SRC_FILES := $(aaptMain)
|
LOCAL_SRC_FILES := $(aaptMain)
|
||||||
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
|
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
|
||||||
LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
|
|
||||||
|
|
||||||
include $(BUILD_HOST_EXECUTABLE)
|
include $(BUILD_HOST_EXECUTABLE)
|
||||||
|
|
||||||
@@ -117,13 +102,8 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_MODULE := libaapt_tests
|
LOCAL_MODULE := libaapt_tests
|
||||||
LOCAL_CFLAGS := $(aaptCFlags)
|
LOCAL_CFLAGS := $(aaptCFlags)
|
||||||
LOCAL_CPPFLAGS := $(aaptCppFlags)
|
|
||||||
LOCAL_LDLIBS_darwin := $(aaptHostLdLibs_darwin)
|
|
||||||
LOCAL_LDLIBS_linux := $(aaptHostLdLibs_linux)
|
|
||||||
LOCAL_SRC_FILES := $(aaptTests)
|
LOCAL_SRC_FILES := $(aaptTests)
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
||||||
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
|
LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs)
|
||||||
LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows)
|
|
||||||
|
|
||||||
include $(BUILD_HOST_NATIVE_TEST)
|
include $(BUILD_HOST_NATIVE_TEST)
|
||||||
|
|
||||||
|
|||||||
@@ -29,24 +29,6 @@
|
|||||||
|
|
||||||
using namespace android;
|
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.
|
* Open the file read only. The call fails if the file doesn't exist.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,6 +20,23 @@ using namespace android;
|
|||||||
|
|
||||||
static const char* gProgName = "aapt";
|
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
|
* When running under Cygwin on Windows, this will convert slash-based
|
||||||
* paths into back-slash-based ones. Otherwise the ApptAssets file comparisons
|
* paths into back-slash-based ones. Otherwise the ApptAssets file comparisons
|
||||||
|
|||||||
@@ -39,14 +39,9 @@ cc_defaults {
|
|||||||
windows: {
|
windows: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
cflags: ["-Wno-maybe-uninitialized"],
|
cflags: ["-Wno-maybe-uninitialized"],
|
||||||
static_libs: ["libz"],
|
|
||||||
},
|
},
|
||||||
darwin: {
|
darwin: {
|
||||||
cflags: ["-D_DARWIN_UNLIMITED_STREAMS"],
|
cflags: ["-D_DARWIN_UNLIMITED_STREAMS"],
|
||||||
host_ldlibs: ["-lz"],
|
|
||||||
},
|
|
||||||
linux: {
|
|
||||||
host_ldlibs: ["-lz"],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
static_libs: [
|
static_libs: [
|
||||||
@@ -59,6 +54,7 @@ cc_defaults {
|
|||||||
"libpng",
|
"libpng",
|
||||||
"libbase",
|
"libbase",
|
||||||
"libprotobuf-cpp-lite",
|
"libprotobuf-cpp-lite",
|
||||||
|
"libz",
|
||||||
],
|
],
|
||||||
group_static_libs: true,
|
group_static_libs: true,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ testSources := \
|
|||||||
TestRules.cpp
|
TestRules.cpp
|
||||||
|
|
||||||
cIncludes := \
|
cIncludes := \
|
||||||
external/zlib \
|
|
||||||
frameworks/base/tools
|
frameworks/base/tools
|
||||||
|
|
||||||
hostStaticLibs := \
|
hostStaticLibs := \
|
||||||
@@ -52,18 +51,11 @@ hostStaticLibs := \
|
|||||||
libcutils \
|
libcutils \
|
||||||
libexpat \
|
libexpat \
|
||||||
libziparchive \
|
libziparchive \
|
||||||
libbase
|
libbase \
|
||||||
|
libz
|
||||||
|
|
||||||
cFlags := -Wall -Werror
|
cFlags := -Wall -Werror
|
||||||
|
|
||||||
hostLdLibs_linux := -lrt -ldl -lpthread
|
|
||||||
|
|
||||||
# Statically link libz for MinGW (Win SDK under Linux),
|
|
||||||
# and dynamically link for all others.
|
|
||||||
hostStaticLibs_windows := libz
|
|
||||||
hostLdLibs_darwin := -lz
|
|
||||||
hostLdLibs_linux += -lz
|
|
||||||
|
|
||||||
|
|
||||||
# ==========================================================
|
# ==========================================================
|
||||||
# Build the host static library: libsplit-select
|
# Build the host static library: libsplit-select
|
||||||
@@ -91,9 +83,6 @@ LOCAL_SRC_FILES := $(testSources)
|
|||||||
|
|
||||||
LOCAL_C_INCLUDES := $(cIncludes)
|
LOCAL_C_INCLUDES := $(cIncludes)
|
||||||
LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
|
LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
|
||||||
LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows)
|
|
||||||
LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin)
|
|
||||||
LOCAL_LDLIBS_linux := $(hostLdLibs_linux)
|
|
||||||
LOCAL_CFLAGS := $(cFlags)
|
LOCAL_CFLAGS := $(cFlags)
|
||||||
|
|
||||||
include $(BUILD_HOST_NATIVE_TEST)
|
include $(BUILD_HOST_NATIVE_TEST)
|
||||||
@@ -109,9 +98,6 @@ LOCAL_SRC_FILES := $(main)
|
|||||||
|
|
||||||
LOCAL_C_INCLUDES := $(cIncludes)
|
LOCAL_C_INCLUDES := $(cIncludes)
|
||||||
LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
|
LOCAL_STATIC_LIBRARIES := libsplit-select $(hostStaticLibs)
|
||||||
LOCAL_STATIC_LIBRARIES_windows := $(hostStaticLibs_windows)
|
|
||||||
LOCAL_LDLIBS_darwin := $(hostLdLibs_darwin)
|
|
||||||
LOCAL_LDLIBS_linux := $(hostLdLibs_linux)
|
|
||||||
LOCAL_CFLAGS := $(cFlags)
|
LOCAL_CFLAGS := $(cFlags)
|
||||||
|
|
||||||
include $(BUILD_HOST_EXECUTABLE)
|
include $(BUILD_HOST_EXECUTABLE)
|
||||||
|
|||||||
Reference in New Issue
Block a user