2009-03-04 03:32:55 +00: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)
|
|
|
|
|
|
|
|
commonSources := \
|
|
|
|
hashmap.c \
|
2010-06-04 00:05:15 +00:00
|
|
|
atomic.c.arm \
|
2009-04-10 21:24:31 +00:00
|
|
|
native_handle.c \
|
2009-03-04 03:32:55 +00:00
|
|
|
config_utils.c \
|
|
|
|
load_file.c \
|
2015-04-02 07:43:45 +00:00
|
|
|
memory.c \
|
2010-01-23 00:37:25 +00:00
|
|
|
open_memstream.c \
|
2009-03-04 03:32:55 +00:00
|
|
|
strdup16to8.c \
|
|
|
|
strdup8to16.c \
|
2013-06-04 17:34:49 +00:00
|
|
|
record_stream.c \
|
2009-03-04 03:32:55 +00:00
|
|
|
process_name.c \
|
2009-09-12 17:06:57 +00:00
|
|
|
threads.c \
|
2010-02-25 22:02:55 +00:00
|
|
|
sched_policy.c \
|
2011-03-24 18:11:06 +00:00
|
|
|
iosched_policy.c \
|
2012-08-15 04:00:22 +00:00
|
|
|
str_parms.c \
|
2009-03-04 03:32:55 +00: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
|
2009-05-26 20:23:23 +00:00
|
|
|
WINDOWS_HOST_ONLY :=
|
2009-03-04 03:32:55 +00:00
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
ifeq ($(strip $(USE_CYGWIN)),)
|
2009-05-26 20:23:23 +00:00
|
|
|
WINDOWS_HOST_ONLY := 1
|
2009-03-04 03:32:55 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
# USE_MINGW is defined when we build against Mingw on Linux
|
|
|
|
ifneq ($(strip $(USE_MINGW)),)
|
2009-05-26 20:23:23 +00:00
|
|
|
WINDOWS_HOST_ONLY := 1
|
2009-03-04 03:32:55 +00:00
|
|
|
endif
|
|
|
|
|
2013-09-21 00:58:54 +00:00
|
|
|
ifneq ($(WINDOWS_HOST_ONLY),1)
|
|
|
|
commonSources += \
|
|
|
|
fs.c \
|
2014-05-20 19:01:29 +00:00
|
|
|
multiuser.c \
|
2014-06-03 22:28:26 +00:00
|
|
|
socket_inaddr_any_server.c \
|
|
|
|
socket_local_client.c \
|
|
|
|
socket_local_server.c \
|
|
|
|
socket_loopback_client.c \
|
|
|
|
socket_loopback_server.c \
|
|
|
|
socket_network_client.c \
|
|
|
|
sockets.c \
|
2014-05-20 19:01:29 +00:00
|
|
|
|
2014-06-04 01:12:29 +00:00
|
|
|
commonHostSources += \
|
2015-03-20 23:59:40 +00:00
|
|
|
ashmem-host.c \
|
|
|
|
trace-host.c
|
2014-06-04 01:12:29 +00:00
|
|
|
|
2013-09-21 00:58:54 +00:00
|
|
|
endif
|
|
|
|
|
2009-03-04 03:32:55 +00:00
|
|
|
|
2015-03-24 21:46:01 +00:00
|
|
|
# Shared and static library for host
|
2009-03-04 03:32:55 +00:00
|
|
|
# ========================================================
|
|
|
|
LOCAL_MODULE := libcutils
|
2010-08-19 01:17:55 +00:00
|
|
|
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
2009-03-04 03:32:55 +00:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2014-05-05 15:49:13 +00:00
|
|
|
ifneq ($(HOST_OS),windows)
|
|
|
|
LOCAL_CFLAGS += -Werror
|
|
|
|
endif
|
2014-06-05 21:32:49 +00:00
|
|
|
LOCAL_MULTILIB := both
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2009-03-04 03:32:55 +00:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
2015-03-24 21:46:01 +00:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
|
|
|
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
|
|
|
ifneq ($(HOST_OS),windows)
|
|
|
|
LOCAL_CFLAGS += -Werror
|
|
|
|
endif
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
|
|
|
include $(BUILD_HOST_SHARED_LIBRARY)
|
2009-03-04 03:32:55 +00:00
|
|
|
|
2014-03-06 17:15:43 +00:00
|
|
|
# Tests for host
|
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := tst_str_parms
|
2014-05-05 15:49:13 +00:00
|
|
|
LOCAL_CFLAGS += -DTEST_STR_PARMS
|
|
|
|
ifneq ($(HOST_OS),windows)
|
|
|
|
LOCAL_CFLAGS += -Werror
|
|
|
|
endif
|
2014-03-06 17:15:43 +00:00
|
|
|
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
|
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2014-03-06 17:15:43 +00:00
|
|
|
include $(BUILD_HOST_EXECUTABLE)
|
|
|
|
|
2012-03-02 07:58:50 +00:00
|
|
|
|
2009-03-04 03:32:55 +00:00
|
|
|
# Shared and static library for target
|
|
|
|
# ========================================================
|
2012-01-13 12:38:40 +00:00
|
|
|
|
2009-03-04 03:32:55 +00:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2012-06-06 23:25:03 +00:00
|
|
|
LOCAL_SRC_FILES := $(commonSources) \
|
|
|
|
android_reboot.c \
|
|
|
|
ashmem-dev.c \
|
|
|
|
debugger.c \
|
|
|
|
klog.c \
|
|
|
|
partition_utils.c \
|
2013-05-23 16:54:47 +00:00
|
|
|
properties.c \
|
2012-06-06 23:25:03 +00:00
|
|
|
qtaguid.c \
|
2015-03-20 23:59:40 +00:00
|
|
|
trace-dev.c \
|
2014-05-16 11:26:08 +00:00
|
|
|
uevent.c \
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES_arm += \
|
|
|
|
arch-arm/memset32.S \
|
|
|
|
|
2014-10-06 20:27:20 +00:00
|
|
|
# arch-arm/memset32.S does not compile with Clang.
|
|
|
|
LOCAL_CLANG_ASFLAGS_arm += -no-integrated-as
|
|
|
|
|
2014-06-20 17:28:28 +00:00
|
|
|
LOCAL_SRC_FILES_arm64 += \
|
|
|
|
arch-arm64/android_memset.S \
|
|
|
|
|
2014-06-29 01:55:26 +00:00
|
|
|
ifndef ARCH_MIPS_REV6
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_SRC_FILES_mips += \
|
|
|
|
arch-mips/android_memset.c \
|
|
|
|
|
2014-06-29 01:55:26 +00:00
|
|
|
LOCAL_CFLAGS_mips += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
|
|
|
endif
|
|
|
|
|
|
|
|
# TODO: switch mips64 back to using arch-mips/android_memset.c
|
|
|
|
LOCAL_SRC_FILES_mips64 += \
|
|
|
|
# arch-mips/android_memset.c \
|
|
|
|
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_SRC_FILES_x86 += \
|
|
|
|
arch-x86/android_memset16.S \
|
|
|
|
arch-x86/android_memset32.S \
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES_x86_64 += \
|
2014-09-08 12:27:01 +00:00
|
|
|
arch-x86_64/android_memset16.S \
|
|
|
|
arch-x86_64/android_memset32.S \
|
2014-05-16 11:26:08 +00:00
|
|
|
|
|
|
|
LOCAL_CFLAGS_arm += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
2014-06-20 17:28:28 +00:00
|
|
|
LOCAL_CFLAGS_arm64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
2014-06-29 01:55:26 +00:00
|
|
|
#LOCAL_CFLAGS_mips64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_CFLAGS_x86 += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
|
|
|
LOCAL_CFLAGS_x86_64 += -DHAVE_MEMSET16 -DHAVE_MEMSET32
|
2009-03-04 03:32:55 +00:00
|
|
|
|
2014-01-23 03:06:04 +00:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes)
|
2009-03-04 03:32:55 +00:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2014-11-17 19:16:59 +00:00
|
|
|
LOCAL_CFLAGS += -Werror -std=gnu90
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2009-03-04 03:32:55 +00:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2013-04-11 00:27:35 +00: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 03:32:55 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2014-11-17 19:16:59 +00:00
|
|
|
LOCAL_CFLAGS += -Werror
|
2012-01-13 12:38:40 +00:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes)
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2009-03-04 03:32:55 +00:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2011-03-24 18:11:06 +00:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := tst_str_parms
|
2014-04-29 22:49:14 +00:00
|
|
|
LOCAL_CFLAGS += -DTEST_STR_PARMS -Werror
|
2011-03-24 18:11:06 +00:00
|
|
|
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
|
2011-04-28 05:26:23 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2011-03-24 18:11:06 +00:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
2014-05-16 11:26:08 +00:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2011-04-28 05:26:23 +00:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2012-10-12 21:25:19 +00:00
|
|
|
|
|
|
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|