summaryrefslogtreecommitdiffstats
path: root/adb/Android.mk
diff options
context:
space:
mode:
Diffstat (limited to 'adb/Android.mk')
-rw-r--r--adb/Android.mk43
1 files changed, 25 insertions, 18 deletions
diff --git a/adb/Android.mk b/adb/Android.mk
index 85d1730..6951904 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -5,7 +5,11 @@
LOCAL_PATH:= $(call my-dir)
-ADB_CLANG := true
+ifeq ($(HOST_OS),windows)
+ adb_host_clang := false # libc++ for mingw not ready yet.
+else
+ adb_host_clang := true
+endif
# libadb
# =========================================================
@@ -27,6 +31,11 @@ LIBADB_SRC_FILES := \
transport_local.cpp \
transport_usb.cpp \
+LIBADB_TEST_SRCS := \
+ adb_io_test.cpp \
+ adb_utils_test.cpp \
+ transport_test.cpp \
+
LIBADB_CFLAGS := \
-Wall -Werror \
-Wno-unused-parameter \
@@ -65,7 +74,7 @@ LOCAL_SHARED_LIBRARIES := libbase
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_CLANG := $(ADB_CLANG)
+LOCAL_CLANG := $(adb_host_clang)
LOCAL_MODULE := libadb
LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1
LOCAL_SRC_FILES := \
@@ -85,13 +94,8 @@ endif
include $(BUILD_HOST_STATIC_LIBRARY)
-LIBADB_TEST_SRCS := \
- adb_io_test.cpp \
- adb_utils_test.cpp \
- transport_test.cpp \
-
include $(CLEAR_VARS)
-LOCAL_CLANG := $(ADB_CLANG)
+LOCAL_CLANG := true
LOCAL_MODULE := adbd_test
LOCAL_CFLAGS := -DADB_HOST=0 $(LIBADB_CFLAGS)
LOCAL_SRC_FILES := $(LIBADB_TEST_SRCS)
@@ -100,7 +104,7 @@ LOCAL_SHARED_LIBRARIES := liblog libbase libcutils
include $(BUILD_NATIVE_TEST)
include $(CLEAR_VARS)
-LOCAL_CLANG := $(ADB_CLANG)
+LOCAL_CLANG := $(adb_host_clang)
LOCAL_MODULE := adb_test
LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS)
LOCAL_SRC_FILES := $(LIBADB_TEST_SRCS) services.cpp
@@ -135,15 +139,11 @@ ifeq ($(HOST_OS),darwin)
endif
ifeq ($(HOST_OS),windows)
+ LOCAL_LDLIBS += -lws2_32 -lgdi32
EXTRA_STATIC_LIBS := AdbWinApi
- ifneq ($(strip $(USE_MINGW)),)
- # MinGW under Linux case
- LOCAL_LDLIBS += -lws2_32 -lgdi32
- USE_SYSDEPS_WIN32 := 1
- endif
endif
-LOCAL_CLANG := $(ADB_CLANG)
+LOCAL_CLANG := $(adb_host_clang)
LOCAL_SRC_FILES := \
adb_main.cpp \
@@ -166,12 +166,19 @@ LOCAL_STATIC_LIBRARIES := \
libadb \
libbase \
libcrypto_static \
+ libcutils \
$(EXTRA_STATIC_LIBS) \
-ifeq ($(USE_SYSDEPS_WIN32),)
- LOCAL_STATIC_LIBRARIES += libcutils
+# libc++ not available on windows yet
+ifneq ($(HOST_OS),windows)
+ LOCAL_CXX_STL := libc++_static
endif
+# 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 :=
+
include $(BUILD_HOST_EXECUTABLE)
$(call dist-for-goals,dist_files sdk,$(LOCAL_BUILT_MODULE))
@@ -188,7 +195,7 @@ endif
include $(CLEAR_VARS)
-LOCAL_CLANG := $(ADB_CLANG)
+LOCAL_CLANG := true
LOCAL_SRC_FILES := \
adb_main.cpp \