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