blob: 6bbfcd2f9d8a5d7264505aab42ef9351d156f615 [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
Adam Lesinski4bf58102014-11-03 11:21:19 -080017# libandroidfw is partially built for the host (used by obbtool, aapt, and others)
Adam Lesinski16c4d152014-01-24 13:27:13 -080018# These files are common to host and target builds.
19
20commonSources := \
21 Asset.cpp \
22 AssetDir.cpp \
23 AssetManager.cpp \
Roozbeh Pournaderb927c552016-01-15 11:23:42 -080024 LocaleData.cpp \
Adam Lesinski16c4d152014-01-24 13:27:13 -080025 misc.cpp \
26 ObbFile.cpp \
27 ResourceTypes.cpp \
28 StreamingZipInflater.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070029 TypeWrappers.cpp \
Adam Lesinski16c4d152014-01-24 13:27:13 -080030 ZipFileRO.cpp \
31 ZipUtils.cpp
32
33deviceSources := \
34 $(commonSources) \
35 BackupData.cpp \
36 BackupHelpers.cpp \
Michael Wright3d3fe502015-12-04 17:59:42 +000037 CursorWindow.cpp \
38 DisplayEventDispatcher.cpp
Adam Lesinski16c4d152014-01-24 13:27:13 -080039
Adam Lesinski4bf58102014-11-03 11:21:19 -080040hostSources := $(commonSources)
Adam Lesinski16c4d152014-01-24 13:27:13 -080041
42# For the host
43# =====================================================
Adam Lesinski16c4d152014-01-24 13:27:13 -080044include $(CLEAR_VARS)
45
Adam Lesinski16c4d152014-01-24 13:27:13 -080046LOCAL_MODULE:= libandroidfw
Dan Willemsen4aa679f2015-08-19 11:13:56 -070047LOCAL_MODULE_HOST_OS := darwin linux windows
Adam Lesinski16c4d152014-01-24 13:27:13 -080048LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS
Andreas Gampe2204f0b2014-10-21 23:04:54 -070049LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
Adam Lesinski4bf58102014-11-03 11:21:19 -080050LOCAL_SRC_FILES:= $(hostSources)
51LOCAL_C_INCLUDES := external/zlib
Adam Lesinski16c4d152014-01-24 13:27:13 -080052
53include $(BUILD_HOST_STATIC_LIBRARY)
54
55
56# For the device
57# =====================================================
58
59include $(CLEAR_VARS)
60
Adam Lesinski4bf58102014-11-03 11:21:19 -080061LOCAL_MODULE:= libandroidfw
Adam Lesinski16c4d152014-01-24 13:27:13 -080062LOCAL_SRC_FILES:= $(deviceSources)
Adam Lesinski4bf58102014-11-03 11:21:19 -080063LOCAL_C_INCLUDES := \
Adam Lesinski4bf58102014-11-03 11:21:19 -080064 system/core/include
Narayan Kamath9c8ba962015-04-28 09:23:26 +010065LOCAL_STATIC_LIBRARIES := libziparchive libbase
Adam Lesinski16c4d152014-01-24 13:27:13 -080066LOCAL_SHARED_LIBRARIES := \
Andreas Gampe2204f0b2014-10-21 23:04:54 -070067 libbinder \
68 liblog \
69 libcutils \
Michael Wright3d3fe502015-12-04 17:59:42 +000070 libgui \
Andreas Gampe2204f0b2014-10-21 23:04:54 -070071 libutils \
72 libz
Mathias Agopian83c64e62012-02-20 16:58:20 -080073
Andreas Gampe2204f0b2014-10-21 23:04:54 -070074LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
Adam Lesinski16c4d152014-01-24 13:27:13 -080075
Adam Lesinski16c4d152014-01-24 13:27:13 -080076include $(BUILD_SHARED_LIBRARY)
77
78
79# Include subdirectory makefiles
80# ============================================================
81
82# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
83# team really wants is to build the stuff defined by this makefile.
84ifeq (,$(ONE_SHOT_MAKEFILE))
85include $(call first-makefiles-under,$(LOCAL_PATH))
86endif