diff options
Diffstat (limited to 'tools/aapt/Android.mk')
-rw-r--r-- | tools/aapt/Android.mk | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index fdc859c..a8a9c1c 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -5,9 +5,8 @@ # LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_SRC_FILES := \ +commonSources:= \ AaptAssets.cpp \ Command.cpp \ Main.cpp \ @@ -17,8 +16,18 @@ LOCAL_SRC_FILES := \ ResourceTable.cpp \ Images.cpp \ Resource.cpp \ - SourcePos.cpp + SourcePos.cpp + + +# For the host +# ===================================================== + +include $(CLEAR_VARS) +LOCAL_SRC_FILES := $(commonSources) + +LOCAL_CFLAGS += -DHOST_LIB=1 +LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) LOCAL_CFLAGS += -Wno-format-y2k LOCAL_C_INCLUDES += external/expat/lib @@ -50,3 +59,39 @@ LOCAL_MODULE := aapt include $(BUILD_HOST_EXECUTABLE) + +# For the device +# ===================================================== +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= $(commonSources) + +ifeq ($(TARGET_OS),linux) +# Use the futex based mutex and condition variable +# implementation from android-arm because it's shared mem safe +LOCAL_LDLIBS += -lrt -ldl +endif + +LOCAL_C_INCLUDES += external/expat/lib +LOCAL_C_INCLUDES += external/libpng +LOCAL_C_INCLUDES += external/zlib +LOCAL_C_INCLUDES += external/icu4c/common + +LOCAL_SHARED_LIBRARIES := \ + libz \ + libutils \ + libcutils \ + libexpat \ + libsgl + +ifneq ($(TARGET_SIMULATOR),true) +ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86) +# This is needed on x86 to bring in dl_iterate_phdr for CallStack.cpp +LOCAL_SHARED_LIBRARIES += \ + libdl +endif # linux-x86 +endif # sim + +LOCAL_MODULE := aapt + +include $(BUILD_EXECUTABLE) |