diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/aapt/Android.mk | 58 | ||||
| -rw-r--r-- | tools/aapt/CacheUpdater.h | 4 | ||||
| -rw-r--r-- | tools/aapt/Command.cpp | 4 | ||||
| -rw-r--r-- | tools/aapt/CrunchCache.cpp | 1 | ||||
| -rw-r--r-- | tools/aapt/Main.cpp | 1 | ||||
| -rw-r--r-- | tools/aapt/Resource.cpp | 2 | ||||
| -rw-r--r-- | tools/aapt/StringPool.h | 2 | ||||
| -rw-r--r-- | tools/aapt/XMLNode.cpp | 2 | ||||
| -rw-r--r-- | tools/aapt/XMLNode.h | 2 | ||||
| -rw-r--r-- | tools/aapt/pseudolocalize.h | 2 | ||||
| -rw-r--r-- | tools/aapt2/Android.mk | 8 | ||||
| -rw-r--r-- | tools/aapt2/Files.cpp | 4 | ||||
| -rw-r--r-- | tools/aapt2/SourceXmlPullParser.h | 2 | ||||
| -rw-r--r-- | tools/aapt2/XmlDom.cpp | 2 | ||||
| -rw-r--r-- | tools/aapt2/XmlDom.h | 2 | ||||
| -rw-r--r-- | tools/aidl | 4 | ||||
| -rw-r--r-- | tools/layoutlib/Android.mk | 7 | ||||
| -rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java | 2 | ||||
| -rw-r--r-- | tools/split-select/Android.mk | 39 |
19 files changed, 74 insertions, 74 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index b991d55dc343..b7014454771c 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -54,12 +54,6 @@ aaptTests := \ tests/ResourceFilter_test.cpp \ tests/ResourceTable_test.cpp -aaptCIncludes := \ - system/core/base/include \ - external/libpng \ - external/zlib - -aaptHostLdLibs := aaptHostStaticLibs := \ libandroidfw \ libpng \ @@ -70,20 +64,16 @@ aaptHostStaticLibs := \ libziparchive-host \ libbase -aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER)\" +aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" aaptCFlags += -Wall -Werror -ifeq ($(HOST_OS),linux) - aaptHostLdLibs += -lrt -ldl -lpthread -endif +aaptHostLdLibs_linux := -lrt -ldl -lpthread # Statically link libz for MinGW (Win SDK under Linux), # and dynamically link for all others. -ifneq ($(strip $(USE_MINGW)),) - aaptHostStaticLibs += libz -else - aaptHostLdLibs += -lz -endif +aaptHostStaticLibs_windows := libz +aaptHostLdLibs_linux += -lz +aaptHostLdLibs_darwin := -lz # ========================================================== @@ -92,13 +82,13 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := libaapt -LOCAL_CFLAGS += -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags) -LOCAL_CPPFLAGS += $(aaptCppFlags) -ifeq (darwin,$(HOST_OS)) -LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS -endif -LOCAL_C_INCLUDES += $(aaptCIncludes) +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) @@ -108,11 +98,14 @@ include $(BUILD_HOST_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := aapt -LOCAL_CFLAGS += $(aaptCFlags) -LOCAL_CPPFLAGS += $(aaptCppFlags) -LOCAL_LDLIBS += $(aaptHostLdLibs) +LOCAL_MODULE_HOST_OS := darwin linux windows +LOCAL_CFLAGS := $(aaptCFlags) +LOCAL_CPPFLAGS := $(aaptCppFlags) +LOCAL_LDLIBS_darwin := $(aaptHostLdLibs_darwin) +LOCAL_LDLIBS_linux := $(aaptHostLdLibs_linux) LOCAL_SRC_FILES := $(aaptMain) -LOCAL_STATIC_LIBRARIES += libaapt $(aaptHostStaticLibs) +LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs) +LOCAL_STATIC_LIBRARIES_windows := $(aaptHostStaticLibs_windows) include $(BUILD_HOST_EXECUTABLE) @@ -121,15 +114,16 @@ include $(BUILD_HOST_EXECUTABLE) # Build the host tests: libaapt_tests # ========================================================== include $(CLEAR_VARS) -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_MODULE := libaapt_tests -LOCAL_CFLAGS += $(aaptCFlags) -LOCAL_CPPFLAGS += $(aaptCppFlags) -LOCAL_LDLIBS += $(aaptHostLdLibs) -LOCAL_SRC_FILES += $(aaptTests) -LOCAL_C_INCLUDES += $(LOCAL_PATH) -LOCAL_STATIC_LIBRARIES += libaapt $(aaptHostStaticLibs) +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/CacheUpdater.h b/tools/aapt/CacheUpdater.h index fade53ac2629..10a1bbc2f4aa 100644 --- a/tools/aapt/CacheUpdater.h +++ b/tools/aapt/CacheUpdater.h @@ -12,7 +12,7 @@ #include <sys/stat.h> #include <stdio.h> #include "Images.h" -#ifdef HAVE_MS_C_RUNTIME +#ifdef _WIN32 #include <direct.h> #endif @@ -81,7 +81,7 @@ public: // Advance to the next segment of the path existsPath.appendPath(toCreate.walkPath(&remains)); toCreate = remains; -#ifdef HAVE_MS_C_RUNTIME +#ifdef _WIN32 _mkdir(existsPath.string()); #else mkdir(existsPath.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index d63fe31271b8..5e2e82601b47 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -215,7 +215,7 @@ int doList(Bundle* bundle) goto bail; } -#ifdef HAVE_ANDROID_OS +#ifdef __ANDROID__ static const bool kHaveAndroidOs = true; #else static const bool kHaveAndroidOs = false; @@ -734,7 +734,7 @@ int doDump(Bundle* bundle) Asset* asset = NULL; if (strcmp("resources", option) == 0) { -#ifndef HAVE_ANDROID_OS +#ifndef __ANDROID__ res.print(bundle->getValues()); #endif diff --git a/tools/aapt/CrunchCache.cpp b/tools/aapt/CrunchCache.cpp index 6c39d1d7753c..0d574cf127dd 100644 --- a/tools/aapt/CrunchCache.cpp +++ b/tools/aapt/CrunchCache.cpp @@ -5,6 +5,7 @@ // This file defines functions laid out and documented in // CrunchCache.h +#include <utils/Compat.h> #include <utils/Vector.h> #include <utils/String8.h> diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index f832c605376c..bcf0d5e53c07 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -6,6 +6,7 @@ #include "Main.h" #include "Bundle.h" +#include <utils/Compat.h> #include <utils/Log.h> #include <utils/threads.h> #include <utils/List.h> diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 5d208152e084..a4e5d3de69c1 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -2682,7 +2682,7 @@ status_t writeResourceSymbols(Bundle* bundle, const sp<AaptAssets>& assets, if (s > last && (*s == '.' || *s == 0)) { String8 part(last, s-last); dest.appendPath(part); -#ifdef HAVE_MS_C_RUNTIME +#ifdef _WIN32 _mkdir(dest.string()); #else mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h index dbe8c8542185..4b0d920c3274 100644 --- a/tools/aapt/StringPool.h +++ b/tools/aapt/StringPool.h @@ -20,8 +20,6 @@ #include <ctype.h> #include <errno.h> -#include <libexpat/expat.h> - using namespace android; #define PRINT_STRING_METRICS 0 diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp index ca3f68748ef9..dc08eb806356 100644 --- a/tools/aapt/XMLNode.cpp +++ b/tools/aapt/XMLNode.cpp @@ -12,7 +12,7 @@ #include <errno.h> #include <string.h> -#ifndef HAVE_MS_C_RUNTIME +#ifndef _WIN32 #define O_BINARY 0 #endif diff --git a/tools/aapt/XMLNode.h b/tools/aapt/XMLNode.h index 3161f6500291..b9e5cd574cdc 100644 --- a/tools/aapt/XMLNode.h +++ b/tools/aapt/XMLNode.h @@ -10,6 +10,8 @@ #include "StringPool.h" #include "ResourceTable.h" +#include <expat.h> + class XMLNode; extern const char* const RESOURCES_ROOT_NAMESPACE; diff --git a/tools/aapt/pseudolocalize.h b/tools/aapt/pseudolocalize.h index 71b974b0c269..1faecd14172d 100644 --- a/tools/aapt/pseudolocalize.h +++ b/tools/aapt/pseudolocalize.h @@ -1,7 +1,7 @@ #ifndef HOST_PSEUDOLOCALIZE_H #define HOST_PSEUDOLOCALIZE_H -#include <base/macros.h> +#include <android-base/macros.h> #include "StringPool.h" class PseudoMethodImpl { diff --git a/tools/aapt2/Android.mk b/tools/aapt2/Android.mk index 10f81502f268..e5c42d5f74c1 100644 --- a/tools/aapt2/Android.mk +++ b/tools/aapt2/Android.mk @@ -82,10 +82,6 @@ testSources := \ XmlDom_test.cpp \ XmlFlattener_test.cpp -cIncludes := \ - external/libpng \ - external/libz - hostLdLibs := hostStaticLibs := \ @@ -114,7 +110,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := libaapt2 LOCAL_SRC_FILES := $(sources) -LOCAL_C_INCLUDES += $(cIncludes) +LOCAL_STATIC_LIBRARIES += $(hostStaticLibs) LOCAL_CFLAGS += $(cFlags) LOCAL_CPPFLAGS += $(cppFlags) @@ -130,7 +126,6 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := $(testSources) -LOCAL_C_INCLUDES += $(cIncludes) LOCAL_STATIC_LIBRARIES += libaapt2 $(hostStaticLibs) LOCAL_LDLIBS += $(hostLdLibs) LOCAL_CFLAGS += $(cFlags) @@ -146,7 +141,6 @@ LOCAL_MODULE := aapt2 LOCAL_SRC_FILES := $(main) -LOCAL_C_INCLUDES += $(cIncludes) LOCAL_STATIC_LIBRARIES += libaapt2 $(hostStaticLibs) LOCAL_LDLIBS += $(hostLdLibs) LOCAL_CFLAGS += $(cFlags) diff --git a/tools/aapt2/Files.cpp b/tools/aapt2/Files.cpp index 8484148f29d3..b24ff6bb6291 100644 --- a/tools/aapt2/Files.cpp +++ b/tools/aapt2/Files.cpp @@ -22,7 +22,7 @@ #include <string> #include <sys/stat.h> -#ifdef HAVE_MS_C_RUNTIME +#ifdef _WIN32 // Windows includes. #include <direct.h> #endif @@ -83,7 +83,7 @@ std::vector<std::string> listFiles(const StringPiece& root) { } inline static int mkdirImpl(const StringPiece& path) { -#ifdef HAVE_MS_C_RUNTIME +#ifdef _WIN32 return _mkdir(path.toString().c_str()); #else return mkdir(path.toString().c_str(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); diff --git a/tools/aapt2/SourceXmlPullParser.h b/tools/aapt2/SourceXmlPullParser.h index 15936d655745..d8ed45952b31 100644 --- a/tools/aapt2/SourceXmlPullParser.h +++ b/tools/aapt2/SourceXmlPullParser.h @@ -20,7 +20,7 @@ #include "XmlPullParser.h" #include <istream> -#include <libexpat/expat.h> +#include <expat.h> #include <queue> #include <stack> #include <string> diff --git a/tools/aapt2/XmlDom.cpp b/tools/aapt2/XmlDom.cpp index 763029fd4157..b8b2d1295067 100644 --- a/tools/aapt2/XmlDom.cpp +++ b/tools/aapt2/XmlDom.cpp @@ -312,7 +312,7 @@ std::unique_ptr<Node> inflate(const void* data, size_t dataLen, SourceLogger* lo } } } - return std::move(root); + return root; } Node::Node(NodeType type) : type(type), parent(nullptr), lineNumber(0), columnNumber(0) { diff --git a/tools/aapt2/XmlDom.h b/tools/aapt2/XmlDom.h index 69318840445d..035e7c46d1b5 100644 --- a/tools/aapt2/XmlDom.h +++ b/tools/aapt2/XmlDom.h @@ -21,7 +21,7 @@ #include "StringPiece.h" #include <istream> -#include <libexpat/expat.h> +#include <expat.h> #include <memory> #include <string> #include <vector> diff --git a/tools/aidl b/tools/aidl new file mode 100644 index 000000000000..8a42fa0d0a35 --- /dev/null +++ b/tools/aidl @@ -0,0 +1,4 @@ +Where has aidl gone? + + aidl has moved to //system/tools/aidl as part of adding support for + generating bindings in C++. diff --git a/tools/layoutlib/Android.mk b/tools/layoutlib/Android.mk index 61ddb04bc08c..53bfc1581e53 100644 --- a/tools/layoutlib/Android.mk +++ b/tools/layoutlib/Android.mk @@ -30,6 +30,9 @@ LOCAL_JAVACFLAGS := -source 6 -target 6 built_framework_dep := $(call java-lib-deps,framework) built_framework_classes := $(call java-lib-files,framework) +built_oj_dep := $(call java-lib-deps,core-oj) +built_oj_classes := $(call java-lib-files,core-oj) + built_core_dep := $(call java-lib-deps,core-libart) built_core_classes := $(call java-lib-files,core-libart) @@ -56,7 +59,8 @@ LOCAL_BUILT_MODULE_STEM := javalib.jar include $(BUILD_SYSTEM)/base_rules.mk ####################################### -$(LOCAL_BUILT_MODULE): $(built_core_dep) \ +$(LOCAL_BUILT_MODULE): $(built_oj_dep) \ + $(built_core_dep) \ $(built_framework_dep) \ $(built_ext_dep) \ $(built_ext_data) \ @@ -69,6 +73,7 @@ $(LOCAL_BUILT_MODULE): $(built_core_dep) \ $(hide) ls -l $(built_framework_classes) $(hide) java -ea -jar $(built_layoutlib_create_jar) \ $@ \ + $(built_oj_classes) \ $(built_core_classes) \ $(built_framework_classes) \ $(built_ext_classes) \ diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java index 895f9c9eaeac..a410c53eb22b 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java @@ -86,7 +86,7 @@ public class BridgePowerManager implements IPowerManager { } @Override - public void shutdown(boolean confirm, boolean wait) { + public void shutdown(boolean confirm, String reason, boolean wait) { // pass for now. } diff --git a/tools/split-select/Android.mk b/tools/split-select/Android.mk index d9ddf08862b3..239bed589412 100644 --- a/tools/split-select/Android.mk +++ b/tools/split-select/Android.mk @@ -43,7 +43,6 @@ cIncludes := \ external/zlib \ frameworks/base/tools -hostLdLibs := hostStaticLibs := \ libaapt \ libandroidfw \ @@ -57,17 +56,13 @@ hostStaticLibs := \ cFlags := -Wall -Werror -ifeq ($(HOST_OS),linux) - hostLdLibs += -lrt -ldl -lpthread -endif +hostLdLibs_linux := -lrt -ldl -lpthread # Statically link libz for MinGW (Win SDK under Linux), # and dynamically link for all others. -ifneq ($(strip $(USE_MINGW)),) - hostStaticLibs += libz -else - hostLdLibs += -lz -endif +hostStaticLibs_windows := libz +hostLdLibs_darwin := -lz +hostLdLibs_linux += -lz # ========================================================== @@ -75,11 +70,12 @@ endif # ========================================================== include $(CLEAR_VARS) LOCAL_MODULE := libsplit-select +LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_SRC_FILES := $(sources) -LOCAL_C_INCLUDES += $(cIncludes) -LOCAL_CFLAGS += $(cFlags) -D_DARWIN_UNLIMITED_STREAMS +LOCAL_C_INCLUDES := $(cIncludes) +LOCAL_CFLAGS := $(cFlags) -D_DARWIN_UNLIMITED_STREAMS include $(BUILD_HOST_STATIC_LIBRARY) @@ -93,10 +89,12 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := $(testSources) -LOCAL_C_INCLUDES += $(cIncludes) -LOCAL_STATIC_LIBRARIES += libsplit-select $(hostStaticLibs) -LOCAL_LDLIBS += $(hostLdLibs) -LOCAL_CFLAGS += $(cFlags) +LOCAL_C_INCLUDES := $(cIncludes) +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) include $(BUILD_HOST_NATIVE_TEST) @@ -105,13 +103,16 @@ include $(BUILD_HOST_NATIVE_TEST) # ========================================================== include $(CLEAR_VARS) LOCAL_MODULE := split-select +LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_SRC_FILES := $(main) -LOCAL_C_INCLUDES += $(cIncludes) -LOCAL_STATIC_LIBRARIES += libsplit-select $(hostStaticLibs) -LOCAL_LDLIBS += $(hostLdLibs) -LOCAL_CFLAGS += $(cFlags) +LOCAL_C_INCLUDES := $(cIncludes) +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) include $(BUILD_HOST_EXECUTABLE) |