diff options
author | David Pursell <dpursell@google.com> | 2016-01-14 17:18:27 -0800 |
---|---|---|
committer | David Pursell <dpursell@google.com> | 2016-01-15 15:57:35 -0800 |
commit | 0eb8e1b706b577194bab1e23fab5b7d20d5259f1 (patch) | |
tree | 13640449bbfe882904ab3342bcf43b1a02e70cc9 /libcutils/Android.mk | |
parent | 047597b3fc345ee657ff1f00ad87521cf4ae455f (diff) | |
download | core-0eb8e1b706b577194bab1e23fab5b7d20d5259f1.tar.gz core-0eb8e1b706b577194bab1e23fab5b7d20d5259f1.tar.bz2 core-0eb8e1b706b577194bab1e23fab5b7d20d5259f1.zip |
libcutils: share Windows networking code.
This CL moves Windows networking code from fastboot to libcutils so
that it can be shared with other host programs such as adb.
Not all libcutils networking functions have been implemented for
Windows, just those necessary for fastboot. In the next CL I will do
the same for adb, adding any additional required functions.
Unit tests have also been added to test the functions using a loopback
connection.
Bug: http://b/26236380.
Change-Id: Ibc51a67030fe69a04c23512eefa9d19b055c7c12
Diffstat (limited to 'libcutils/Android.mk')
-rw-r--r-- | libcutils/Android.mk | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk index dd0810861..25b056b41 100644 --- a/libcutils/Android.mk +++ b/libcutils/Android.mk @@ -39,26 +39,33 @@ libcutils_common_sources := \ libcutils_nonwindows_sources := \ fs.c \ multiuser.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 \ - sockets.c \ + socket_inaddr_any_server_unix.c \ + socket_local_client_unix.c \ + socket_local_server_unix.c \ + socket_loopback_client_unix.c \ + socket_loopback_server_unix.c \ + socket_network_client_unix.c \ + sockets_unix.c \ str_parms.c \ libcutils_nonwindows_host_sources := \ ashmem-host.c \ - trace-host.c + trace-host.c \ +libcutils_windows_host_sources := \ + socket_inaddr_any_server_windows.c \ + socket_network_client_windows.c \ + sockets_windows.c \ # Shared and static library for host +# Note: when linking this library on Windows, you must also link to Winsock2 +# using "LOCAL_LDLIBS_windows := -lws2_32". # ======================================================== LOCAL_MODULE := libcutils LOCAL_SRC_FILES := $(libcutils_common_sources) dlmalloc_stubs.c LOCAL_SRC_FILES_darwin := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) LOCAL_SRC_FILES_linux := $(libcutils_nonwindows_sources) $(libcutils_nonwindows_host_sources) +LOCAL_SRC_FILES_windows := $(libcutils_windows_host_sources) LOCAL_STATIC_LIBRARIES := liblog LOCAL_CFLAGS := -Werror -Wall -Wextra LOCAL_MULTILIB := both |