2009-03-04 04:31:44 +01:00
|
|
|
# Copyright (C) 2008 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
|
|
|
commonSources:= \
|
|
|
|
CallStack.cpp \
|
|
|
|
FileMap.cpp \
|
2012-10-26 08:11:13 +02:00
|
|
|
JenkinsHash.cpp \
|
2011-06-29 02:43:30 +02:00
|
|
|
LinearTransform.cpp \
|
2012-08-11 05:44:39 +02:00
|
|
|
Log.cpp \
|
2014-03-03 19:52:14 +01:00
|
|
|
NativeHandle.cpp \
|
2013-10-25 02:09:15 +02:00
|
|
|
Printer.cpp \
|
|
|
|
ProcessCallStack.cpp \
|
2010-11-30 02:37:49 +01:00
|
|
|
PropertyMap.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
RefBase.cpp \
|
|
|
|
SharedBuffer.cpp \
|
|
|
|
Static.cpp \
|
|
|
|
StopWatch.cpp \
|
|
|
|
String8.cpp \
|
|
|
|
String16.cpp \
|
|
|
|
SystemClock.cpp \
|
|
|
|
Threads.cpp \
|
|
|
|
Timers.cpp \
|
2010-11-11 01:03:06 +01:00
|
|
|
Tokenizer.cpp \
|
2010-11-09 23:37:23 +01:00
|
|
|
Unicode.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
VectorImpl.cpp \
|
2015-02-03 02:31:27 +01:00
|
|
|
misc.cpp \
|
2009-03-04 04:31:44 +01:00
|
|
|
|
2014-04-30 20:10:46 +02:00
|
|
|
host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -Werror
|
2009-03-04 04:31:44 +01:00
|
|
|
|
2012-03-13 08:55:34 +01:00
|
|
|
# For the host
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= $(commonSources)
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_SRC_FILES_linux := Looper.cpp
|
|
|
|
LOCAL_CFLAGS_darwin := -Wno-unused-parameter
|
2012-03-13 08:55:34 +01:00
|
|
|
LOCAL_MODULE:= libutils
|
2013-07-24 02:39:35 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2012-03-13 08:55:34 +01:00
|
|
|
LOCAL_CFLAGS += $(host_commonCflags)
|
2015-08-13 23:43:34 +02:00
|
|
|
# Under MinGW, ctype.h doesn't need multi-byte support
|
|
|
|
LOCAL_CFLAGS_windows := -DMB_CUR_MAX=1
|
2014-06-05 23:32:49 +02:00
|
|
|
LOCAL_MULTILIB := both
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
2015-08-28 13:59:48 +02:00
|
|
|
LOCAL_C_INCLUDES += external/safe-iop/include
|
2012-03-13 08:55:34 +01:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2013-03-22 15:26:33 +01:00
|
|
|
# For the device, static
|
2009-03-04 04:31:44 +01:00
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
|
|
|
|
# we have the common sources, plus some device-specific stuff
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
$(commonSources) \
|
2015-05-18 22:04:01 +02:00
|
|
|
BlobCache.cpp \
|
2012-02-23 20:28:28 +01:00
|
|
|
Looper.cpp \
|
|
|
|
Trace.cpp
|
2009-03-04 04:31:44 +01:00
|
|
|
|
2012-12-05 19:36:45 +01:00
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
LOCAL_CFLAGS += -DALIGN_DOUBLE
|
|
|
|
endif
|
2014-04-30 20:10:46 +02:00
|
|
|
LOCAL_CFLAGS += -Werror
|
2012-12-05 19:36:45 +01:00
|
|
|
|
2013-03-22 15:26:33 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2015-05-18 22:04:01 +02:00
|
|
|
libcutils \
|
|
|
|
libc
|
2009-03-04 04:31:44 +01:00
|
|
|
|
2013-03-22 15:26:33 +01:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
2014-05-30 21:40:58 +02:00
|
|
|
libbacktrace \
|
2013-03-22 15:26:33 +01:00
|
|
|
liblog \
|
|
|
|
libdl
|
|
|
|
|
2015-06-12 22:10:55 +02:00
|
|
|
LOCAL_MODULE := libutils
|
2015-08-24 19:51:38 +02:00
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_SANITIZE := integer
|
2015-08-28 13:59:48 +02:00
|
|
|
LOCAL_C_INCLUDES += external/safe-iop/include
|
2013-03-22 15:26:33 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
# For the device, shared
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 04:31:44 +01:00
|
|
|
LOCAL_MODULE:= libutils
|
2013-03-22 15:26:33 +01:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libutils
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
2014-05-30 21:40:58 +02:00
|
|
|
libbacktrace \
|
2013-03-22 15:26:33 +01:00
|
|
|
libcutils \
|
|
|
|
libdl \
|
2014-04-30 20:10:46 +02:00
|
|
|
liblog
|
|
|
|
LOCAL_CFLAGS := -Werror
|
2015-08-28 13:59:48 +02:00
|
|
|
LOCAL_C_INCLUDES += external/safe-iop/include
|
2013-11-01 00:25:04 +01:00
|
|
|
|
2015-08-24 19:51:38 +02:00
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_SANITIZE := integer
|
2009-03-04 04:31:44 +01:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2015-08-18 18:36:50 +02:00
|
|
|
# Include subdirectory makefiles
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := SharedBufferTest
|
|
|
|
LOCAL_STATIC_LIBRARIES := libutils libcutils
|
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
|
|
|
LOCAL_SRC_FILES := SharedBufferTest.cpp
|
|
|
|
include $(BUILD_NATIVE_TEST)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := SharedBufferTest
|
|
|
|
LOCAL_STATIC_LIBRARIES := libutils libcutils
|
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
|
|
|
LOCAL_SRC_FILES := SharedBufferTest.cpp
|
|
|
|
include $(BUILD_HOST_NATIVE_TEST)
|
2010-07-01 01:10:35 +02:00
|
|
|
|
2015-02-03 02:31:27 +01:00
|
|
|
# Build the tests in the tests/ subdirectory.
|
2010-07-01 01:10:35 +02:00
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|