Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -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 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 17 | # libandroidfw is partially built for the host (used by obbtool and others) |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 18 | # These files are common to host and target builds. |
| 19 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 20 | commonSources := \ |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 21 | Asset.cpp \ |
| 22 | AssetDir.cpp \ |
| 23 | AssetManager.cpp \ |
Mathias Agopian | 1f5762e | 2013-05-06 20:20:34 -0700 | [diff] [blame] | 24 | misc.cpp \ |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 25 | ObbFile.cpp \ |
| 26 | ResourceTypes.cpp \ |
Mathias Agopian | 1f5762e | 2013-05-06 20:20:34 -0700 | [diff] [blame] | 27 | StreamingZipInflater.cpp \ |
Adam Lesinski | f90f2f8d | 2014-06-06 14:27:00 -0700 | [diff] [blame] | 28 | TypeWrappers.cpp \ |
Mathias Agopian | 1f5762e | 2013-05-06 20:20:34 -0700 | [diff] [blame] | 29 | ZipFileRO.cpp \ |
| 30 | ZipUtils.cpp |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 31 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 32 | deviceSources := \ |
| 33 | $(commonSources) \ |
| 34 | BackupData.cpp \ |
| 35 | BackupHelpers.cpp \ |
| 36 | CursorWindow.cpp |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 37 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 38 | hostSources := \ |
| 39 | $(commonSources) |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 40 | |
| 41 | # For the host |
| 42 | # ===================================================== |
| 43 | |
| 44 | include $(CLEAR_VARS) |
Dan Albert | 00b4e77 | 2014-10-21 08:58:39 -0700 | [diff] [blame] | 45 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 46 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 47 | LOCAL_SRC_FILES:= $(hostSources) |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 48 | |
| 49 | LOCAL_MODULE:= libandroidfw |
| 50 | |
| 51 | LOCAL_MODULE_TAGS := optional |
| 52 | |
Bjorn Bringert | fb903a4 | 2013-03-18 21:17:26 +0000 | [diff] [blame] | 53 | LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS |
| 54 | |
Mathias Agopian | 027692b | 2012-02-21 16:55:25 -0800 | [diff] [blame] | 55 | LOCAL_C_INCLUDES := \ |
| 56 | external/zlib |
| 57 | |
Narayan Kamath | 070274e | 2013-12-11 16:48:07 +0000 | [diff] [blame] | 58 | LOCAL_STATIC_LIBRARIES := liblog libziparchive-host libutils |
Colin Cross | 0d6e731 | 2013-07-23 17:31:18 -0700 | [diff] [blame] | 59 | |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 60 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 61 | |
| 62 | |
| 63 | # For the device |
| 64 | # ===================================================== |
| 65 | |
| 66 | include $(CLEAR_VARS) |
Dan Albert | 00b4e77 | 2014-10-21 08:58:39 -0700 | [diff] [blame] | 67 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 68 | |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 69 | LOCAL_SRC_FILES:= $(deviceSources) |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 70 | |
| 71 | LOCAL_SHARED_LIBRARIES := \ |
Jeff Brown | 9d3b1a4 | 2013-07-01 19:07:15 -0700 | [diff] [blame] | 72 | libbinder \ |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 73 | liblog \ |
| 74 | libcutils \ |
| 75 | libutils \ |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 76 | libz |
| 77 | |
Narayan Kamath | afd31e0 | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 78 | LOCAL_STATIC_LIBRARIES := libziparchive |
| 79 | |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 80 | LOCAL_C_INCLUDES := \ |
Narayan Kamath | afd31e0 | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 81 | external/zlib \ |
| 82 | system/core/include |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 83 | |
| 84 | LOCAL_MODULE:= libandroidfw |
| 85 | |
| 86 | LOCAL_MODULE_TAGS := optional |
| 87 | |
| 88 | include $(BUILD_SHARED_LIBRARY) |
| 89 | |
| 90 | |
Mathias Agopian | 83c64e6 | 2012-02-20 16:58:20 -0800 | [diff] [blame] | 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. |
| 96 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 97 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 98 | endif |