librmnetctl: Conversion to bp
Delete all Android.mk and convert to Android.bp.
This also introduces the header library "librmnetctl_headers"
since LOCAL_COPY_HEADERS is now deprecated.
Temporarily keep the headers copy to maintain backward compatibility.
CRs-Fixed: 2577221
Change-Id: I907d76971577e33bb1694d9fec7ed57766c6c763
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 5053e7d..0000000
--- a/Android.mk
+++ /dev/null
@@ -1 +0,0 @@
-include $(call all-subdir-makefiles)
diff --git a/rmnetctl/Android.bp b/rmnetctl/Android.bp
new file mode 100644
index 0000000..a99d91f
--- /dev/null
+++ b/rmnetctl/Android.bp
@@ -0,0 +1,29 @@
+cc_library_headers {
+ name: "librmnetctl_headers",
+ export_include_dirs: ["inc"],
+ vendor: true,
+}
+
+cc_defaults {
+ name: "librmnetctl_defaults",
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+ header_libs: ["librmnetctl_headers"],
+ vendor: true,
+}
+
+cc_library_shared {
+ name: "librmnetctl",
+ header_libs: ["qti_kernel_headers"],
+ defaults: ["librmnetctl_defaults"],
+ srcs: ["src/librmnetctl.c"],
+}
+
+cc_binary {
+ name: "rmnetcli",
+ shared_libs: ["librmnetctl"],
+ defaults: ["librmnetctl_defaults"],
+ srcs: ["cli/rmnetcli.c"],
+}
diff --git a/rmnetctl/cli/Android.mk b/rmnetctl/cli/Android.mk
deleted file mode 100644
index 258e464..0000000
--- a/rmnetctl/cli/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-TARGET_DISABLE_RMNT := false
-ifeq ($(TARGET_USES_QMAA),true)
-ifneq ($(TARGET_USES_QMAA_OVERRIDE_DATA),true)
-TARGET_DISABLE_RMNT := true
-endif
-endif
-ifneq ($(TARGET_DISABLE_RMNT),true)
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := rmnetcli.c
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../src
-LOCAL_C_INCLUDES += $(LOCAL_PATH)
-
-LOCAL_MODULE := rmnetcli
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SHARED_LIBRARIES := librmnetctl
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/bin
-
-include $(BUILD_EXECUTABLE)
-endif
diff --git a/rmnetctl/src/Android.mk b/rmnetctl/src/Android.mk
index 1d0144b..6e13b10 100644
--- a/rmnetctl/src/Android.mk
+++ b/rmnetctl/src/Android.mk
@@ -1,32 +1,9 @@
-TARGET_DISABLE_RMNT := false
-ifeq ($(TARGET_USES_QMAA),true)
-ifneq ($(TARGET_USES_QMAA_OVERRIDE_DATA_NET),true)
-TARGET_DISABLE_RMNT := true
-endif
-endif
-ifneq ($(TARGET_DISABLE_RMNT),true)
-
LOCAL_PATH := $(call my-dir)
-
include $(CLEAR_VARS)
+
+LOCAL_VENDOR_MODULE := true
+
LOCAL_COPY_HEADERS_TO := dataservices/rmnetctl
LOCAL_COPY_HEADERS := ../inc/librmnetctl.h
-LOCAL_SRC_FILES := librmnetctl.c
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc
-LOCAL_C_INCLUDES += $(LOCAL_PATH)
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
-LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
-
-LOCAL_CLANG := true
-LOCAL_MODULE := librmnetctl
-LOCAL_MODULE_TAGS := optional
-LOCAL_PRELINK_MODULE := false
-
-LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
-LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
-
-include $(BUILD_SHARED_LIBRARY)
-endif
+include $(BUILD_COPY_HEADERS)