blob: 85834263252a3db115ca987698182549aca2fe26 [file] [log] [blame]
Mike Lockwoodf99ad112013-10-03 10:29:39 -07001# Copyright (C) 2010 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH:= $(call my-dir)
16
17# libandroidfw is partially built for the host (used by obbtool and others)
18# These files are common to host and target builds.
19
20commonSources := \
21 Asset.cpp \
22 AssetDir.cpp \
23 AssetManager.cpp \
24 misc.cpp \
25 ObbFile.cpp \
26 ResourceTypes.cpp \
27 StreamingZipInflater.cpp \
28 ZipFileRO.cpp \
29 ZipUtils.cpp
30
31deviceSources := \
32 $(commonSources) \
33 BackupData.cpp \
34 BackupHelpers.cpp \
35 CursorWindow.cpp
36
37hostSources := \
38 $(commonSources)
39
40# For the host
41# =====================================================
42
43include $(CLEAR_VARS)
44
45LOCAL_SRC_FILES:= $(hostSources)
46
47LOCAL_MODULE:= libandroidfw
48
49LOCAL_MODULE_TAGS := optional
50
51LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
52
53LOCAL_C_INCLUDES := \
54 external/zlib
55
56LOCAL_STATIC_LIBRARIES := liblog
57
58include $(BUILD_HOST_STATIC_LIBRARY)
59
60
61ifeq ($(ANDROID_BUILD_EMBEDDED),true)
62
63# For the device
64# =====================================================
65
66include $(CLEAR_VARS)
67
68LOCAL_SRC_FILES:= $(deviceSources)
69
70LOCAL_SHARED_LIBRARIES := \
71 libbinder \
72 liblog \
73 libcutils \
74 libutils \
75 libz
76
77LOCAL_C_INCLUDES := \
78 external/icu4c/common \
79 external/zlib
80
81LOCAL_MODULE:= libandroidfw
82
83LOCAL_MODULE_TAGS := optional
84
85include $(BUILD_SHARED_LIBRARY)
86
87
88# Include subdirectory makefiles
89# ============================================================
90
91# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
92# team really wants is to build the stuff defined by this makefile.
93ifeq (,$(ONE_SHOT_MAKEFILE))
94include $(call first-makefiles-under,$(LOCAL_PATH))
95endif
96
97endif # ($(ANDROID_BUILD_EMBEDDED),true)