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 | |
| 17 | # libandroidfw is partially built for the host (used by obbtool and others) |
| 18 | # These files are common to host and target builds. |
| 19 | |
| 20 | commonSources := \ |
| 21 | Asset.cpp \ |
| 22 | AssetDir.cpp \ |
| 23 | AssetManager.cpp \ |
| 24 | misc.cpp \ |
| 25 | ObbFile.cpp \ |
| 26 | ResourceTypes.cpp \ |
| 27 | StreamingZipInflater.cpp \ |
Adam Lesinski | f90f2f8d | 2014-06-06 14:27:00 -0700 | [diff] [blame] | 28 | TypeWrappers.cpp \ |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 29 | ZipFileRO.cpp \ |
| 30 | ZipUtils.cpp |
| 31 | |
| 32 | deviceSources := \ |
| 33 | $(commonSources) \ |
| 34 | BackupData.cpp \ |
| 35 | BackupHelpers.cpp \ |
| 36 | CursorWindow.cpp |
| 37 | |
| 38 | hostSources := \ |
| 39 | $(commonSources) |
| 40 | |
| 41 | # For the host |
| 42 | # ===================================================== |
| 43 | |
| 44 | include $(CLEAR_VARS) |
| 45 | |
| 46 | LOCAL_SRC_FILES:= $(hostSources) |
| 47 | |
| 48 | LOCAL_MODULE:= libandroidfw |
| 49 | |
| 50 | LOCAL_MODULE_TAGS := optional |
| 51 | |
| 52 | LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS |
| 53 | |
| 54 | LOCAL_C_INCLUDES := \ |
| 55 | external/zlib |
| 56 | |
Narayan Kamath | 90f58db | 2013-12-11 16:48:07 +0000 | [diff] [blame] | 57 | LOCAL_STATIC_LIBRARIES := liblog libziparchive-host libutils |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 58 | |
| 59 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 60 | |
| 61 | |
| 62 | # For the device |
| 63 | # ===================================================== |
| 64 | |
| 65 | include $(CLEAR_VARS) |
| 66 | |
| 67 | LOCAL_SRC_FILES:= $(deviceSources) |
| 68 | |
| 69 | LOCAL_SHARED_LIBRARIES := \ |
| 70 | libbinder \ |
| 71 | liblog \ |
| 72 | libcutils \ |
| 73 | libutils \ |
| 74 | libz |
| 75 | |
Narayan Kamath | 560566d | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 76 | LOCAL_STATIC_LIBRARIES := libziparchive |
| 77 | |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 78 | LOCAL_C_INCLUDES := \ |
Narayan Kamath | 560566d | 2013-12-03 13:16:03 +0000 | [diff] [blame] | 79 | external/zlib \ |
| 80 | system/core/include |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 81 | |
| 82 | LOCAL_MODULE:= libandroidfw |
| 83 | |
| 84 | LOCAL_MODULE_TAGS := optional |
| 85 | |
| 86 | include $(BUILD_SHARED_LIBRARY) |
| 87 | |
| 88 | |
| 89 | # Include subdirectory makefiles |
| 90 | # ============================================================ |
| 91 | |
| 92 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 93 | # team really wants is to build the stuff defined by this makefile. |
| 94 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 95 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 96 | endif |