Android.mk revision fb903a45d7b924c1dfacadaa99ebdf93fd8a1de4
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 29# formerly in libui 30commonUiSources:= \ 31 Input.cpp \ 32 InputDevice.cpp \ 33 Keyboard.cpp \ 34 KeyCharacterMap.cpp \ 35 KeyLayoutMap.cpp \ 36 VelocityControl.cpp \ 37 VelocityTracker.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_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS 56 57LOCAL_C_INCLUDES := \ 58 external/zlib 59 60include $(BUILD_HOST_STATIC_LIBRARY) 61 62 63# For the device 64# ===================================================== 65 66include $(CLEAR_VARS) 67 68LOCAL_SRC_FILES:= \ 69 $(commonSources) \ 70 BackupData.cpp \ 71 BackupHelpers.cpp \ 72 CursorWindow.cpp \ 73 InputTransport.cpp 74 75LOCAL_SHARED_LIBRARIES := \ 76 liblog \ 77 libcutils \ 78 libutils \ 79 libbinder \ 80 libskia \ 81 libz 82 83LOCAL_C_INCLUDES := \ 84 external/skia/include/core \ 85 external/icu4c/common \ 86 external/zlib 87 88LOCAL_MODULE:= libandroidfw 89 90LOCAL_MODULE_TAGS := optional 91 92include $(BUILD_SHARED_LIBRARY) 93 94 95ifeq ($(TARGET_OS),linux) 96include $(CLEAR_VARS) 97LOCAL_CFLAGS += -DSTATIC_ANDROIDFW_FOR_TOOLS 98LOCAL_C_INCLUDES += \ 99 external/skia/include/core \ 100 external/zlib \ 101 external/icu4c/common \ 102 bionic/libc/private 103LOCAL_LDLIBS := -lrt -ldl -lpthread 104LOCAL_MODULE := libandroidfw 105LOCAL_SRC_FILES := $(commonUtilsSources) BackupData.cpp BackupHelpers.cpp 106include $(BUILD_STATIC_LIBRARY) 107endif 108 109 110# Include subdirectory makefiles 111# ============================================================ 112 113# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework 114# team really wants is to build the stuff defined by this makefile. 115ifeq (,$(ONE_SHOT_MAKEFILE)) 116include $(call first-makefiles-under,$(LOCAL_PATH)) 117endif 118