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 \ |
| 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 | |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 38 | hostSources := $(commonSources) |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 39 | |
| 40 | # For the host |
| 41 | # ===================================================== |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 42 | include $(CLEAR_VARS) |
| 43 | |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 44 | LOCAL_MODULE:= libandroidfw |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 45 | LOCAL_MODULE_TAGS := optional |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 46 | LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 47 | LOCAL_SRC_FILES:= $(hostSources) |
| 48 | LOCAL_C_INCLUDES := external/zlib |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 49 | |
| 50 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 51 | |
| 52 | |
| 53 | # For the device |
| 54 | # ===================================================== |
| 55 | |
| 56 | include $(CLEAR_VARS) |
| 57 | |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 58 | LOCAL_MODULE:= libandroidfw |
| 59 | LOCAL_MODULE_TAGS := optional |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 60 | LOCAL_SRC_FILES:= $(deviceSources) |
Adam Lesinski | 4bf5810 | 2014-11-03 11:21:19 -0800 | [diff] [blame] | 61 | LOCAL_C_INCLUDES := \ |
| 62 | external/zlib \ |
| 63 | system/core/include |
| 64 | LOCAL_STATIC_LIBRARIES := libziparchive |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 65 | LOCAL_SHARED_LIBRARIES := \ |
| 66 | libbinder \ |
| 67 | liblog \ |
| 68 | libcutils \ |
| 69 | libutils \ |
| 70 | libz |
| 71 | |
Adam Lesinski | 16c4d15 | 2014-01-24 13:27:13 -0800 | [diff] [blame] | 72 | include $(BUILD_SHARED_LIBRARY) |
| 73 | |
| 74 | |
| 75 | # Include subdirectory makefiles |
| 76 | # ============================================================ |
| 77 | |
| 78 | # If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework |
| 79 | # team really wants is to build the stuff defined by this makefile. |
| 80 | ifeq (,$(ONE_SHOT_MAKEFILE)) |
| 81 | include $(call first-makefiles-under,$(LOCAL_PATH)) |
| 82 | endif |