Android.mk revision 4f4c10104e8fbeed5dfeefb542e0bc5392daf9a5
1# Copyright (C) 2008 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# libutils is a little unique: It's built twice, once for the host 18# and once for the device. 19 20commonSources:= \ 21 BasicHashtable.cpp \ 22 BlobCache.cpp \ 23 BufferedTextOutput.cpp \ 24 CallStack.cpp \ 25 Debug.cpp \ 26 FileMap.cpp \ 27 Flattenable.cpp \ 28 LinearTransform.cpp \ 29 PropertyMap.cpp \ 30 RefBase.cpp \ 31 SharedBuffer.cpp \ 32 Static.cpp \ 33 StopWatch.cpp \ 34 String8.cpp \ 35 String16.cpp \ 36 StringArray.cpp \ 37 SystemClock.cpp \ 38 TextOutput.cpp \ 39 Threads.cpp \ 40 Timers.cpp \ 41 Tokenizer.cpp \ 42 Unicode.cpp \ 43 VectorImpl.cpp \ 44 misc.cpp 45 46 47# For the host 48# ===================================================== 49 50include $(CLEAR_VARS) 51 52LOCAL_SRC_FILES:= $(commonSources) 53 54LOCAL_MODULE:= libutils 55 56LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) 57 58ifeq ($(HOST_OS),windows) 59ifeq ($(strip $(USE_CYGWIN),),) 60# Under MinGW, ctype.h doesn't need multi-byte support 61LOCAL_CFLAGS += -DMB_CUR_MAX=1 62endif 63endif 64 65ifeq ($(TARGET_OS),linux) 66LOCAL_LDLIBS += -lrt -ldl 67endif 68 69include $(BUILD_HOST_STATIC_LIBRARY) 70 71 72# For the device 73# ===================================================== 74include $(CLEAR_VARS) 75 76 77# we have the common sources, plus some device-specific stuff 78LOCAL_SRC_FILES:= \ 79 $(commonSources) \ 80 Looper.cpp 81 82ifeq ($(TARGET_OS),linux) 83LOCAL_LDLIBS += -lrt -ldl 84endif 85 86LOCAL_C_INCLUDES += \ 87 bionic/libc/private 88 89LOCAL_LDLIBS += -lpthread 90 91LOCAL_SHARED_LIBRARIES := \ 92 liblog \ 93 libcutils \ 94 libdl \ 95 libcorkscrew 96 97LOCAL_MODULE:= libutils 98include $(BUILD_SHARED_LIBRARY) 99 100# Include subdirectory makefiles 101# ============================================================ 102 103# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework 104# team really wants is to build the stuff defined by this makefile. 105ifeq (,$(ONE_SHOT_MAKEFILE)) 106include $(call first-makefiles-under,$(LOCAL_PATH)) 107endif 108