Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bb9471e authored by Bjorn Bringert's avatar Bjorn Bringert Committed by Android (Google) Code Review
Browse files

Merge "Allow compiling aapt for the device"

parents eda67299 fb903a45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1553,7 +1553,7 @@ public:
    static bool getIdmapInfo(const void* idmap, size_t size,
                             uint32_t* pOriginalCrc, uint32_t* pOverlayCrc);

#ifndef HAVE_ANDROID_OS
#ifdef STATIC_ANDROIDFW_FOR_TOOLS
    void print(bool inclValues) const;
    static String8 normalizeForOutput(const char* input);
#endif
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ LOCAL_MODULE:= libandroidfw

LOCAL_MODULE_TAGS := optional

LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS

LOCAL_C_INCLUDES := \
	external/zlib

@@ -92,6 +94,7 @@ include $(BUILD_SHARED_LIBRARY)

ifeq ($(TARGET_OS),linux)
include $(CLEAR_VARS)
LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
LOCAL_C_INCLUDES += \
	external/skia/include/core \
	external/zlib \
+2 −2
Original line number Diff line number Diff line
@@ -5324,7 +5324,7 @@ bool ResTable::getIdmapInfo(const void* idmap, size_t sizeBytes,
}


#ifndef HAVE_ANDROID_OS
#ifdef STATIC_ANDROIDFW_FOR_TOOLS
#define CHAR16_TO_CSTR(c16, len) (String8(String16(c16,len)).string())

#define CHAR16_ARRAY_EQ(constant, var, len) \
@@ -5621,6 +5621,6 @@ void ResTable::print(bool inclValues) const
    }
}

#endif // HAVE_ANDROID_OS
#endif // STATIC_ANDROIDFW_FOR_TOOLS

}   // namespace android
+38 −5
Original line number Diff line number Diff line
@@ -7,10 +7,8 @@
# This tool is prebuilt if we're doing an app-only build.
ifeq ($(TARGET_BUILD_APPS),)

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
aapt_src_files := \
	AaptAssets.cpp \
	Command.cpp \
	CrunchCache.cpp \
@@ -24,23 +22,27 @@ LOCAL_SRC_FILES := \
	ResourceTable.cpp \
	Images.cpp \
	Resource.cpp \
    pseudolocalize.cpp \
    SourcePos.cpp \
    ZipEntry.cpp \
    ZipFile.cpp

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(aapt_src_files)

LOCAL_CFLAGS += -Wno-format-y2k
ifeq (darwin,$(HOST_OS))
LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS
endif

LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS

LOCAL_C_INCLUDES += external/libpng
LOCAL_C_INCLUDES += external/zlib
LOCAL_C_INCLUDES += build/libs/host/include

LOCAL_STATIC_LIBRARIES := \
	libhost \
	libandroidfw \
	libutils \
	libcutils \
@@ -64,4 +66,35 @@ LOCAL_MODULE := aapt

include $(BUILD_HOST_EXECUTABLE)

# aapt for running on the device
# =========================================================
ifneq ($(SDK_ONLY),true)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(aapt_src_files)

LOCAL_MODULE := aapt

LOCAL_C_INCLUDES += bionic
LOCAL_C_INCLUDES += bionic/libstdc++/include
LOCAL_C_INCLUDES += external/stlport/stlport
LOCAL_C_INCLUDES += external/libpng
LOCAL_C_INCLUDES += external/zlib

LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
LOCAL_CFLAGS += -Wno-non-virtual-dtor

LOCAL_STATIC_LIBRARIES := \
        libstlport_static \
        libandroidfw \
        libutils \
        libcutils \
        libexpat_static \
        libpng \
        liblog \
        libz

include $(BUILD_EXECUTABLE)
endif

endif # TARGET_BUILD_APPS
+1 −1
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@

#include "XMLNode.h"
#include "ResourceTable.h"
#include "pseudolocalize.h"

#include <host/pseudolocalize.h>
#include <utils/ByteOrder.h>
#include <errno.h>
#include <string.h>
Loading