2009-03-04 04:32:55 +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 := $(my-dir)
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2010-05-20 07:33:28 +02:00
|
|
|
ifeq ($(TARGET_CPU_SMP),true)
|
|
|
|
targetSmpFlag := -DANDROID_SMP=1
|
|
|
|
else
|
|
|
|
targetSmpFlag := -DANDROID_SMP=0
|
|
|
|
endif
|
|
|
|
hostSmpFlag := -DANDROID_SMP=0
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
commonSources := \
|
|
|
|
array.c \
|
|
|
|
hashmap.c \
|
2010-06-04 02:05:15 +02:00
|
|
|
atomic.c.arm \
|
2009-04-10 23:24:31 +02:00
|
|
|
native_handle.c \
|
2009-03-04 04:32:55 +01:00
|
|
|
buffer.c \
|
|
|
|
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 \
|
2011-05-05 23:25:36 +02:00
|
|
|
sockets.c \
|
2009-03-04 04:32:55 +01:00
|
|
|
config_utils.c \
|
|
|
|
cpu_info.c \
|
|
|
|
load_file.c \
|
2011-09-02 02:09:44 +02:00
|
|
|
list.c \
|
2010-01-23 01:37:25 +01:00
|
|
|
open_memstream.c \
|
2009-03-04 04:32:55 +01:00
|
|
|
strdup16to8.c \
|
|
|
|
strdup8to16.c \
|
|
|
|
record_stream.c \
|
|
|
|
process_name.c \
|
|
|
|
properties.c \
|
2012-03-19 22:07:26 +01:00
|
|
|
qsort_r_compat.c \
|
2009-09-12 19:06:57 +02:00
|
|
|
threads.c \
|
2010-02-25 23:02:55 +01:00
|
|
|
sched_policy.c \
|
2011-03-24 19:11:06 +01:00
|
|
|
iosched_policy.c \
|
2012-08-15 06:00:22 +02:00
|
|
|
str_parms.c \
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2009-03-19 06:20:28 +01:00
|
|
|
commonHostSources := \
|
|
|
|
ashmem-host.c
|
|
|
|
|
2009-03-04 04:32:55 +01: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 22:23:23 +02:00
|
|
|
WINDOWS_HOST_ONLY :=
|
2009-03-04 04:32:55 +01:00
|
|
|
ifeq ($(HOST_OS),windows)
|
|
|
|
ifeq ($(strip $(USE_CYGWIN)),)
|
2009-05-26 22:23:23 +02:00
|
|
|
WINDOWS_HOST_ONLY := 1
|
2009-03-04 04:32:55 +01:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
# USE_MINGW is defined when we build against Mingw on Linux
|
|
|
|
ifneq ($(strip $(USE_MINGW)),)
|
2009-05-26 22:23:23 +02:00
|
|
|
WINDOWS_HOST_ONLY := 1
|
2009-03-04 04:32:55 +01:00
|
|
|
endif
|
|
|
|
|
2009-05-26 22:23:23 +02:00
|
|
|
ifeq ($(WINDOWS_HOST_ONLY),1)
|
2009-03-04 04:32:55 +01:00
|
|
|
commonSources += \
|
|
|
|
uio.c
|
|
|
|
else
|
|
|
|
commonSources += \
|
2009-05-26 22:23:23 +02:00
|
|
|
abort_socket.c \
|
2012-08-28 00:03:37 +02:00
|
|
|
fs.c \
|
2009-03-04 04:32:55 +01:00
|
|
|
selector.c \
|
2012-08-17 02:16:43 +02:00
|
|
|
multiuser.c \
|
2009-03-19 06:20:28 +01:00
|
|
|
zygote.c
|
2009-03-04 04:32:55 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
# Static library for host
|
|
|
|
# ========================================================
|
|
|
|
LOCAL_MODULE := libcutils
|
2010-08-19 03:17:55 +02:00
|
|
|
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_LDLIBS := -lpthread
|
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2010-05-20 07:33:28 +02:00
|
|
|
LOCAL_CFLAGS += $(hostSmpFlag)
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2012-03-02 08:58:50 +01:00
|
|
|
# Static library for host, 64-bit
|
|
|
|
# ========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := lib64cutils
|
|
|
|
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
|
|
|
LOCAL_LDLIBS := -lpthread
|
|
|
|
LOCAL_STATIC_LIBRARIES := lib64log
|
|
|
|
LOCAL_CFLAGS += $(hostSmpFlag) -m64
|
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
# Shared and static library for target
|
|
|
|
# ========================================================
|
2012-01-13 13:38:40 +01:00
|
|
|
|
|
|
|
# This is needed in LOCAL_C_INCLUDES to access the C library's private
|
|
|
|
# header named <bionic_time.h>
|
|
|
|
#
|
|
|
|
libcutils_c_includes := bionic/libc/private
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2012-06-07 01:25:03 +02:00
|
|
|
LOCAL_SRC_FILES := $(commonSources) \
|
|
|
|
android_reboot.c \
|
|
|
|
ashmem-dev.c \
|
|
|
|
debugger.c \
|
|
|
|
klog.c \
|
|
|
|
mq.c \
|
|
|
|
partition_utils.c \
|
|
|
|
qtaguid.c \
|
2012-11-15 02:25:28 +01:00
|
|
|
trace.c \
|
2012-08-15 06:00:22 +02:00
|
|
|
uevent.c
|
2009-03-04 04:32:55 +01:00
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH),arm)
|
2012-05-25 01:54:49 +02:00
|
|
|
LOCAL_SRC_FILES += arch-arm/memset32.S
|
2009-03-04 04:32:55 +01:00
|
|
|
else # !arm
|
2012-05-25 01:54:49 +02:00
|
|
|
ifeq ($(TARGET_ARCH),x86)
|
|
|
|
ifeq ($(ARCH_X86_HAVE_SSE2),true)
|
|
|
|
LOCAL_CFLAGS += -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DUSE_SSE2
|
|
|
|
LOCAL_SRC_FILES += arch-x86/android_memset16.S arch-x86/android_memset32.S memory.c
|
|
|
|
else # !ARCH_X86_HAVE_SSE2
|
|
|
|
LOCAL_SRC_FILES += memory.c
|
|
|
|
endif # !ARCH_X86_HAVE_SSE2
|
|
|
|
else # !x86
|
|
|
|
ifeq ($(TARGET_ARCH),mips)
|
|
|
|
LOCAL_SRC_FILES += arch-mips/android_memset.c
|
|
|
|
else # !mips
|
|
|
|
LOCAL_SRC_FILES += memory.c
|
|
|
|
endif # !mips
|
|
|
|
endif # !x86
|
2009-03-04 04:32:55 +01:00
|
|
|
endif # !arm
|
|
|
|
|
2012-01-13 13:38:40 +01:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes) $(KERNEL_HEADERS)
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := liblog
|
2010-05-20 07:33:28 +02:00
|
|
|
LOCAL_CFLAGS += $(targetSmpFlag)
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libcutils
|
2013-04-11 02:27:35 +02: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 04:32:55 +01:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2010-05-20 07:33:28 +02:00
|
|
|
LOCAL_CFLAGS += $(targetSmpFlag)
|
2012-01-13 13:38:40 +01:00
|
|
|
LOCAL_C_INCLUDES := $(libcutils_c_includes)
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
|
2011-03-24 19:11:06 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := tst_str_parms
|
|
|
|
LOCAL_CFLAGS += -DTEST_STR_PARMS
|
|
|
|
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
|
2011-04-28 07:26:23 +02:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog
|
2011-03-24 19:11:06 +01:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
2011-04-28 07:26:23 +02:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2012-10-12 23:25:19 +02:00
|
|
|
|
|
|
|
include $(call all-makefiles-under,$(LOCAL_PATH))
|