The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2006 The Android Open Source Project |
| 3 | # |
| 4 | # Android Asset Packaging Tool |
| 5 | # |
| 6 | |
Joe Onorato | 74905e5 | 2010-06-10 18:34:55 -0700 | [diff] [blame] | 7 | # This tool is prebuilt if we're doing an app-only build. |
Ying Wang | 74bebf6 | 2014-03-07 15:55:14 -0800 | [diff] [blame^] | 8 | ifeq ($(TARGET_BUILD_APPS)$(filter true,$(TARGET_BUILD_PDK)),) |
Joe Onorato | 74905e5 | 2010-06-10 18:34:55 -0700 | [diff] [blame] | 9 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 10 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 11 | aapt_src_files := \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 12 | AaptAssets.cpp \ |
| 13 | Command.cpp \ |
Josiah Gaskin | 8a39da8 | 2011-06-06 17:00:35 -0700 | [diff] [blame] | 14 | CrunchCache.cpp \ |
| 15 | FileFinder.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 16 | Main.cpp \ |
| 17 | Package.cpp \ |
| 18 | StringPool.cpp \ |
| 19 | XMLNode.cpp \ |
Dianne Hackborn | e6b6803 | 2011-10-13 16:26:02 -0700 | [diff] [blame] | 20 | ResourceFilter.cpp \ |
Christopher Tate | d8dde13a | 2012-11-16 15:58:08 -0800 | [diff] [blame] | 21 | ResourceIdCache.cpp \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | ResourceTable.cpp \ |
| 23 | Images.cpp \ |
| 24 | Resource.cpp \ |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 25 | pseudolocalize.cpp \ |
Mathias Agopian | 55e3d60 | 2009-06-05 14:56:35 -0700 | [diff] [blame] | 26 | SourcePos.cpp \ |
Mathias Agopian | 1f5762e | 2013-05-06 20:20:34 -0700 | [diff] [blame] | 27 | WorkQueue.cpp \ |
Mathias Agopian | 55e3d60 | 2009-06-05 14:56:35 -0700 | [diff] [blame] | 28 | ZipEntry.cpp \ |
Dima Zavin | 823abb6 | 2013-05-06 23:17:58 -0700 | [diff] [blame] | 29 | ZipFile.cpp \ |
| 30 | qsort_r_compat.c |
Mathias Agopian | 55e3d60 | 2009-06-05 14:56:35 -0700 | [diff] [blame] | 31 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 32 | LOCAL_PATH:= $(call my-dir) |
| 33 | include $(CLEAR_VARS) |
| 34 | |
| 35 | LOCAL_SRC_FILES := $(aapt_src_files) |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | |
| 37 | LOCAL_CFLAGS += -Wno-format-y2k |
Ying Wang | 41bdb03 | 2012-05-30 18:02:55 -0700 | [diff] [blame] | 38 | ifeq (darwin,$(HOST_OS)) |
| 39 | LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS |
| 40 | endif |
| 41 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 42 | LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | LOCAL_C_INCLUDES += external/libpng |
| 45 | LOCAL_C_INCLUDES += external/zlib |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 46 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | LOCAL_STATIC_LIBRARIES := \ |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 48 | libandroidfw \ |
Mathias Agopian | cbc6971 | 2012-02-21 14:34:47 -0800 | [diff] [blame] | 49 | libutils \ |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | libcutils \ |
| 51 | libexpat \ |
Ying Wang | d685894 | 2013-04-09 21:54:12 -0700 | [diff] [blame] | 52 | libpng \ |
Narayan Kamath | afd31e0 | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 53 | liblog \ |
| 54 | libziparchive-host |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 55 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 56 | ifeq ($(HOST_OS),linux) |
Iliyan Malchev | 64ef6b4 | 2011-10-19 22:35:56 -0700 | [diff] [blame] | 57 | LOCAL_LDLIBS += -lrt -ldl -lpthread |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 58 | endif |
| 59 | |
Raphael | 2935553 | 2010-04-13 15:21:32 -0700 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 66 | endif |
| 67 | |
| 68 | LOCAL_MODULE := aapt |
| 69 | |
| 70 | include $(BUILD_HOST_EXECUTABLE) |
| 71 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 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 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 87 | LOCAL_CFLAGS += -Wno-non-virtual-dtor |
| 88 | |
Stephen Hines | 5675b97 | 2013-06-26 17:27:35 -0700 | [diff] [blame] | 89 | LOCAL_SHARED_LIBRARIES := \ |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 90 | libandroidfw \ |
| 91 | libutils \ |
| 92 | libcutils \ |
Stephen Hines | 5675b97 | 2013-06-26 17:27:35 -0700 | [diff] [blame] | 93 | libpng \ |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 94 | liblog \ |
Stephen Hines | 5675b97 | 2013-06-26 17:27:35 -0700 | [diff] [blame] | 95 | libz |
| 96 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 97 | LOCAL_STATIC_LIBRARIES := \ |
| 98 | libstlport_static \ |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 99 | libexpat_static |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 100 | |
| 101 | include $(BUILD_EXECUTABLE) |
| 102 | endif |
| 103 | |
Ying Wang | 74bebf6 | 2014-03-07 15:55:14 -0800 | [diff] [blame^] | 104 | endif # No TARGET_BUILD_APPS or TARGET_BUILD_PDK |