blob: 4e126b8224933ccc74431db76713841c7a8f69a6 [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 \
28 ZipFileCRO.cpp \
29 ZipFileRO.cpp \
30 ZipUtils.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080031
Jeff Brown9d3b1a42013-07-01 19:07:15 -070032deviceSources := \
33 $(commonSources) \
34 BackupData.cpp \
35 BackupHelpers.cpp \
36 CursorWindow.cpp
Mathias Agopian83c64e62012-02-20 16:58:20 -080037
Jeff Brown9d3b1a42013-07-01 19:07:15 -070038hostSources := \
39 $(commonSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080040
41# For the host
42# =====================================================
43
44include $(CLEAR_VARS)
45
Jeff Brown9d3b1a42013-07-01 19:07:15 -070046LOCAL_SRC_FILES:= $(hostSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080047
48LOCAL_MODULE:= libandroidfw
49
50LOCAL_MODULE_TAGS := optional
51
Bjorn Bringertfb903a42013-03-18 21:17:26 +000052LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
53
Mathias Agopian027692b2012-02-21 16:55:25 -080054LOCAL_C_INCLUDES := \
55 external/zlib
56
Mathias Agopian83c64e62012-02-20 16:58:20 -080057include $(BUILD_HOST_STATIC_LIBRARY)
58
59
60# For the device
61# =====================================================
62
63include $(CLEAR_VARS)
64
Jeff Brown9d3b1a42013-07-01 19:07:15 -070065LOCAL_SRC_FILES:= $(deviceSources)
Mathias Agopian83c64e62012-02-20 16:58:20 -080066
67LOCAL_SHARED_LIBRARIES := \
Jeff Brown9d3b1a42013-07-01 19:07:15 -070068 libbinder \
Mathias Agopian83c64e62012-02-20 16:58:20 -080069 liblog \
70 libcutils \
71 libutils \
Mathias Agopian83c64e62012-02-20 16:58:20 -080072 libz
73
74LOCAL_C_INCLUDES := \
Mathias Agopian83c64e62012-02-20 16:58:20 -080075 external/icu4c/common \
76 external/zlib
77
78LOCAL_MODULE:= libandroidfw
79
80LOCAL_MODULE_TAGS := optional
81
82include $(BUILD_SHARED_LIBRARY)
83
84
Mathias Agopian83c64e62012-02-20 16:58:20 -080085# Include subdirectory makefiles
86# ============================================================
87
88# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
89# team really wants is to build the stuff defined by this makefile.
90ifeq (,$(ONE_SHOT_MAKEFILE))
91include $(call first-makefiles-under,$(LOCAL_PATH))
92endif