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