2009-03-04 11:32:55 +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 := $(my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2015-11-18 06:17:38 +08:00
|
|
|
libcutils_common_sources := \
|
|
|
|
config_utils.c \
|
2016-01-30 02:39:41 +08:00
|
|
|
fs_config.c \
|
2016-04-08 13:13:43 +08:00
|
|
|
canned_fs_config.c \
|
2016-01-30 02:39:41 +08:00
|
|
|
hashmap.c \
|
|
|
|
iosched_policy.c \
|
2015-11-18 06:17:38 +08:00
|
|
|
load_file.c \
|
2016-01-30 02:39:41 +08:00
|
|
|
native_handle.c \
|
2015-11-18 06:17:38 +08:00
|
|
|
open_memstream.c \
|
2016-01-30 02:39:41 +08:00
|
|
|
process_name.c \
|
|
|
|
record_stream.c \
|
|
|
|
sched_policy.c \
|
|
|
|
sockets.cpp \
|
2015-11-18 06:17:38 +08:00
|
|
|
strdup16to8.c \
|
|
|
|
strdup8to16.c \
|
2016-01-30 02:39:41 +08:00
|
|
|
strlcpy.c \
|
2015-11-18 06:17:38 +08:00
|
|
|
threads.c \
|
2015-11-18 06:28:33 +08:00
|
|
|
|
|
|
|
# some files must not be compiled when building against Mingw
|
|
|
|
# they correspond to features not used by our host development tools
|
|
|
|
# which are also hard or even impossible to port to native Win32
|
2015-11-18 06:17:38 +08:00
|
|
|
libcutils_nonwindows_sources := \
|
2013-09-21 08:58:54 +08:00
|
|
|
fs.c \
|
2014-05-21 03:01:29 +08:00
|
|
|
multiuser.c \
|
2016-01-15 09:18:27 +08:00
|
|
|
socket_inaddr_any_server_unix.c \
|
|
|
|
socket_local_client_unix.c \
|
|
|
|
socket_local_server_unix.c \
|
|
|
|
socket_loopback_client_unix.c \
|
|
|
|
socket_loopback_server_unix.c \
|
|
|
|
socket_network_client_unix.c \
|
2016-02-02 01:42:09 +08:00
|
|
|
sockets_unix.cpp \
|
2015-11-25 01:12:21 +08:00
|
|
|
str_parms.c \
|
2014-05-21 03:01:29 +08:00
|
|
|
|
2015-11-18 06:17:38 +08:00
|
|
|
libcutils_nonwindows_host_sources := \
|
2015-03-21 07:59:40 +08:00
|
|
|
ashmem-host.c \
|
2016-01-15 09:18:27 +08:00
|
|
|
trace-host.c \
|
2014-06-04 09:12:29 +08:00
|
|
|
|
2016-01-15 09:18:27 +08:00
|
|
|
libcutils_windows_host_sources := \
|
|
|
|
socket_inaddr_any_server_windows.c \
|
|
|
|
socket_network_client_windows.c \
|
2016-02-02 01:42:09 +08:00
|
|
|
sockets_windows.cpp \
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2015-03-25 05:46:01 +08:00
|
|
|
# Shared and static library for host
|
2016-01-15 09:18:27 +08:00
|
|
|
# Note: when linking this library on Windows, you must also link to Winsock2
|
|
|
|
# using "LOCAL_LDLIBS_windows := -lws2_32".
|
2009-03-04 11:32:55 +08:00
|
|
|
# ========================================================
|
|
|
|
LOCAL_MODULE := libcutils
|
2015-11-18 06:17:38 +08:00
|
|
|
LOCAL_SRC_FILES := $(libcutils_common_sources) dlmalloc_stubs.c
|
|
|
|
LOCAL_SRC_FILES_darwin := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources)
|
|
|
|
LOCAL_SRC_FILES_linux := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources)
|
2016-01-15 09:18:27 +08:00
|
|
|
LOCAL_SRC_FILES_windows := $(libcutils_windows_host_sources)
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2015-11-25 01:12:21 +08:00
|
|
|
LOCAL_CFLAGS := -Werror -Wall -Wextra
|
2014-06-06 05:32:49 +08:00
|
|
|
LOCAL_MULTILIB := both
|
2015-11-18 06:28:33 +08:00
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
2015-03-25 05:46:01 +08:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2015-11-18 06:17:38 +08:00
|
|
|
LOCAL_SRC_FILES := $(libcutils_common_sources) dlmalloc_stubs.c
|
|
|
|
LOCAL_SRC_FILES_darwin := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources)
|
|
|
|
LOCAL_SRC_FILES_linux := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources)
|
2015-03-25 05:46:01 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2015-11-25 01:12:21 +08:00
|
|
|
LOCAL_CFLAGS := -Werror -Wall -Wextra
|
2015-03-25 05:46:01 +08:00
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
include $(BUILD_HOST_SHARED_LIBRARY)
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2014-03-07 01:15:43 +08:00
|
|
|
|
2012-03-02 15:58:50 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
# Shared and static library for target
|
|
|
|
# ========================================================
|
2012-01-13 20:38:40 +08:00
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2015-11-18 06:17:38 +08:00
|
|
|
LOCAL_SRC_FILES := $(libcutils_common_sources) \
|
|
|
|
$(libcutils_nonwindows_sources) \
|
2012-06-07 07:25:03 +08:00
|
|
|
android_reboot.c \
|
|
|
|
ashmem-dev.c \
|
|
|
|
debugger.c \
|
|
|
|
klog.c \
|
|
|
|
partition_utils.c \
|
2013-05-24 00:54:47 +08:00
|
|
|
properties.c \
|
2012-06-07 07:25:03 +08:00
|
|
|
qtaguid.c \
|
2015-03-21 07:59:40 +08:00
|
|
|
trace-dev.c \
|
2014-05-16 19:26:08 +08:00
|
|
|
uevent.c \
|
|
|
|
|
2015-04-03 01:41:20 +08:00
|
|
|
LOCAL_SRC_FILES_arm += arch-arm/memset32.S
|
|
|
|
LOCAL_SRC_FILES_arm64 += arch-arm64/android_memset.S
|
2015-04-17 09:10:37 +08:00
|
|
|
|
|
|
|
LOCAL_SRC_FILES_mips += arch-mips/android_memset.c
|
|
|
|
LOCAL_SRC_FILES_mips64 += arch-mips/android_memset.c
|
2014-06-29 09:55:26 +08:00
|
|
|
|
2014-05-16 19:26:08 +08:00
|
|
|
LOCAL_SRC_FILES_x86 += \
|
|
|
|
arch-x86/android_memset16.S \
|
|
|
|
arch-x86/android_memset32.S \
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES_x86_64 += \
|
2014-09-08 20:27:01 +08:00
|
|
|
arch-x86_64/android_memset16.S \
|
|
|
|
arch-x86_64/android_memset32.S \
|
2014-05-16 19:26:08 +08:00
|
|
|
|
2014-01-23 11:06:04 +08:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes)
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2015-06-09 05:56:29 +08:00
|
|
|
ifneq ($(ENABLE_CPUSETS),)
|
|
|
|
LOCAL_CFLAGS += -DUSE_CPUSETS
|
|
|
|
endif
|
2015-10-27 07:22:11 +08:00
|
|
|
ifneq ($(ENABLE_SCHEDBOOST),)
|
|
|
|
LOCAL_CFLAGS += -DUSE_SCHEDBOOST
|
|
|
|
endif
|
2015-07-25 09:48:31 +08:00
|
|
|
LOCAL_CFLAGS += -Werror -Wall -Wextra -std=gnu90
|
2015-08-27 02:32:31 +08:00
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_SANITIZE := integer
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2013-04-11 08:27:35 +08:00
|
|
|
# TODO: remove liblog as whole static library, once we don't have prebuilt that requires
|
|
|
|
# liblog symbols present in libcutils.
|
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2015-06-09 05:56:29 +08:00
|
|
|
ifneq ($(ENABLE_CPUSETS),)
|
|
|
|
LOCAL_CFLAGS += -DUSE_CPUSETS
|
|
|
|
endif
|
2015-10-27 07:22:11 +08:00
|
|
|
ifneq ($(ENABLE_SCHEDBOOST),)
|
|
|
|
LOCAL_CFLAGS += -DUSE_SCHEDBOOST
|
|
|
|
endif
|
2015-07-25 09:48:31 +08:00
|
|
|
LOCAL_CFLAGS += -Werror -Wall -Wextra
|
2012-01-13 20:38:40 +08:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes)
|
2015-08-27 02:32:31 +08:00
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_SANITIZE := integer
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2012-10-13 05:25:19 +08:00
|
|
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|