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