Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 1 | # 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 | |
| 15 | LOCAL_PATH:= $(call my-dir) |
| 16 | |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 17 | # libandroidfw is partially built for the host (used by obbtool, aapt, and others) |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 18 | # These files are common to host and target builds. |
| 19 | |
| 20 | commonSources := \ |
| 21 | Asset.cpp \ |
| 22 | AssetDir.cpp \ |
| 23 | AssetManager.cpp \ |
Adam Lesinski | 4452e13 | 2016-10-12 07:47:28 -0700 | [diff] [blame] | 24 | AttributeResolution.cpp \ |
Roozbeh Pournader | b927c55 | 2016-01-15 11:23:42 -0800 | [diff] [blame] | 25 | LocaleData.cpp \ |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 26 | misc.cpp \ |
| 27 | ObbFile.cpp \ |
| 28 | ResourceTypes.cpp \ |
| 29 | StreamingZipInflater.cpp \ |
Adam Lesinski | f90f2f8d | 2014-06-06 14:27:00 -0700 | [diff] [blame] | 30 | TypeWrappers.cpp \ |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 31 | ZipFileRO.cpp \ |
| 32 | ZipUtils.cpp |
| 33 | |
| 34 | deviceSources := \ |
| 35 | $(commonSources) \ |
| 36 | BackupData.cpp \ |
| 37 | BackupHelpers.cpp \ |
Michael Wright | 3d3fe50 | 2015-12-04 17:59:42 +0000 | [diff] [blame] | 38 | CursorWindow.cpp \ |
| 39 | DisplayEventDispatcher.cpp |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 40 | |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 41 | hostSources := $(commonSources) |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 42 | |
| 43 | # For the host |
| 44 | # ===================================================== |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 45 | include $(CLEAR_VARS) |
| 46 | |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 47 | LOCAL_MODULE:= libandroidfw |
Dan Willemsen | 4aa679f | 2015-08-19 11:13:56 -0700 | [diff] [blame] | 48 | LOCAL_MODULE_HOST_OS := darwin linux windows |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 49 | LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS |
Andreas Gampe | 2204f0b | 2014-10-21 23:04:54 -0700 | [diff] [blame] | 50 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 51 | LOCAL_SRC_FILES:= $(hostSources) |
| 52 | LOCAL_C_INCLUDES := external/zlib |
John Reck | f6113af | 2016-11-03 16:16:47 -0700 | [diff] [blame] | 53 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include |
| 54 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 55 | |
| 56 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 57 | |
| 58 | |
| 59 | # For the device |
| 60 | # ===================================================== |
| 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 64 | LOCAL_MODULE:= libandroidfw |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 65 | LOCAL_SRC_FILES:= $(deviceSources) |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 66 | LOCAL_C_INCLUDES := \ |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 67 | system/core/include |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 68 | LOCAL_SHARED_LIBRARIES := \ |
Jaekyun Seok | 2b14c5e | 2016-11-23 16:28:34 +0900 | [diff] [blame] | 69 | libziparchive \ |
| 70 | libbase \ |
Andreas Gampe | 2204f0b | 2014-10-21 23:04:54 -0700 | [diff] [blame] | 71 | libbinder \ |
| 72 | liblog \ |
| 73 | libcutils \ |
Michael Wright | 3d3fe50 | 2015-12-04 17:59:42 +0000 | [diff] [blame] | 74 | libgui \ |
Andreas Gampe | 2204f0b | 2014-10-21 23:04:54 -0700 | [diff] [blame] | 75 | libutils \ |
| 76 | libz |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 77 | |
John Reck | f6113af | 2016-11-03 16:16:47 -0700 | [diff] [blame] | 78 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| 79 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/include |
Andreas Gampe | 2204f0b | 2014-10-21 23:04:54 -0700 | [diff] [blame] | 80 | LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 81 | |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 82 | include $(BUILD_SHARED_LIBRARY) |
| 83 | |
| 84 | |
| 85 | # 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. |
| 90 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 91 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 92 | endif |