summaryrefslogtreecommitdiff
path: root/multinetwork
diff options
context:
space:
mode:
Diffstat (limited to 'multinetwork')
-rw-r--r--multinetwork/Android.bp46
-rw-r--r--multinetwork/Android.mk29
-rwxr-xr-xmultinetwork/quick_test.sh4
3 files changed, 48 insertions, 31 deletions
diff --git a/multinetwork/Android.bp b/multinetwork/Android.bp
new file mode 100644
index 00000000..e2b4be0e
--- /dev/null
+++ b/multinetwork/Android.bp
@@ -0,0 +1,46 @@
+cc_defaults {
+ name: "multinetwork_defaults",
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ include_dirs: [
+ "frameworks/native/include",
+ ],
+
+ srcs: [
+ "common.cpp",
+ ],
+
+ shared_libs: [
+ "libandroid",
+ "libbase",
+ ],
+
+ product_variables: {
+ // The PDK build does not have access to frameworks/native elements.
+ pdk: {
+ enabled: false,
+ },
+ },
+}
+
+// Sample util binaries.
+cc_binary {
+ name: "dnschk",
+ defaults: ["multinetwork_defaults"],
+
+ srcs: [
+ "dnschk.cpp",
+ ],
+}
+
+cc_binary {
+ name: "httpurl",
+ defaults: ["multinetwork_defaults"],
+
+ srcs: [
+ "httpurl.cpp",
+ ],
+}
diff --git a/multinetwork/Android.mk b/multinetwork/Android.mk
deleted file mode 100644
index db046871..00000000
--- a/multinetwork/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-# The PDK build does not have access to frameworks/native elements.
-ifneq ($(TARGET_BUILD_PDK), true)
-
-# Sample util binaries.
-include $(CLEAR_VARS)
-LOCAL_MODULE := dnschk
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += frameworks/native/include external/libcxx/include
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_SHARED_LIBRARIES := libandroid libbase libc++
-LOCAL_SRC_FILES := dnschk.cpp common.cpp
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := httpurl
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES += frameworks/native/include external/libcxx/include
-LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
-LOCAL_MODULE_TAGS := debug
-LOCAL_SHARED_LIBRARIES := libandroid libbase libc++
-LOCAL_SRC_FILES := httpurl.cpp common.cpp
-include $(BUILD_EXECUTABLE)
-
-endif # ifneq ($(TARGET_BUILD_PDK), true)
diff --git a/multinetwork/quick_test.sh b/multinetwork/quick_test.sh
index f586bae8..acc52396 100755
--- a/multinetwork/quick_test.sh
+++ b/multinetwork/quick_test.sh
@@ -35,7 +35,7 @@ echo "$PREFIX Using nethandle $nethandle ($(toHex $nethandle))"
echo ""
readonly IPADDRESSES=$(
- adb shell /system/xbin/dnschk --nethandle $nethandle $TEST_HOST |
+ adb shell /system/bin/dnschk --nethandle $nethandle $TEST_HOST |
sed -e 's/#.*//' -e '/^$/d')
@@ -43,6 +43,6 @@ for host in $TEST_HOST $IPADDRESSES; do
urls=$(getUrls $host)
for url in $urls; do
echo "$PREFIX Checking $url" >&2
- adb shell /system/xbin/httpurl --nethandle $nethandle "$url"
+ adb shell /system/bin/httpurl --nethandle $nethandle "$url"
done
done