summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Android.mk
blob: 452c60a6853eef60bfdd5462cc57bb9d2c0c1ffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# 
# Copyright 2006 The Android Open Source Project
#
# Android Asset Packaging Tool
#

# This tool is prebuilt if we're doing an app-only build.
ifeq ($(TARGET_BUILD_APPS),)


aapt_src_files := \
	AaptAssets.cpp \
	Command.cpp \
	CrunchCache.cpp \
	FileFinder.cpp \
	Main.cpp \
	Package.cpp \
	StringPool.cpp \
	XMLNode.cpp \
	ResourceFilter.cpp \
	ResourceIdCache.cpp \
	ResourceTable.cpp \
	Images.cpp \
	Resource.cpp \
    pseudolocalize.cpp \
    SourcePos.cpp \
	WorkQueue.cpp \
    ZipEntry.cpp \
    ZipFile.cpp \
	qsort_r_compat.c

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(aapt_src_files)

LOCAL_CFLAGS += -Wno-format-y2k
ifeq (darwin,$(HOST_OS))
LOCAL_CFLAGS += -D_DARWIN_UNLIMITED_STREAMS
endif

LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS

LOCAL_C_INCLUDES += external/libpng
LOCAL_C_INCLUDES += external/zlib

LOCAL_STATIC_LIBRARIES := \
	libandroidfw \
	libutils \
	libcutils \
	libexpat \
	libpng \
	liblog

ifeq ($(HOST_OS),linux)
LOCAL_LDLIBS += -lrt -ldl -lpthread
endif

# Statically link libz for MinGW (Win SDK under Linux),
# and dynamically link for all others.
ifneq ($(strip $(USE_MINGW)),)
  LOCAL_STATIC_LIBRARIES += libz
else
  LOCAL_LDLIBS += -lz
endif

LOCAL_MODULE := aapt

include $(BUILD_HOST_EXECUTABLE)

# aapt for running on the device
# =========================================================
ifneq ($(SDK_ONLY),true)
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(aapt_src_files)

LOCAL_MODULE := aapt

LOCAL_C_INCLUDES += bionic
LOCAL_C_INCLUDES += bionic/libstdc++/include
LOCAL_C_INCLUDES += external/stlport/stlport
LOCAL_C_INCLUDES += external/libpng
LOCAL_C_INCLUDES += external/zlib

LOCAL_CFLAGS += -Wno-non-virtual-dtor

LOCAL_SHARED_LIBRARIES := \
        libandroidfw \
        libutils \
        libcutils \
        libpng \
        liblog \
        libz

LOCAL_STATIC_LIBRARIES := \
        libstlport_static \
        libexpat_static

include $(BUILD_EXECUTABLE)
endif

endif # TARGET_BUILD_APPS