summaryrefslogtreecommitdiffstats
path: root/fastboot/Android.mk
diff options
context:
space:
mode:
authorDavid Pursell <dpursell@google.com>2016-01-15 14:19:56 -0800
committerDavid Pursell <dpursell@google.com>2016-01-21 09:53:11 -0800
commit572bce29088521caf7f90c9fa66a8237a7674435 (patch)
treeae1b4764a031d77222ef6f2c92b5b33ce6068ab8 /fastboot/Android.mk
parent1906de1e0fb70dbae4a713620072113a76d0a22a (diff)
downloadcore-572bce29088521caf7f90c9fa66a8237a7674435.tar.gz
core-572bce29088521caf7f90c9fa66a8237a7674435.tar.bz2
core-572bce29088521caf7f90c9fa66a8237a7674435.zip
fastboot: use cutils socket functions.
Now that cutils has cross-platform socket functionality, we can restructure fastboot to remove platform-dependent networking code. This CL adds socket_set_receive_timeout() to libcutils and combines the fastboot socket code into a single implementation. It also adds TCP functionality to fastboot sockets, but nothing uses it yet except for the unit tests. A future CL will add the TCP protocol which will use this TCP socket implementation. Bug: http://b/26558551 Change-Id: If613fb348f9332b31fa2c88d67fb1e839923768a
Diffstat (limited to 'fastboot/Android.mk')
-rw-r--r--fastboot/Android.mk22
1 files changed, 13 insertions, 9 deletions
diff --git a/fastboot/Android.mk b/fastboot/Android.mk
index bb28afab5..fcec5b104 100644
--- a/fastboot/Android.mk
+++ b/fastboot/Android.mk
@@ -24,7 +24,15 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../extras/ext4_utils \
$(LOCAL_PATH)/../../extras/f2fs_utils \
-LOCAL_SRC_FILES := protocol.cpp engine.cpp bootimg_utils.cpp fastboot.cpp util.cpp fs.cpp
+LOCAL_SRC_FILES := \
+ bootimg_utils.cpp \
+ engine.cpp \
+ fastboot.cpp \
+ fs.cpp\
+ protocol.cpp \
+ socket.cpp \
+ util.cpp \
+
LOCAL_MODULE := fastboot
LOCAL_MODULE_TAGS := debug
LOCAL_MODULE_HOST_OS := darwin linux windows
@@ -33,15 +41,15 @@ LOCAL_CFLAGS += -Wall -Wextra -Werror -Wunreachable-code
LOCAL_CFLAGS += -DFASTBOOT_REVISION='"$(fastboot_version)"'
-LOCAL_SRC_FILES_linux := socket_unix.cpp usb_linux.cpp util_linux.cpp
+LOCAL_SRC_FILES_linux := usb_linux.cpp util_linux.cpp
LOCAL_STATIC_LIBRARIES_linux := libselinux
-LOCAL_SRC_FILES_darwin := socket_unix.cpp usb_osx.cpp util_osx.cpp
+LOCAL_SRC_FILES_darwin := usb_osx.cpp util_osx.cpp
LOCAL_STATIC_LIBRARIES_darwin := libselinux
LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
LOCAL_CFLAGS_darwin := -Wno-unused-parameter
-LOCAL_SRC_FILES_windows := socket_windows.cpp usb_windows.cpp util_windows.cpp
+LOCAL_SRC_FILES_windows := usb_windows.cpp util_windows.cpp
LOCAL_STATIC_LIBRARIES_windows := AdbWinApi
LOCAL_REQUIRED_MODULES_windows := AdbWinApi
LOCAL_LDLIBS_windows := -lws2_32
@@ -98,18 +106,14 @@ include $(CLEAR_VARS)
LOCAL_MODULE := fastboot_test
LOCAL_MODULE_HOST_OS := darwin linux windows
-LOCAL_SRC_FILES := socket_test.cpp
+LOCAL_SRC_FILES := socket.cpp socket_test.cpp
LOCAL_STATIC_LIBRARIES := libbase libcutils
LOCAL_CFLAGS += -Wall -Wextra -Werror -Wunreachable-code
-LOCAL_SRC_FILES_linux := socket_unix.cpp
-
-LOCAL_SRC_FILES_darwin := socket_unix.cpp
LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
LOCAL_CFLAGS_darwin := -Wno-unused-parameter
-LOCAL_SRC_FILES_windows := socket_windows.cpp
LOCAL_LDLIBS_windows := -lws2_32
include $(BUILD_HOST_NATIVE_TEST)