Convert libreference-ril to soong am: a9eddd1948

Original change: https://android-review.googlesource.com/c/platform/hardware/ril/+/3283401

Change-Id: I8bf09b37e68b06fb5fff37b86b75e94c95242d48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/reference-ril/Android.bp b/reference-ril/Android.bp
new file mode 100644
index 0000000..9abd997
--- /dev/null
+++ b/reference-ril/Android.bp
@@ -0,0 +1,59 @@
+// Copyright (C) 2006 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+    // See: http://go/android-license-faq
+    default_applicable_licenses: [
+        "hardware_ril_reference-ril_license",
+    ],
+}
+
+license {
+    name: "hardware_ril_reference-ril_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+    ],
+    license_text: [
+        "NOTICE",
+    ],
+}
+
+cc_library_shared {
+    name: "libreference-ril",
+    srcs: [
+        "reference-ril.c",
+        "atchannel.c",
+        "misc.c",
+        "at_tok.c",
+    ],
+    shared_libs: [
+        "liblog",
+        "libcutils",
+        "libutils",
+        "libril",
+        "librilutils",
+    ],
+    static_libs: ["libbase"],
+    cflags: [
+        "-D_GNU_SOURCE", // for asprinf
+        "-Wall",
+        "-Wextra",
+        "-Wno-unused-variable",
+        "-Wno-unused-function",
+        "-Werror",
+        "-DRIL_SHLIB",
+    ],
+    vendor: true,
+}
diff --git a/reference-ril/Android.mk b/reference-ril/Android.mk
deleted file mode 100644
index 8aeba23..0000000
--- a/reference-ril/Android.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2006 The Android Open Source Project
-
-# XXX using libutils for simulator build only...
-#
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES:= \
-    reference-ril.c \
-    atchannel.c \
-    misc.c \
-    at_tok.c
-
-LOCAL_SHARED_LIBRARIES := \
-    liblog libcutils libutils libril librilutils
-
-LOCAL_STATIC_LIBRARIES := libbase
-
-# for asprinf
-LOCAL_CFLAGS := -D_GNU_SOURCE
-LOCAL_CFLAGS += -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Werror
-
-LOCAL_C_INCLUDES :=
-
-ifeq ($(TARGET_DEVICE),sooner)
-  LOCAL_CFLAGS += -DUSE_TI_COMMANDS
-endif
-
-ifeq ($(TARGET_DEVICE),surf)
-  LOCAL_CFLAGS += -DPOLL_CALL_STATE -DUSE_QMI
-endif
-
-ifeq ($(TARGET_DEVICE),dream)
-  LOCAL_CFLAGS += -DPOLL_CALL_STATE -DUSE_QMI
-endif
-
-LOCAL_VENDOR_MODULE:= true
-
-ifeq (foo,foo)
-  #build shared library
-  LOCAL_SHARED_LIBRARIES += \
-      libcutils libutils
-  LOCAL_CFLAGS += -DRIL_SHLIB
-  LOCAL_MODULE:= libreference-ril
-  LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0
-  LOCAL_LICENSE_CONDITIONS:= notice
-  LOCAL_NOTICE_FILE:= $(LOCAL_PATH)/NOTICE
-  include $(BUILD_SHARED_LIBRARY)
-else
-  #build executable
-  LOCAL_SHARED_LIBRARIES += \
-      libril
-  LOCAL_MODULE:= reference-ril
-  LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0
-  LOCAL_LICENSE_CONDITIONS:= notice
-  LOCAL_NOTICE_FILE:= $(LOCAL_PATH)/NOTICE
-  include $(BUILD_EXECUTABLE)
-endif