Migrate gps.cutf from Android.mk to Android.bp
Bug: 112001976
Test: m gps.cutf
Change-Id: I85284fcc5e2aeb569de73dcadb2a05275276b881
diff --git a/guest/hals/Android.bp b/guest/hals/Android.bp
index af36c8d..003b3b8 100644
--- a/guest/hals/Android.bp
+++ b/guest/hals/Android.bp
@@ -14,6 +14,7 @@
// limitations under the License.
subdirs = [
+ "gps",
"health",
"hwcomposer",
"power",
diff --git a/guest/hals/gps/Android.bp b/guest/hals/gps/Android.bp
new file mode 100644
index 0000000..22c5998
--- /dev/null
+++ b/guest/hals/gps/Android.bp
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 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.
+
+// HAL module implemenation, not prelinked and stored in
+// hw/<LIGHTS_HARDWARE_MODULE_ID>.<ro.hardware>.so
+cc_library_shared {
+ name: "gps.cutf",
+ relative_install_path: "hw",
+ srcs: [
+ "gps_vsoc.cpp",
+ "gps_thread.cpp",
+ ],
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ ],
+ header_libs: ["libhardware_headers"],
+ cflags: [
+ "-Wno-missing-field-initializers",
+ "-DLOG_TAG=\"VSoCGPS\"",
+ ],
+ defaults: ["cuttlefish_guest_only"],
+}
diff --git a/guest/hals/gps/Android.mk b/guest/hals/gps/Android.mk
deleted file mode 100644
index 9443980..0000000
--- a/guest/hals/gps/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH := $(call my-dir)
-
-# HAL module implemenation, not prelinked and stored in
-# hw/<LIGHTS_HARDWARE_MODULE_ID>.<ro.hardware>.so
-include $(CLEAR_VARS)
-
-ifeq (0, $(shell test $(PLATFORM_SDK_VERSION) -ge 21; echo $$?))
-LOCAL_MODULE_RELATIVE_PATH := hw
-else
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
-endif
-LOCAL_MULTILIB := first
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SHARED_LIBRARIES := liblog libcutils
-LOCAL_SRC_FILES := gps_vsoc.cpp gps_thread.cpp
-LOCAL_MODULE := gps.cutf
-LOCAL_C_INCLUDES := device/google/cuttlefish_common
-
-LOCAL_HEADER_LIBRARIES := \
- libhardware_headers
-
-LOCAL_CFLAGS := \
- -Wall -Werror -Wno-missing-field-initializers \
- -DLOG_TAG=\"VSoCGPS\" \
- $(VSOC_VERSION_CFLAGS)
-LOCAL_VENDOR_MODULE := true
-
-include $(BUILD_SHARED_LIBRARY)
-