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. 8 ifeq ($(TARGET_BUILD_APPS),) 9 10 11 aapt_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 32 LOCAL_PATH:= $(call my-dir) 33 include $(CLEAR_VARS) 34 35 LOCAL_SRC_FILES := $(aapt_src_files) 36 37 LOCAL_CFLAGS += -Wno-format-y2k 38 ifeq (darwin,$(HOST_OS)) 39 LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS 40 endif 41 42 LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS 43 44 LOCAL_C_INCLUDES += external/libpng 45 LOCAL_C_INCLUDES += external/zlib 46 47 LOCAL_STATIC_LIBRARIES := \ 48 libandroidfw \ 49 libutils \ 50 libcutils \ 51 libexpat \ 52 libpng \ 53 liblog 54 55 ifeq ($(HOST_OS),linux) 56 LOCAL_LDLIBS += -lrt -ldl -lpthread 57 endif 58 59 # Statically link libz for MinGW (Win SDK under Linux), 60 # and dynamically link for all others. 61 ifneq ($(strip $(USE_MINGW)),) 62 LOCAL_STATIC_LIBRARIES += libz 63 else 64 LOCAL_LDLIBS += -lz 65 endif 66 67 LOCAL_MODULE := aapt 68 69 include $(BUILD_HOST_EXECUTABLE) 70 71 # aapt for running on the device 72 # ========================================================= 73 ifneq ($(SDK_ONLY),true) 74 include $(CLEAR_VARS) 75 76 LOCAL_SRC_FILES := $(aapt_src_files) 77 78 LOCAL_MODULE := aapt 79 80 LOCAL_C_INCLUDES += bionic 81 LOCAL_C_INCLUDES += bionic/libstdc++/include 82 LOCAL_C_INCLUDES += external/stlport/stlport 83 LOCAL_C_INCLUDES += external/libpng 84 LOCAL_C_INCLUDES += external/zlib 85 86 LOCAL_CFLAGS += -Wno-non-virtual-dtor 87 88 LOCAL_SHARED_LIBRARIES := \ 89 libandroidfw \ 90 libutils \ 91 libcutils \ 92 libpng \ 93 liblog \ 94 libz 95 96 LOCAL_STATIC_LIBRARIES := \ 97 libstlport_static \ 98 libexpat_static 99 100 include $(BUILD_EXECUTABLE) 101 endif 102 103 endif # TARGET_BUILD_APPS 104