Android.mk revision 027692b640059fb1a9795215c0a863183aa5829c
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 build time keymap validation tool) 18# These files are common to host and target builds. 19 20# formerly in libutils 21commonUtilsSources:= \ 22 Asset.cpp \ 23 AssetDir.cpp \ 24 AssetManager.cpp \ 25 ObbFile.cpp \ 26 ResourceTypes.cpp \ 27 StreamingZipInflater.cpp \ 28 ZipFileCRO.cpp \ 29 ZipFileRO.cpp \ 30 ZipUtils.cpp 31 32# formerly in libui 33commonUiSources:= \ 34 Input.cpp \ 35 Keyboard.cpp \ 36 KeyCharacterMap.cpp \ 37 KeyLayoutMap.cpp \ 38 VirtualKeyMap.cpp 39 40commonSources:= \ 41 $(commonUtilsSources) \ 42 $(commonUiSources) 43 44# For the host 45# ===================================================== 46 47include $(CLEAR_VARS) 48 49LOCAL_SRC_FILES:= $(commonSources) 50 51LOCAL_MODULE:= libandroidfw 52 53LOCAL_MODULE_TAGS := optional 54 55LOCAL_C_INCLUDES := \ 56 external/zlib 57 58include $(BUILD_HOST_STATIC_LIBRARY) 59 60 61# For the device 62# ===================================================== 63 64include $(CLEAR_VARS) 65 66LOCAL_SRC_FILES:= \ 67 $(commonSources) \ 68 BackupData.cpp \ 69 BackupHelpers.cpp \ 70 InputTransport.cpp 71 72LOCAL_SHARED_LIBRARIES := \ 73 liblog \ 74 libcutils \ 75 libutils \ 76 libbinder \ 77 libskia \ 78 libz 79 80LOCAL_C_INCLUDES := \ 81 external/skia/include/core \ 82 external/icu4c/common \ 83 external/zlib 84 85LOCAL_MODULE:= libandroidfw 86 87LOCAL_MODULE_TAGS := optional 88 89include $(BUILD_SHARED_LIBRARY) 90 91 92ifeq ($(TARGET_OS),linux) 93include $(CLEAR_VARS) 94LOCAL_C_INCLUDES += \ 95 external/skia/include/core \ 96 external/zlib \ 97 external/icu4c/common \ 98 bionic/libc/private 99LOCAL_LDLIBS := -lrt -ldl -lpthread 100LOCAL_MODULE := libandroidfw 101LOCAL_SRC_FILES := $(commonUtilsSources) BackupData.cpp BackupHelpers.cpp 102include $(BUILD_STATIC_LIBRARY) 103endif 104 105 106# Include subdirectory makefiles 107# ============================================================ 108 109# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework 110# team really wants is to build the stuff defined by this makefile. 111ifeq (,$(ONE_SHOT_MAKEFILE)) 112include $(call first-makefiles-under,$(LOCAL_PATH)) 113endif 114