2009-03-04 04:32:55 +01:00
|
|
|
# Copyright 2005 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Android.mk for adb
|
|
|
|
#
|
|
|
|
|
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
2017-05-08 20:30:34 +02:00
|
|
|
include $(LOCAL_PATH)/../platform_tools_tool_version.mk
|
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
adb_host_sanitize :=
|
|
|
|
adb_target_sanitize :=
|
|
|
|
|
2015-05-06 02:46:50 +02:00
|
|
|
ADB_COMMON_CFLAGS := \
|
2015-05-21 03:56:10 +02:00
|
|
|
-Wall -Wextra -Werror \
|
2015-07-08 22:50:42 +02:00
|
|
|
-Wno-unused-parameter \
|
2015-07-09 22:35:09 +02:00
|
|
|
-Wno-missing-field-initializers \
|
2015-10-27 21:40:35 +01:00
|
|
|
-Wvla \
|
2017-05-10 17:41:33 +02:00
|
|
|
-DADB_VERSION="\"$(tool_version)\"" \
|
2015-05-06 02:46:50 +02:00
|
|
|
|
2017-05-03 23:01:35 +02:00
|
|
|
ADB_COMMON_posix_CFLAGS := \
|
2015-11-12 02:56:12 +01:00
|
|
|
-Wexit-time-destructors \
|
2017-05-10 17:41:33 +02:00
|
|
|
-Wthread-safety \
|
2017-05-03 23:01:35 +02:00
|
|
|
|
|
|
|
ADB_COMMON_linux_CFLAGS := \
|
|
|
|
$(ADB_COMMON_posix_CFLAGS) \
|
2015-11-12 02:56:12 +01:00
|
|
|
|
|
|
|
ADB_COMMON_darwin_CFLAGS := \
|
2017-05-03 23:01:35 +02:00
|
|
|
$(ADB_COMMON_posix_CFLAGS) \
|
2015-11-12 02:56:12 +01:00
|
|
|
|
2015-08-03 03:13:54 +02:00
|
|
|
# Define windows.h and tchar.h Unicode preprocessor symbols so that
|
|
|
|
# CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the
|
|
|
|
# build if you accidentally pass char*. Fix by calling like:
|
2015-11-13 00:20:15 +01:00
|
|
|
# std::wstring path_wide;
|
|
|
|
# if (!android::base::UTF8ToWide(path_utf8, &path_wide)) { /* error handling */ }
|
|
|
|
# CreateFileW(path_wide.c_str());
|
2015-08-03 03:13:54 +02:00
|
|
|
ADB_COMMON_windows_CFLAGS := \
|
|
|
|
-DUNICODE=1 -D_UNICODE=1 \
|
|
|
|
|
2014-11-25 08:34:35 +01:00
|
|
|
# libadb
|
|
|
|
# =========================================================
|
|
|
|
|
|
|
|
# Much of adb is duplicated in bootable/recovery/minadb and fastboot. Changes
|
|
|
|
# made to adb rarely get ported to the other two, so the trees have diverged a
|
|
|
|
# bit. We'd like to stop this because it is a maintenance nightmare, but the
|
|
|
|
# divergence makes this difficult to do all at once. For now, we will start
|
|
|
|
# small by moving common files into a static library. Hopefully some day we can
|
|
|
|
# get enough of adb in here that we no longer need minadb. https://b/17626262
|
2015-02-19 02:47:33 +01:00
|
|
|
LIBADB_SRC_FILES := \
|
2015-02-26 02:51:28 +01:00
|
|
|
adb.cpp \
|
2015-02-25 06:26:58 +01:00
|
|
|
adb_io.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
adb_listeners.cpp \
|
2015-09-23 00:52:57 +02:00
|
|
|
adb_trace.cpp \
|
2015-04-17 22:57:15 +02:00
|
|
|
adb_utils.cpp \
|
2016-02-17 02:34:53 +01:00
|
|
|
fdevent.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
sockets.cpp \
|
2016-08-25 03:38:44 +02:00
|
|
|
socket_spec.cpp \
|
2016-12-06 02:11:34 +01:00
|
|
|
sysdeps/errno.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
transport.cpp \
|
|
|
|
transport_local.cpp \
|
|
|
|
transport_usb.cpp \
|
2015-02-19 02:47:33 +01:00
|
|
|
|
2015-04-19 22:17:01 +02:00
|
|
|
LIBADB_TEST_SRCS := \
|
|
|
|
adb_io_test.cpp \
|
2016-04-07 20:25:48 +02:00
|
|
|
adb_listeners_test.cpp \
|
2015-04-19 22:17:01 +02:00
|
|
|
adb_utils_test.cpp \
|
2016-02-10 23:49:00 +01:00
|
|
|
fdevent_test.cpp \
|
2016-09-20 02:31:55 +02:00
|
|
|
socket_spec_test.cpp \
|
2016-02-10 23:49:00 +01:00
|
|
|
socket_test.cpp \
|
2016-02-09 23:59:09 +01:00
|
|
|
sysdeps_test.cpp \
|
2016-07-29 03:09:48 +02:00
|
|
|
sysdeps/stat_test.cpp \
|
2015-04-19 22:17:01 +02:00
|
|
|
transport_test.cpp \
|
|
|
|
|
2015-02-21 02:20:09 +01:00
|
|
|
LIBADB_CFLAGS := \
|
2015-05-06 02:46:50 +02:00
|
|
|
$(ADB_COMMON_CFLAGS) \
|
2015-02-19 02:47:33 +01:00
|
|
|
-fvisibility=hidden \
|
2015-07-24 23:32:46 +02:00
|
|
|
|
|
|
|
LIBADB_linux_CFLAGS := \
|
2015-11-12 02:56:12 +01:00
|
|
|
$(ADB_COMMON_linux_CFLAGS) \
|
|
|
|
|
|
|
|
LIBADB_darwin_CFLAGS := \
|
|
|
|
$(ADB_COMMON_darwin_CFLAGS) \
|
2014-11-25 08:34:35 +01:00
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LIBADB_windows_CFLAGS := \
|
|
|
|
$(ADB_COMMON_windows_CFLAGS) \
|
2015-07-24 23:32:46 +02:00
|
|
|
|
2015-02-26 02:51:28 +01:00
|
|
|
LIBADB_darwin_SRC_FILES := \
|
2016-02-22 23:27:23 +01:00
|
|
|
sysdeps_unix.cpp \
|
2017-04-12 22:57:06 +02:00
|
|
|
sysdeps/posix/network.cpp \
|
2016-09-28 21:32:45 +02:00
|
|
|
client/usb_dispatch.cpp \
|
|
|
|
client/usb_libusb.cpp \
|
2017-01-19 22:44:23 +01:00
|
|
|
client/usb_osx.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
|
|
|
|
LIBADB_linux_SRC_FILES := \
|
2016-02-22 23:27:23 +01:00
|
|
|
sysdeps_unix.cpp \
|
2017-04-12 22:57:06 +02:00
|
|
|
sysdeps/posix/network.cpp \
|
2016-09-28 21:32:45 +02:00
|
|
|
client/usb_dispatch.cpp \
|
|
|
|
client/usb_libusb.cpp \
|
2017-01-19 22:44:23 +01:00
|
|
|
client/usb_linux.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
|
|
|
|
LIBADB_windows_SRC_FILES := \
|
2015-04-17 01:47:02 +02:00
|
|
|
sysdeps_win32.cpp \
|
2016-12-05 22:24:48 +01:00
|
|
|
sysdeps/win32/errno.cpp \
|
2016-07-29 03:09:48 +02:00
|
|
|
sysdeps/win32/stat.cpp \
|
2017-01-19 22:44:23 +01:00
|
|
|
client/usb_windows.cpp \
|
2014-11-25 20:00:56 +01:00
|
|
|
|
2015-09-09 02:13:04 +02:00
|
|
|
LIBADB_TEST_windows_SRCS := \
|
2016-12-05 22:24:48 +01:00
|
|
|
sysdeps/win32/errno_test.cpp \
|
2015-09-09 02:13:04 +02:00
|
|
|
sysdeps_win32_test.cpp \
|
|
|
|
|
2017-01-12 02:37:35 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_CLANG := true
|
|
|
|
LOCAL_MODULE := libadbd_usb
|
|
|
|
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
|
|
|
|
LOCAL_SRC_FILES := daemon/usb.cpp
|
|
|
|
|
|
|
|
LOCAL_SANITIZE := $(adb_target_sanitize)
|
|
|
|
|
|
|
|
# Even though we're building a static library (and thus there's no link step for
|
|
|
|
# this to take effect), this adds the includes to our path.
|
|
|
|
LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libbase
|
|
|
|
|
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
2014-11-25 08:34:35 +01:00
|
|
|
include $(CLEAR_VARS)
|
2015-04-16 23:12:50 +02:00
|
|
|
LOCAL_CLANG := true
|
2014-11-25 20:00:56 +01:00
|
|
|
LOCAL_MODULE := libadbd
|
2014-11-25 08:34:35 +01:00
|
|
|
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
|
2015-02-19 02:20:44 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(LIBADB_SRC_FILES) \
|
2016-10-06 04:02:29 +02:00
|
|
|
adbd_auth.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
jdwp_service.cpp \
|
2017-04-12 22:57:06 +02:00
|
|
|
sysdeps/posix/network.cpp \
|
2015-02-19 02:20:44 +01:00
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_target_sanitize)
|
2015-04-20 17:09:20 +02:00
|
|
|
|
2015-03-19 21:25:27 +01:00
|
|
|
# Even though we're building a static library (and thus there's no link step for
|
|
|
|
# this to take effect), this adds the includes to our path.
|
2017-03-29 21:19:40 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libqemu_pipe libbase
|
2015-03-19 21:25:27 +01:00
|
|
|
|
2017-01-12 02:37:35 +01:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libadbd_usb
|
|
|
|
|
2014-11-25 20:00:56 +01:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libadb
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
2014-11-25 20:00:56 +01:00
|
|
|
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
|
|
|
|
LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
|
2015-11-12 02:56:12 +01:00
|
|
|
LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
|
2015-02-19 22:19:42 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(LIBADB_SRC_FILES) \
|
2016-09-21 23:03:39 +02:00
|
|
|
adb_auth_host.cpp \
|
|
|
|
transport_mdns.cpp \
|
2015-02-19 22:19:42 +01:00
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_SRC_FILES_darwin := $(LIBADB_darwin_SRC_FILES)
|
|
|
|
LOCAL_SRC_FILES_linux := $(LIBADB_linux_SRC_FILES)
|
|
|
|
LOCAL_SRC_FILES_windows := $(LIBADB_windows_SRC_FILES)
|
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_host_sanitize)
|
2015-04-20 17:09:20 +02:00
|
|
|
|
2015-02-19 22:19:42 +01:00
|
|
|
# Even though we're building a static library (and thus there's no link step for
|
2015-03-19 21:25:27 +01:00
|
|
|
# this to take effect), this adds the includes to our path.
|
2016-09-21 23:03:39 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := libcrypto_utils libcrypto libbase libmdnssd
|
|
|
|
LOCAL_STATIC_LIBRARIES_linux := libusb
|
2016-09-28 21:32:45 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_darwin := libusb
|
2014-11-25 08:34:35 +01:00
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_C_INCLUDES_windows := development/host/windows/usb/api/
|
2015-09-04 05:29:56 +02:00
|
|
|
LOCAL_MULTILIB := first
|
2015-02-24 23:08:03 +01:00
|
|
|
|
2014-11-25 08:34:35 +01:00
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
2015-02-21 02:24:58 +01:00
|
|
|
include $(CLEAR_VARS)
|
2015-04-19 22:17:01 +02:00
|
|
|
LOCAL_CLANG := true
|
2015-02-21 02:24:58 +01:00
|
|
|
LOCAL_MODULE := adbd_test
|
|
|
|
LOCAL_CFLAGS := -DADB_HOST=0 $(LIBADB_CFLAGS)
|
2015-08-29 00:44:27 +02:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(LIBADB_TEST_SRCS) \
|
|
|
|
$(LIBADB_TEST_linux_SRCS) \
|
2015-08-31 19:42:13 +02:00
|
|
|
shell_service.cpp \
|
2015-09-01 00:36:18 +02:00
|
|
|
shell_service_protocol.cpp \
|
|
|
|
shell_service_protocol_test.cpp \
|
2015-08-31 19:42:13 +02:00
|
|
|
shell_service_test.cpp \
|
2015-08-29 00:44:27 +02:00
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_target_sanitize)
|
2016-09-21 23:03:39 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES := libadbd libcrypto_utils libcrypto libusb libmdnssd
|
2016-02-13 03:40:29 +01:00
|
|
|
LOCAL_SHARED_LIBRARIES := liblog libbase libcutils
|
2015-02-21 02:24:58 +01:00
|
|
|
include $(BUILD_NATIVE_TEST)
|
|
|
|
|
2015-12-12 04:07:01 +01:00
|
|
|
# libdiagnose_usb
|
|
|
|
# =========================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := libdiagnose_usb
|
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
|
|
|
LOCAL_CFLAGS := $(LIBADB_CFLAGS)
|
|
|
|
LOCAL_SRC_FILES := diagnose_usb.cpp
|
|
|
|
# Even though we're building a static library (and thus there's no link step for
|
|
|
|
# this to take effect), this adds the includes to our path.
|
|
|
|
LOCAL_STATIC_LIBRARIES := libbase
|
|
|
|
include $(BUILD_HOST_STATIC_LIBRARY)
|
|
|
|
|
2015-05-25 00:36:28 +02:00
|
|
|
# adb_test
|
|
|
|
# =========================================================
|
|
|
|
|
2015-02-21 02:24:58 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := adb_test
|
2015-09-08 08:39:02 +02:00
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
2015-02-21 02:24:58 +01:00
|
|
|
LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS)
|
|
|
|
LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS)
|
2015-11-12 02:56:12 +01:00
|
|
|
LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS)
|
2015-09-01 00:36:18 +02:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(LIBADB_TEST_SRCS) \
|
2016-07-20 02:07:22 +02:00
|
|
|
adb_client.cpp \
|
|
|
|
bugreport.cpp \
|
|
|
|
bugreport_test.cpp \
|
2016-07-26 21:23:40 +02:00
|
|
|
line_printer.cpp \
|
2015-09-01 00:36:18 +02:00
|
|
|
services.cpp \
|
|
|
|
shell_service_protocol.cpp \
|
|
|
|
shell_service_protocol_test.cpp \
|
|
|
|
|
2015-09-12 01:06:59 +02:00
|
|
|
LOCAL_SRC_FILES_linux := $(LIBADB_TEST_linux_SRCS)
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_SRC_FILES_darwin := $(LIBADB_TEST_darwin_SRCS)
|
2015-09-09 02:13:04 +02:00
|
|
|
LOCAL_SRC_FILES_windows := $(LIBADB_TEST_windows_SRCS)
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_host_sanitize)
|
2015-02-21 02:24:58 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libadb \
|
2017-04-13 02:04:41 +02:00
|
|
|
libbase \
|
2016-08-06 00:47:57 +02:00
|
|
|
libcrypto_utils \
|
|
|
|
libcrypto \
|
2015-02-21 02:24:58 +01:00
|
|
|
libcutils \
|
2015-12-12 04:07:01 +01:00
|
|
|
libdiagnose_usb \
|
2016-09-21 23:03:39 +02:00
|
|
|
libmdnssd \
|
2017-05-10 17:41:33 +02:00
|
|
|
libgmock_host \
|
2015-02-21 02:24:58 +01:00
|
|
|
|
2016-09-21 23:03:39 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_linux := libusb
|
2016-09-28 21:32:45 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_darwin := libusb
|
|
|
|
|
2015-09-09 02:13:04 +02:00
|
|
|
# Set entrypoint to wmain from sysdeps_win32.cpp instead of main
|
|
|
|
LOCAL_LDFLAGS_windows := -municode
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
|
2016-09-28 21:32:45 +02:00
|
|
|
LOCAL_LDLIBS_darwin := -framework CoreFoundation -framework IOKit -lobjc
|
2017-02-23 22:16:52 +01:00
|
|
|
LOCAL_LDLIBS_windows := -lws2_32 -luserenv
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
|
2015-02-21 02:24:58 +01:00
|
|
|
|
2015-12-22 01:14:31 +01:00
|
|
|
LOCAL_MULTILIB := first
|
|
|
|
|
2015-05-25 00:36:28 +02:00
|
|
|
include $(BUILD_HOST_NATIVE_TEST)
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
# adb host tool
|
|
|
|
# =========================================================
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_LDLIBS_linux := -lrt -ldl -lpthread
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2016-09-28 21:32:45 +02:00
|
|
|
LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon -lobjc
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
# Use wmain instead of main
|
|
|
|
LOCAL_LDFLAGS_windows := -municode
|
2017-02-23 22:16:52 +01:00
|
|
|
LOCAL_LDLIBS_windows := -lws2_32 -lgdi32
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
|
|
|
|
LOCAL_REQUIRED_MODULES_windows := AdbWinApi AdbWinUsbApi
|
2015-02-21 02:28:44 +01:00
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
2015-10-28 00:03:15 +01:00
|
|
|
adb_client.cpp \
|
2016-07-20 02:07:22 +02:00
|
|
|
bugreport.cpp \
|
2015-05-09 01:13:53 +02:00
|
|
|
client/main.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
console.cpp \
|
|
|
|
commandline.cpp \
|
|
|
|
file_sync_client.cpp \
|
2015-10-28 00:03:15 +01:00
|
|
|
line_printer.cpp \
|
|
|
|
services.cpp \
|
2015-09-01 00:36:18 +02:00
|
|
|
shell_service_protocol.cpp \
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-02-25 07:38:21 +01:00
|
|
|
LOCAL_CFLAGS += \
|
2015-05-06 02:46:50 +02:00
|
|
|
$(ADB_COMMON_CFLAGS) \
|
2015-02-25 07:38:21 +01:00
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-DADB_HOST=1 \
|
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_CFLAGS_windows := \
|
|
|
|
$(ADB_COMMON_windows_CFLAGS)
|
|
|
|
|
2015-11-12 02:56:12 +01:00
|
|
|
LOCAL_CFLAGS_linux := \
|
|
|
|
$(ADB_COMMON_linux_CFLAGS) \
|
|
|
|
|
|
|
|
LOCAL_CFLAGS_darwin := \
|
|
|
|
$(ADB_COMMON_darwin_CFLAGS) \
|
|
|
|
-Wno-sizeof-pointer-memaccess -Wno-unused-parameter \
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_MODULE := adb
|
2012-09-26 18:58:07 +02:00
|
|
|
LOCAL_MODULE_TAGS := debug
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_MODULE_HOST_OS := darwin linux windows
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_host_sanitize)
|
2014-11-25 08:34:35 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
|
|
libadb \
|
2015-04-17 19:59:34 +02:00
|
|
|
libbase \
|
2016-08-06 00:47:57 +02:00
|
|
|
libcrypto_utils \
|
|
|
|
libcrypto \
|
2015-12-12 04:07:01 +01:00
|
|
|
libdiagnose_usb \
|
2016-09-21 23:03:39 +02:00
|
|
|
liblog \
|
2017-05-10 17:41:33 +02:00
|
|
|
libmdnssd \
|
2014-11-25 08:34:35 +01:00
|
|
|
|
2015-11-14 02:55:45 +01:00
|
|
|
# Don't use libcutils on Windows.
|
|
|
|
LOCAL_STATIC_LIBRARIES_darwin := libcutils
|
2016-09-21 23:03:39 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_linux := libcutils
|
2015-11-14 02:55:45 +01:00
|
|
|
|
2016-09-28 21:32:45 +02:00
|
|
|
LOCAL_STATIC_LIBRARIES_darwin += libusb
|
|
|
|
LOCAL_STATIC_LIBRARIES_linux += libusb
|
|
|
|
|
2015-08-13 23:43:34 +02:00
|
|
|
LOCAL_CXX_STL := libc++_static
|
2015-04-17 01:21:44 +02:00
|
|
|
|
|
|
|
# Don't add anything here, we don't want additional shared dependencies
|
|
|
|
# on the host adb tool, and shared libraries that link against libc++
|
|
|
|
# will violate ODR
|
|
|
|
LOCAL_SHARED_LIBRARIES :=
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
include $(BUILD_HOST_EXECUTABLE)
|
|
|
|
|
2016-03-01 04:27:06 +01:00
|
|
|
$(call dist-for-goals,dist_files sdk win_sdk,$(LOCAL_BUILT_MODULE))
|
|
|
|
ifdef HOST_CROSS_OS
|
|
|
|
# Archive adb.exe for win_sdk build.
|
|
|
|
$(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_adb.BUILT))
|
|
|
|
endif
|
2009-03-04 04:32:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
# adbd device daemon
|
|
|
|
# =========================================================
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2015-04-19 22:17:01 +02:00
|
|
|
LOCAL_CLANG := true
|
2015-02-21 02:28:44 +01:00
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_SRC_FILES := \
|
2015-05-09 01:13:53 +02:00
|
|
|
daemon/main.cpp \
|
2016-05-07 01:19:13 +02:00
|
|
|
daemon/mdns.cpp \
|
2015-02-26 02:51:28 +01:00
|
|
|
services.cpp \
|
|
|
|
file_sync_service.cpp \
|
|
|
|
framebuffer_service.cpp \
|
|
|
|
remount_service.cpp \
|
|
|
|
set_verity_enable_state_service.cpp \
|
2015-08-29 00:08:49 +02:00
|
|
|
shell_service.cpp \
|
2015-09-01 00:36:18 +02:00
|
|
|
shell_service_protocol.cpp \
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2014-09-04 04:48:48 +02:00
|
|
|
LOCAL_CFLAGS := \
|
2015-05-06 02:46:50 +02:00
|
|
|
$(ADB_COMMON_CFLAGS) \
|
2015-11-12 02:56:12 +01:00
|
|
|
$(ADB_COMMON_linux_CFLAGS) \
|
2015-02-26 02:51:28 +01:00
|
|
|
-DADB_HOST=0 \
|
|
|
|
-D_GNU_SOURCE \
|
|
|
|
-Wno-deprecated-declarations \
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2015-06-18 00:23:42 +02:00
|
|
|
LOCAL_CFLAGS += -DALLOW_ADBD_NO_AUTH=$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)),1,0)
|
2012-01-19 22:11:35 +01:00
|
|
|
|
2015-03-16 22:58:32 +01:00
|
|
|
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
|
2014-10-09 16:22:49 +02:00
|
|
|
LOCAL_CFLAGS += -DALLOW_ADBD_DISABLE_VERITY=1
|
2015-06-18 00:23:42 +02:00
|
|
|
LOCAL_CFLAGS += -DALLOW_ADBD_ROOT=1
|
2014-10-09 16:22:49 +02:00
|
|
|
endif
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
LOCAL_MODULE := adbd
|
|
|
|
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
|
|
|
|
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
|
2014-10-09 16:22:49 +02:00
|
|
|
|
2015-07-30 19:25:32 +02:00
|
|
|
LOCAL_SANITIZE := $(adb_target_sanitize)
|
2016-06-16 03:33:11 +02:00
|
|
|
LOCAL_STRIP_MODULE := keep_symbols
|
2014-11-25 08:34:35 +01:00
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
2014-11-25 20:00:56 +01:00
|
|
|
libadbd \
|
2017-04-12 22:07:06 +02:00
|
|
|
libavb_user \
|
2015-03-29 20:22:34 +02:00
|
|
|
libbase \
|
2017-03-29 21:19:40 +02:00
|
|
|
libqemu_pipe \
|
2017-01-06 03:01:01 +01:00
|
|
|
libbootloader_message \
|
2015-01-27 02:13:54 +01:00
|
|
|
libfs_mgr \
|
2015-10-20 14:24:24 +02:00
|
|
|
libfec \
|
|
|
|
libfec_rs \
|
2015-08-04 23:23:04 +02:00
|
|
|
libselinux \
|
2014-11-25 08:34:35 +01:00
|
|
|
liblog \
|
2017-01-11 23:03:11 +01:00
|
|
|
libext4_utils \
|
2015-10-20 14:24:24 +02:00
|
|
|
libsquashfs_utils \
|
2015-03-19 21:25:27 +01:00
|
|
|
libcutils \
|
|
|
|
libbase \
|
2016-08-06 00:47:57 +02:00
|
|
|
libcrypto_utils \
|
|
|
|
libcrypto \
|
2016-06-16 03:33:11 +02:00
|
|
|
libminijail \
|
2016-05-07 01:19:13 +02:00
|
|
|
libmdnssd \
|
2016-10-19 03:17:52 +02:00
|
|
|
libdebuggerd_handler \
|
2009-03-04 04:32:55 +01:00
|
|
|
|
2011-07-12 07:12:32 +02:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2017-01-12 02:37:35 +01:00
|
|
|
|
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|