summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-24 19:44:33 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-24 19:44:34 +0000
commita75b4935a4b667f0d37372db7559ecc6f8ee0b0d (patch)
tree07084e1e3c4e62271d2e123725154768dc503510
parent9f3540d017f881768ec3a317d3149edd6a50fab9 (diff)
parent3c43858986ff9b6804fb52029b9d12461f49fcae (diff)
downloadsystem_core-a75b4935a4b667f0d37372db7559ecc6f8ee0b0d.zip
system_core-a75b4935a4b667f0d37372db7559ecc6f8ee0b0d.tar.gz
system_core-a75b4935a4b667f0d37372db7559ecc6f8ee0b0d.tar.bz2
Merge "Move more into libadb and libadbd."
-rw-r--r--adb/Android.mk29
1 files changed, 6 insertions, 23 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index e5bc539..fb7a3f3 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -20,6 +20,7 @@ LIBADB_SRC_FILES := \
adb_listeners.c \
sockets.c \
transport.c \
+ transport_local.c \
transport_usb.c \
LIBADB_CFLAGS := \
@@ -27,16 +28,17 @@ LIBADB_CFLAGS := \
-D_XOPEN_SOURCE -D_GNU_SOURCE \
-fvisibility=hidden \
-LIBADB_LINUX_SRC_FILES := fdevent.cpp
-LIBADB_WINDOWS_SRC_FILES := sysdeps_win32.c
+LIBADB_darwin_SRC_FILES := get_my_path_darwin.c usb_osx.c
+LIBADB_linux_SRC_FILES := fdevent.cpp get_my_path_linux.c usb_linux.c
+LIBADB_windows_SRC_FILES := get_my_path_windows.c sysdeps_win32.c usb_windows.c
include $(CLEAR_VARS)
LOCAL_MODULE := libadbd
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
LOCAL_SRC_FILES := \
$(LIBADB_SRC_FILES) \
- $(LIBADB_LINUX_SRC_FILES) \
adb_auth_client.c \
+ fdevent.cpp \
jdwp_service.c \
qemu_tracing.c \
usb_linux_client.c \
@@ -48,44 +50,30 @@ LOCAL_MODULE := libadb
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
LOCAL_SRC_FILES := \
$(LIBADB_SRC_FILES) \
+ $(LIBADB_$(HOST_OS)_SRC_FILES) \
adb_auth_host.c \
# Even though we're building a static library (and thus there's no link step for
# this to take effect), this adds the SSL includes to our path.
LOCAL_STATIC_LIBRARIES := libcrypto_static
-ifeq ($(HOST_OS),windows)
- LOCAL_SRC_FILES += $(LIBADB_WINDOWS_SRC_FILES)
-else
- LOCAL_SRC_FILES += $(LIBADB_LINUX_SRC_FILES)
-endif
include $(BUILD_HOST_STATIC_LIBRARY)
# adb host tool
# =========================================================
include $(CLEAR_VARS)
-# Default to a virtual (sockets) usb interface
-USB_SRCS :=
-EXTRA_SRCS :=
-
ifeq ($(HOST_OS),linux)
- USB_SRCS := usb_linux.c
- EXTRA_SRCS := get_my_path_linux.c
LOCAL_LDLIBS += -lrt -ldl -lpthread
LOCAL_CFLAGS += -DWORKAROUND_BUG6558362
endif
ifeq ($(HOST_OS),darwin)
- USB_SRCS := usb_osx.c
- EXTRA_SRCS := get_my_path_darwin.c
LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
LOCAL_CFLAGS += -Wno-sizeof-pointer-memaccess -Wno-unused-parameter
endif
ifeq ($(HOST_OS),windows)
- USB_SRCS := usb_windows.c
- EXTRA_SRCS := get_my_path_windows.c
EXTRA_STATIC_LIBS := AdbWinApi
ifneq ($(strip $(USE_MINGW)),)
# MinGW under Linux case
@@ -98,13 +86,10 @@ endif
LOCAL_SRC_FILES := \
adb_main.c \
console.c \
- transport_local.c \
commandline.c \
adb_client.c \
services.c \
file_sync_client.c \
- $(EXTRA_SRCS) \
- $(USB_SRCS) \
ifneq ($(USE_SYSDEPS_WIN32),)
LOCAL_SRC_FILES += sysdeps_win32.c
@@ -144,13 +129,11 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
adb_main.c \
- transport_local.c \
services.c \
file_sync_service.c \
framebuffer_service.c \
remount_service.c \
set_verity_enable_state_service.c \
- usb_linux_client.c
LOCAL_CFLAGS := \
-O2 \