1# 2# Copyright 2006 The Android Open Source Project 3# 4# Android Asset Packaging Tool 5# 6 7# This tool is prebuilt if we're doing an app-only build. 8ifeq ($(TARGET_BUILD_APPS),) 9 10 11aapt_src_files := \ 12 AaptAssets.cpp \ 13 Command.cpp \ 14 CrunchCache.cpp \ 15 FileFinder.cpp \ 16 Main.cpp \ 17 Package.cpp \ 18 StringPool.cpp \ 19 XMLNode.cpp \ 20 ResourceFilter.cpp \ 21 ResourceIdCache.cpp \ 22 ResourceTable.cpp \ 23 Images.cpp \ 24 Resource.cpp \ 25 pseudolocalize.cpp \ 26 SourcePos.cpp \ 27 WorkQueue.cpp \ 28 ZipEntry.cpp \ 29 ZipFile.cpp \ 30 qsort_r_compat.c 31 32LOCAL_PATH:= $(call my-dir) 33include $(CLEAR_VARS) 34 35LOCAL_SRC_FILES := $(aapt_src_files) 36 37LOCAL_CFLAGS += -Wno-format-y2k 38ifeq (darwin,$(HOST_OS)) 39LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS 40endif 41 42LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS 43 44LOCAL_C_INCLUDES += external/libpng 45LOCAL_C_INCLUDES += external/zlib 46 47LOCAL_STATIC_LIBRARIES := \ 48 libandroidfw \ 49 libutils \ 50 libcutils \ 51 libexpat \ 52 libpng \ 53 liblog 54 55ifeq ($(HOST_OS),linux) 56LOCAL_LDLIBS += -lrt -ldl -lpthread 57endif 58 59# Statically link libz for MinGW (Win SDK under Linux), 60# and dynamically link for all others. 61ifneq ($(strip $(USE_MINGW)),) 62 LOCAL_STATIC_LIBRARIES += libz 63else 64 LOCAL_LDLIBS += -lz 65endif 66 67LOCAL_MODULE := aapt 68 69include $(BUILD_HOST_EXECUTABLE) 70 71# aapt for running on the device 72# ========================================================= 73ifneq ($(SDK_ONLY),true) 74include $(CLEAR_VARS) 75 76LOCAL_SRC_FILES := $(aapt_src_files) 77 78LOCAL_MODULE := aapt 79 80LOCAL_C_INCLUDES += bionic 81LOCAL_C_INCLUDES += bionic/libstdc++/include 82LOCAL_C_INCLUDES += external/stlport/stlport 83LOCAL_C_INCLUDES += external/libpng 84LOCAL_C_INCLUDES += external/zlib 85 86LOCAL_CFLAGS += -Wno-non-virtual-dtor 87 88LOCAL_SHARED_LIBRARIES := \ 89 libandroidfw \ 90 libutils \ 91 libcutils \ 92 libpng \ 93 liblog \ 94 libz 95 96LOCAL_STATIC_LIBRARIES := \ 97 libstlport_static \ 98 libexpat_static 99 100include $(BUILD_EXECUTABLE) 101endif 102 103endif # TARGET_BUILD_APPS 104