Android.mk revision 63c168acf7a99a0120566a0a09a40ae04c789c5a
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 15LOCAL_PATH:= $(call my-dir) 16 17# libandroidfw is partially built for the host (used by obbtool, aapt, and others) 18# These files are common to host and target builds. 19 20commonSources := \ 21 Asset.cpp \ 22 AssetDir.cpp \ 23 AssetManager.cpp \ 24 misc.cpp \ 25 ObbFile.cpp \ 26 ResourceTypes.cpp \ 27 StreamingZipInflater.cpp \ 28 TypeWrappers.cpp \ 29 ZipFileRO.cpp \ 30 ZipUtils.cpp 31 32deviceSources := \ 33 $(commonSources) \ 34 BackupData.cpp \ 35 BackupHelpers.cpp \ 36 CursorWindow.cpp \ 37 DisplayEventDispatcher.cpp 38 39hostSources := $(commonSources) 40 41# For the host 42# ===================================================== 43include $(CLEAR_VARS) 44 45LOCAL_MODULE:= libandroidfw 46LOCAL_MODULE_HOST_OS := darwin linux windows 47LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS 48LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code 49LOCAL_SRC_FILES:= $(hostSources) 50LOCAL_C_INCLUDES := external/zlib 51 52include $(BUILD_HOST_STATIC_LIBRARY) 53 54 55# For the device 56# ===================================================== 57 58include $(CLEAR_VARS) 59 60LOCAL_MODULE:= libandroidfw 61LOCAL_SRC_FILES:= $(deviceSources) 62LOCAL_C_INCLUDES := \ 63 system/core/include 64LOCAL_STATIC_LIBRARIES := libziparchive libbase 65LOCAL_SHARED_LIBRARIES := \ 66 libbinder \ 67 liblog \ 68 libcutils \ 69 libgui \ 70 libutils \ 71 libz 72 73LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code 74 75include $(BUILD_SHARED_LIBRARY) 76 77 78# Include subdirectory makefiles 79# ============================================================ 80 81# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework 82# team really wants is to build the stuff defined by this makefile. 83ifeq (,$(ONE_SHOT_MAKEFILE)) 84include $(call first-makefiles-under,$(LOCAL_PATH)) 85endif 86