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 17commonSources:= \ 18 CallStack.cpp \ 19 FileMap.cpp \ 20 JenkinsHash.cpp \ 21 LinearTransform.cpp \ 22 Log.cpp \ 23 NativeHandle.cpp \ 24 Printer.cpp \ 25 PropertyMap.cpp \ 26 RefBase.cpp \ 27 SharedBuffer.cpp \ 28 Static.cpp \ 29 StopWatch.cpp \ 30 String8.cpp \ 31 String16.cpp \ 32 SystemClock.cpp \ 33 Threads.cpp \ 34 Timers.cpp \ 35 Tokenizer.cpp \ 36 Unicode.cpp \ 37 VectorImpl.cpp \ 38 misc.cpp \ 39 40host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror 41 42# For the host 43# ===================================================== 44include $(CLEAR_VARS) 45LOCAL_SRC_FILES:= $(commonSources) 46LOCAL_SRC_FILES_linux := Looper.cpp ProcessCallStack.cpp 47LOCAL_CFLAGS_darwin := -Wno-unused-parameter 48LOCAL_MODULE:= libutils 49LOCAL_STATIC_LIBRARIES := liblog 50LOCAL_CFLAGS += $(host_commonCflags) 51# Under MinGW, ctype.h doesn't need multi-byte support 52LOCAL_CFLAGS_windows := -DMB_CUR_MAX=1 53LOCAL_MULTILIB := both 54LOCAL_MODULE_HOST_OS := darwin linux windows 55LOCAL_C_INCLUDES += external/safe-iop/include 56include $(BUILD_HOST_STATIC_LIBRARY) 57 58 59# For the device, static 60# ===================================================== 61include $(CLEAR_VARS) 62 63 64# we have the common sources, plus some device-specific stuff 65LOCAL_SRC_FILES:= \ 66 $(commonSources) \ 67 BlobCache.cpp \ 68 Looper.cpp \ 69 ProcessCallStack.cpp \ 70 Trace.cpp 71 72ifeq ($(TARGET_ARCH),mips) 73LOCAL_CFLAGS += -DALIGN_DOUBLE 74endif 75LOCAL_CFLAGS += -Werror -fvisibility=protected 76 77LOCAL_STATIC_LIBRARIES := \ 78 libcutils \ 79 libc 80 81LOCAL_SHARED_LIBRARIES := \ 82 libbacktrace \ 83 liblog \ 84 libdl 85 86LOCAL_MODULE := libutils 87LOCAL_CLANG := true 88LOCAL_SANITIZE := integer 89LOCAL_C_INCLUDES += external/safe-iop/include 90include $(BUILD_STATIC_LIBRARY) 91 92# For the device, shared 93# ===================================================== 94include $(CLEAR_VARS) 95LOCAL_MODULE:= libutils 96LOCAL_WHOLE_STATIC_LIBRARIES := libutils 97LOCAL_SHARED_LIBRARIES := \ 98 libbacktrace \ 99 libcutils \ 100 libdl \ 101 liblog 102LOCAL_CFLAGS := -Werror 103LOCAL_C_INCLUDES += external/safe-iop/include 104 105LOCAL_CLANG := true 106LOCAL_SANITIZE := integer 107include $(BUILD_SHARED_LIBRARY) 108 109include $(CLEAR_VARS) 110LOCAL_MODULE := SharedBufferTest 111LOCAL_STATIC_LIBRARIES := libutils 112LOCAL_SHARED_LIBRARIES := liblog 113LOCAL_SRC_FILES := SharedBufferTest.cpp 114include $(BUILD_NATIVE_TEST) 115 116include $(CLEAR_VARS) 117LOCAL_MODULE := SharedBufferTest 118LOCAL_STATIC_LIBRARIES := libutils 119LOCAL_SHARED_LIBRARIES := liblog 120LOCAL_SRC_FILES := SharedBufferTest.cpp 121include $(BUILD_HOST_NATIVE_TEST) 122 123# Build the tests in the tests/ subdirectory. 124include $(call first-makefiles-under,$(LOCAL_PATH)) 125