summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-11-25 11:00:56 -0800
committerDan Albert <danalbert@google.com>2015-02-18 10:55:28 -0800
commit9449376328daa7c726ec693637fcdf1d3985640a (patch)
tree065431164dd7eb92e240e481380c12d1d53c8712 /adb
parent1ac334ec660292298917668a40fc5239b1fdaa56 (diff)
downloadsystem_core-9449376328daa7c726ec693637fcdf1d3985640a.zip
system_core-9449376328daa7c726ec693637fcdf1d3985640a.tar.gz
system_core-9449376328daa7c726ec693637fcdf1d3985640a.tar.bz2
Move USB transport code to libadb.
Also note that we need both a libadb and a libadbd (for now) to differentiate between code using ADB_HOST=1 and ADB_HOST=0. Bug: 17626262 Change-Id: I873a8fb442a8a69258fe39af17781714a8fae4f6
Diffstat (limited to 'adb')
-rw-r--r--adb/Android.mk25
1 files changed, 15 insertions, 10 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index 415952d..ba20bbe 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -14,13 +14,22 @@ LOCAL_PATH:= $(call my-dir)
# 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
-LIBADB_SRC_FILES :=
+LIBADB_SRC_FILES := transport.c transport_usb.c
LIBADB_C_FLAGS := -Wall -Werror -D_XOPEN_SOURCE -D_GNU_SOURCE
+LIBADB_LINUX_SRC_FILES := fdevent.cpp
+LIBADB_WINDOWS_SRC_FILES := sysdeps_win32.c
+
include $(CLEAR_VARS)
-LOCAL_MODULE := libadb
+LOCAL_MODULE := libadbd
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=0
-LOCAL_SRC_FILES := $(LIBADB_SRC_FILES) fdevent.cpp
+LOCAL_SRC_FILES := $(LIBADB_SRC_FILES) $(LIBADB_LINUX_SRC_FILES) usb_linux_client.c
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libadb
+LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
+LOCAL_SRC_FILES := $(LIBADB_SRC_FILES) $(LIBADB_LINUX_SRC_FILES)
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
@@ -28,9 +37,9 @@ LOCAL_MODULE := libadb
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
LOCAL_SRC_FILES := $(LIBADB_SRC_FILES)
ifeq ($(HOST_OS),windows)
- LOCAL_SRC_FILES += sysdeps_win32.c
+ LOCAL_SRC_FILES += $(LIBADB_WINDOWS_SRC_FILES)
else
- LOCAL_SRC_FILES += fdevent.cpp
+ LOCAL_SRC_FILES += $(LIBADB_LINUX_SRC_FILES)
endif
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -71,9 +80,7 @@ endif
LOCAL_SRC_FILES := \
adb.c \
console.c \
- transport.c \
transport_local.c \
- transport_usb.c \
commandline.c \
adb_client.c \
adb_auth_host.c \
@@ -121,9 +128,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
adb.c \
- transport.c \
transport_local.c \
- transport_usb.c \
adb_auth_client.c \
sockets.c \
services.c \
@@ -158,7 +163,7 @@ LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
LOCAL_C_INCLUDES += system/extras/ext4_utils system/core/fs_mgr/include
LOCAL_STATIC_LIBRARIES := \
- libadb \
+ libadbd \
libfs_mgr \
liblog \
libcutils \