From addb296226042268122dea73c4b3ae9bda14d4bb Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Wed, 17 May 2017 16:46:02 +0900 Subject: [PATCH] Move libandroid_net from Android.mk to Android.bp. This is the first step of making libandroid_net available to vendor code. This is a partial cherry-pick of ag/2210044 that only moves the build target (hence the Merged-In change ID). Bug: 37527489 Test: marlin builds and boots Change-Id: Id9e4d13d4e75f6f6381c675c4e9f72e9f4769d22 Merged-In: Ie3c9c3d3c8c75ade36422d1e8ee0a5fe117e9091 --- native/android/Android.bp | 21 +++++++++++++++++++++ native/android/Android.mk | 17 ----------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/native/android/Android.bp b/native/android/Android.bp index eacda938b88dd..a89db3248afd8 100644 --- a/native/android/Android.bp +++ b/native/android/Android.bp @@ -19,3 +19,24 @@ ndk_library { first_version: "9", unversioned_until: "current", } + +cc_defaults { + name: "libandroid_defaults", + cflags: [ + "-Wall", + "-Werror", + "-Wunused", + "-Wunreachable-code", + ], +} + +// Network library. +cc_library_shared { + name: "libandroid_net", + defaults: ["libandroid_defaults"], + srcs: ["net.c"], + + shared_libs: ["libnetd_client"], + + include_dirs: ["bionic/libc/dns/include"], +} diff --git a/native/android/Android.mk b/native/android/Android.mk index 6e15331e4baab..97dbf0f8a2ade 100644 --- a/native/android/Android.mk +++ b/native/android/Android.mk @@ -58,20 +58,3 @@ LOCAL_MODULE := libandroid LOCAL_CFLAGS += $(common_cflags) include $(BUILD_SHARED_LIBRARY) - -# Network library. -include $(CLEAR_VARS) -LOCAL_MODULE := libandroid_net -LOCAL_CFLAGS := $(common_cflags) -LOCAL_SRC_FILES:= \ - net.c \ - -LOCAL_SHARED_LIBRARIES := \ - libnetd_client \ - -LOCAL_C_INCLUDES += \ - frameworks/base/native/include \ - bionic/libc/dns/include \ - system/netd/include \ - -include $(BUILD_SHARED_LIBRARY)