Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 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 \ |
Narayan Kamath | 9636071 | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 53 | liblog \ |
| 54 | libziparchive-host |
Adam Lesinski | 282e181 | 2014-01-23 18:17:42 -0800 | [diff] [blame] | 55 | |
| 56 | ifeq ($(HOST_OS),linux) |
| 57 | LOCAL_LDLIBS += -lrt -ldl -lpthread |
| 58 | endif |
| 59 | |
| 60 | # Statically link libz for MinGW (Win SDK under Linux), |
| 61 | # and dynamically link for all others. |
| 62 | ifneq ($(strip $(USE_MINGW)),) |
| 63 | LOCAL_STATIC_LIBRARIES += libz |
| 64 | else |
| 65 | LOCAL_LDLIBS += -lz |
| 66 | endif |
| 67 | |
| 68 | LOCAL_MODULE := aapt |
| 69 | |
| 70 | include $(BUILD_HOST_EXECUTABLE) |
| 71 | |
| 72 | # aapt for running on the device |
| 73 | # ========================================================= |
| 74 | ifneq ($(SDK_ONLY),true) |
| 75 | include $(CLEAR_VARS) |
| 76 | |
| 77 | LOCAL_SRC_FILES := $(aapt_src_files) |
| 78 | |
| 79 | LOCAL_MODULE := aapt |
| 80 | |
| 81 | LOCAL_C_INCLUDES += bionic |
| 82 | LOCAL_C_INCLUDES += bionic/libstdc++/include |
| 83 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 84 | LOCAL_C_INCLUDES += external/libpng |
| 85 | LOCAL_C_INCLUDES += external/zlib |
| 86 | |
| 87 | LOCAL_CFLAGS += -Wno-non-virtual-dtor |
| 88 | |
| 89 | LOCAL_SHARED_LIBRARIES := \ |
| 90 | libandroidfw \ |
| 91 | libutils \ |
| 92 | libcutils \ |
| 93 | libpng \ |
| 94 | liblog \ |
| 95 | libz |
| 96 | |
| 97 | LOCAL_STATIC_LIBRARIES := \ |
| 98 | libstlport_static \ |
| 99 | libexpat_static |
| 100 | |
| 101 | include $(BUILD_EXECUTABLE) |
| 102 | endif |
| 103 | |
| 104 | endif # TARGET_BUILD_APPS |