blob: ba13d51a5282eca1214a066991d8264efe0fd66c [file] [log] [blame]
Mathias Agopian83c64e62012-02-20 16:58:20 -08001# 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
Jeff Brown9d3b1a42013-07-01 19:07:15 -070017# libandroidfw is partially built for the host (used by obbtool and others)
Mathias Agopian83c64e62012-02-20 16:58:20 -080018# These files are common to host and target builds.
19
Jeff Brown9d3b1a42013-07-01 19:07:15 -070020commonSources := \
Mathias Agopian83c64e62012-02-20 16:58:20 -080021 Asset.cpp \
22 AssetDir.cpp \
23 AssetManager.cpp \
Mathias Agopian1f5762e2013-05-06 20:20:34 -070024 misc.cpp \
Mathias Agopian83c64e62012-02-20 16:58:20 -080025 ObbFile.cpp \
26 ResourceTypes.cpp \
Mathias Agopian1f5762e2013-05-06 20:20:34 -070027 StreamingZipInflater.cpp \
Mathias Agopian1f5762e2013-05-06 20:20:34 -070028 ZipFileRO.cpp \
29 ZipUtils.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080030
Jeff Brown9d3b1a42013-07-01 19:07:15 -070031deviceSources := \
32 $(commonSources) \
33 BackupData.cpp \
34 BackupHelpers.cpp \
35 CursorWindow.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080036
Jeff Brown9d3b1a42013-07-01 19:07:15 -070037hostSources := \
38 $(commonSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080039
40# For the host
41# =====================================================
42
43include $(CLEAR_VARS)
44
Jeff Brown9d3b1a42013-07-01 19:07:15 -070045LOCAL_SRC_FILES:= $(hostSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080046
47LOCAL_MODULE:= libandroidfw
48
49LOCAL_MODULE_TAGS := optional
50
Bjorn Bringertfb903a42013-03-18 21:17:26 +000051LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
52
Mathias Agopian027692b2012-02-21 16:55:25 -080053LOCAL_C_INCLUDES := \
54 external/zlib
55
Colin Cross0d6e7312013-07-23 17:31:18 -070056LOCAL_STATIC_LIBRARIES := liblog
Narayan Kamathafd31e02013-12-03 13:16:03 +000057LOCAL_WHOLE_STATIC_LIBRARIES := libziparchive-host
Colin Cross0d6e7312013-07-23 17:31:18 -070058
Mathias Agopian83c64e62012-02-20 16:58:20 -080059include $(BUILD_HOST_STATIC_LIBRARY)
60
61
62# For the device
63# =====================================================
64
65include $(CLEAR_VARS)
66
Jeff Brown9d3b1a42013-07-01 19:07:15 -070067LOCAL_SRC_FILES:= $(deviceSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080068
69LOCAL_SHARED_LIBRARIES := \
Jeff Brown9d3b1a42013-07-01 19:07:15 -070070 libbinder \
Mathias Agopian83c64e62012-02-20 16:58:20 -080071 liblog \
72 libcutils \
73 libutils \
Mathias Agopian83c64e62012-02-20 16:58:20 -080074 libz
75
Narayan Kamathafd31e02013-12-03 13:16:03 +000076LOCAL_STATIC_LIBRARIES := libziparchive
77
Mathias Agopian83c64e62012-02-20 16:58:20 -080078LOCAL_C_INCLUDES := \
Mathias Agopian83c64e62012-02-20 16:58:20 -080079 external/icu4c/common \
Narayan Kamathafd31e02013-12-03 13:16:03 +000080 external/zlib \
81 system/core/include
Mathias Agopian83c64e62012-02-20 16:58:20 -080082
83LOCAL_MODULE:= libandroidfw
84
85LOCAL_MODULE_TAGS := optional
86
87include $(BUILD_SHARED_LIBRARY)
88
89
Mathias Agopian83c64e62012-02-20 16:58:20 -080090# Include subdirectory makefiles
91# ============================================================
92
93# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
94# team really wants is to build the stuff defined by this makefile.
95ifeq (,$(ONE_SHOT_MAKEFILE))
96include $(call first-makefiles-under,$(LOCAL_PATH))
97endif