blob: 376b101a178da20cbe62512877c794ccdb3d0dd1 [file] [log] [blame]
Adam Lesinski16c4d152014-01-24 13:27:13 -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
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 \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070028 TypeWrappers.cpp \
Adam Lesinski16c4d152014-01-24 13:27:13 -080029 ZipFileRO.cpp \
30 ZipUtils.cpp
31
32deviceSources := \
33 $(commonSources) \
34 BackupData.cpp \
35 BackupHelpers.cpp \
36 CursorWindow.cpp
37
38hostSources := \
39 $(commonSources)
40
41# For the host
42# =====================================================
43
44include $(CLEAR_VARS)
Dan Albert00b4e772014-10-21 08:58:39 -070045LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Adam Lesinski16c4d152014-01-24 13:27:13 -080046
47LOCAL_SRC_FILES:= $(hostSources)
48
49LOCAL_MODULE:= libandroidfw
50
51LOCAL_MODULE_TAGS := optional
52
53LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
54
55LOCAL_C_INCLUDES := \
56 external/zlib
57
Narayan Kamath90f58db2013-12-11 16:48:07 +000058LOCAL_STATIC_LIBRARIES := liblog libziparchive-host libutils
Adam Lesinski16c4d152014-01-24 13:27:13 -080059
60include $(BUILD_HOST_STATIC_LIBRARY)
61
62
63# For the device
64# =====================================================
65
66include $(CLEAR_VARS)
Dan Albert00b4e772014-10-21 08:58:39 -070067LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Adam Lesinski16c4d152014-01-24 13:27:13 -080068
69LOCAL_SRC_FILES:= $(deviceSources)
70
71LOCAL_SHARED_LIBRARIES := \
72 libbinder \
73 liblog \
74 libcutils \
75 libutils \
76 libz
77
Narayan Kamath560566d2013-12-03 13:16:03 +000078LOCAL_STATIC_LIBRARIES := libziparchive
79
Adam Lesinski16c4d152014-01-24 13:27:13 -080080LOCAL_C_INCLUDES := \
Narayan Kamath560566d2013-12-03 13:16:03 +000081 external/zlib \
82 system/core/include
Adam Lesinski16c4d152014-01-24 13:27:13 -080083
84LOCAL_MODULE:= libandroidfw
85
86LOCAL_MODULE_TAGS := optional
87
88include $(BUILD_SHARED_LIBRARY)
89
90
91# Include subdirectory makefiles
92# ============================================================
93
94# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
95# team really wants is to build the stuff defined by this makefile.
96ifeq (,$(ONE_SHOT_MAKEFILE))
97include $(call first-makefiles-under,$(LOCAL_PATH))
98endif