2009-03-04 11:31:44 +08: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)
|
|
|
|
|
|
|
|
# libutils is a little unique: It's built twice, once for the host
|
|
|
|
# and once for the device.
|
|
|
|
|
|
|
|
commonSources:= \
|
Add a basic hashtable data structure, with tests!
The basic hashtable is intended to be used to support a variety
of different datastructures such as map, set, multimap,
multiset, linkedmap, generationcache, etc.
Consequently its interface is fairly primitive.
The basic hashtable supports copy-on-write style functionality
using SharedBuffer.
The change introduces a simple generic function in TypeHelpers for
specifying hash functions. The idea is to add template
specializations of hash_type<T> next to the relevant data structures
such as String8, String16, sp<T>, etc.
Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
2011-11-15 10:29:15 +08:00
|
|
|
BasicHashtable.cpp \
|
2011-04-29 07:19:45 +08:00
|
|
|
BlobCache.cpp \
|
2009-03-04 11:31:44 +08:00
|
|
|
CallStack.cpp \
|
|
|
|
FileMap.cpp \
|
2012-10-26 14:11:13 +08:00
|
|
|
JenkinsHash.cpp \
|
2012-12-06 02:36:45 +08:00
|
|
|
LinearAllocator.cpp \
|
2011-06-29 08:43:30 +08:00
|
|
|
LinearTransform.cpp \
|
2012-08-11 11:44:39 +08:00
|
|
|
Log.cpp \
|
2013-10-25 08:09:15 +08:00
|
|
|
Printer.cpp \
|
|
|
|
ProcessCallStack.cpp \
|
2010-11-30 09:37:49 +08:00
|
|
|
PropertyMap.cpp \
|
2009-03-04 11:31:44 +08:00
|
|
|
RefBase.cpp \
|
|
|
|
SharedBuffer.cpp \
|
|
|
|
Static.cpp \
|
|
|
|
StopWatch.cpp \
|
|
|
|
String8.cpp \
|
|
|
|
String16.cpp \
|
|
|
|
SystemClock.cpp \
|
|
|
|
Threads.cpp \
|
|
|
|
Timers.cpp \
|
2010-11-11 08:03:06 +08:00
|
|
|
Tokenizer.cpp \
|
2010-11-10 06:37:23 +08:00
|
|
|
Unicode.cpp \
|
2009-03-04 11:31:44 +08:00
|
|
|
VectorImpl.cpp \
|
2009-06-06 06:11:23 +08:00
|
|
|
misc.cpp
|
2009-03-04 11:31:44 +08:00
|
|
|
|
2012-03-13 15:55:34 +08:00
|
|
|
host_commonCflags := -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
|
2009-03-04 11:31:44 +08:00
|
|
|
|
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
ifeq ($(strip $(USE_CYGWIN),),)
|
|
|
|
# Under MinGW, ctype.h doesn't need multi-byte support
|
2012-03-13 15:55:34 +08:00
|
|
|
host_commonCflags += -DMB_CUR_MAX=1
|
2009-03-04 11:31:44 +08:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-03-13 15:55:34 +08:00
|
|
|
host_commonLdlibs :=
|
|
|
|
|
2011-10-20 13:35:56 +08:00
|
|
|
ifeq ($(TARGET_OS),linux)
|
2012-03-13 15:55:34 +08:00
|
|
|
host_commonLdlibs += -lrt -ldl
|
2011-10-20 13:35:56 +08:00
|
|
|
endif
|
|
|
|
|
2012-03-13 15:55:34 +08:00
|
|
|
|
|
|
|
# For the host
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= $(commonSources)
|
2012-03-27 05:44:24 +08:00
|
|
|
ifeq ($(HOST_OS), linux)
|
|
|
|
LOCAL_SRC_FILES += Looper.cpp
|
|
|
|
endif
|
2012-03-13 15:55:34 +08:00
|
|
|
LOCAL_MODULE:= libutils
|
2013-07-24 08:39:35 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2012-03-13 15:55:34 +08:00
|
|
|
LOCAL_CFLAGS += $(host_commonCflags)
|
|
|
|
LOCAL_LDLIBS += $(host_commonLdlibs)
|
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
|
|
|
# For the host, 64-bit
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= $(commonSources)
|
2012-03-27 05:44:24 +08:00
|
|
|
ifeq ($(HOST_OS), linux)
|
|
|
|
LOCAL_SRC_FILES += Looper.cpp
|
|
|
|
endif
|
2012-03-13 15:55:34 +08:00
|
|
|
LOCAL_MODULE:= lib64utils
|
2013-07-24 08:39:35 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2012-03-13 15:55:34 +08:00
|
|
|
LOCAL_CFLAGS += $(host_commonCflags) -m64
|
|
|
|
LOCAL_LDLIBS += $(host_commonLdlibs)
|
2009-03-04 11:31:44 +08:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2013-03-22 22:26:33 +08:00
|
|
|
# For the device, static
|
2009-03-04 11:31:44 +08:00
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
|
|
|
|
# we have the common sources, plus some device-specific stuff
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
$(commonSources) \
|
2012-02-24 03:28:28 +08:00
|
|
|
Looper.cpp \
|
|
|
|
Trace.cpp
|
2009-03-04 11:31:44 +08:00
|
|
|
|
|
|
|
ifeq ($(TARGET_OS),linux)
|
|
|
|
LOCAL_LDLIBS += -lrt -ldl
|
|
|
|
endif
|
|
|
|
|
2012-12-06 02:36:45 +08:00
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
LOCAL_CFLAGS += -DALIGN_DOUBLE
|
|
|
|
endif
|
|
|
|
|
2009-03-04 11:31:44 +08:00
|
|
|
LOCAL_C_INCLUDES += \
|
2012-03-23 09:46:44 +08:00
|
|
|
bionic/libc/private \
|
|
|
|
external/zlib
|
2009-07-13 14:11:20 +08:00
|
|
|
|
2009-03-04 11:31:44 +08:00
|
|
|
LOCAL_LDLIBS += -lpthread
|
|
|
|
|
2013-03-22 22:26:33 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2013-05-07 11:20:50 +08:00
|
|
|
libcutils
|
2009-03-04 11:31:44 +08:00
|
|
|
|
2013-03-22 22:26:33 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
2013-11-01 07:25:04 +08:00
|
|
|
libbacktrace \
|
2013-03-22 22:26:33 +08:00
|
|
|
liblog \
|
|
|
|
libdl
|
|
|
|
|
2013-11-01 07:25:04 +08:00
|
|
|
include external/stlport/libstlport.mk
|
|
|
|
|
2013-03-22 22:26:33 +08:00
|
|
|
LOCAL_MODULE:= libutils
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
# For the device, shared
|
|
|
|
# =====================================================
|
|
|
|
include $(CLEAR_VARS)
|
2009-03-04 11:31:44 +08:00
|
|
|
LOCAL_MODULE:= libutils
|
2013-03-22 22:26:33 +08:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libutils
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
2013-11-01 07:25:04 +08:00
|
|
|
libbacktrace \
|
2013-03-22 22:26:33 +08:00
|
|
|
libcutils \
|
|
|
|
libdl \
|
2013-11-01 07:25:04 +08:00
|
|
|
liblog \
|
|
|
|
|
|
|
|
include external/stlport/libstlport.mk
|
2013-05-07 11:20:50 +08:00
|
|
|
|
2009-03-04 11:31:44 +08:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2010-07-01 07:10:35 +08:00
|
|
|
# Include subdirectory makefiles
|
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
|
|
|
|
# team really wants is to build the stuff defined by this makefile.
|
|
|
|
ifeq (,$(ONE_SHOT_MAKEFILE))
|
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|
2010-07-27 02:24:18 +08:00
|
|
|
endif
|