sm7325-common: gps/location: Convert remaining Android.mk to bp

Change-Id: I75e6af92795fe755a48557aa06106406b14c6750
This commit is contained in:
Michael Bestas 2024-12-01 22:30:22 +02:00
parent cf9fc36347
commit 167ee81c54
No known key found for this signature in database
GPG Key ID: CC95044519BE6669
10 changed files with 122 additions and 205 deletions

View File

@ -106,7 +106,6 @@ TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs
# GPS
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
LOC_HIDL_VERSION := 4.2
# HIDL
DEVICE_FRAMEWORK_MANIFEST_FILE += $(COMMON_PATH)/framework_manifest.xml

View File

@ -1,39 +0,0 @@
ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
# Set required flags
GNSS_CFLAGS := \
-Werror \
-Wno-error=unused-parameter \
-Wno-error=macro-redefined \
-Wno-error=reorder \
-Wno-error=missing-braces \
-Wno-error=self-assign \
-Wno-error=enum-conversion \
-Wno-error=logical-op-parentheses \
-Wno-error=null-arithmetic \
-Wno-error=null-conversion \
-Wno-error=parentheses-equality \
-Wno-error=undefined-bool-conversion \
-Wno-error=tautological-compare \
-Wno-error=switch \
-Wno-error=date-time
GNSS_HIDL_VERSION = 2.1
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8937
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8953
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8998
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += apq8098_latv
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm710
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += qcs605
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm845
GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm660
ifneq (,$(filter $(GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST),$(TARGET_BOARD_PLATFORM)))
GNSS_HIDL_LEGACY_MEASURMENTS = true
endif
LOCAL_PATH := $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)

View File

@ -0,0 +1,96 @@
cc_library_shared {
name: "android.hardware.gnss@2.1-impl-qti",
vendor: true,
relative_install_path: "hw",
srcs: [
"AGnss.cpp",
"Gnss.cpp",
"AGnssRil.cpp",
"GnssMeasurement.cpp",
"GnssConfiguration.cpp",
"GnssBatching.cpp",
"GnssGeofencing.cpp",
"GnssNi.cpp",
"GnssDebug.cpp",
"GnssAntennaInfo.cpp",
"MeasurementCorrections.cpp",
"GnssVisibilityControl.cpp",
] + [
"location_api/GnssAPIClient.cpp",
"location_api/MeasurementAPIClient.cpp",
"location_api/GeofenceAPIClient.cpp",
"location_api/BatchingAPIClient.cpp",
"location_api/LocationUtil.cpp",
],
local_include_dirs: ["location_api"],
header_libs: [
"libgps.utils_headers",
"libloc_core_headers",
"libloc_pla_headers",
"liblocation_api_headers",
"liblocbatterylistener_headers",
],
shared_libs: [
"liblog",
"libhidlbase",
"libcutils",
"libutils",
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@2.0",
"android.hardware.gnss@2.1",
"android.hardware.gnss.measurement_corrections@1.0",
"android.hardware.gnss.measurement_corrections@1.1",
"android.hardware.gnss.visibility_control@1.0",
"android.hardware.health@1.0",
"android.hardware.health@2.0",
"android.hardware.health@2.1",
"android.hardware.power@1.2",
"libbase",
] + [
"libloc_core",
"libgps.utils",
"libdl",
"liblocation_api",
],
cflags: GNSS_CFLAGS,
static_libs: ["liblocbatterylistener"] + ["libhealthhalutils"],
}
cc_binary {
name: "android.hardware.gnss@2.1-service-qti",
vintf_fragments: ["android.hardware.gnss@2.1-service-qti.xml"],
vendor: true,
relative_install_path: "hw",
init_rc: ["android.hardware.gnss@2.1-service-qti.rc"],
srcs: ["service.cpp"],
header_libs: [
"libgps.utils_headers",
"libloc_core_headers",
"libloc_pla_headers",
"liblocation_api_headers",
],
shared_libs: [
"liblog",
"libcutils",
"libdl",
"libbase",
"libutils",
"libgps.utils",
"libqti_vndfwk_detect",
] + [
"libhidlbase",
"android.hardware.gnss@1.0",
"android.hardware.gnss@1.1",
"android.hardware.gnss@2.0",
"android.hardware.gnss@2.1",
],
cflags: GNSS_CFLAGS + ["-DLOC_HIDL_VERSION=\"4.2\""],
}

View File

@ -1,111 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.gnss@2.1-impl-qti
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := \
AGnss.cpp \
Gnss.cpp \
AGnssRil.cpp \
GnssMeasurement.cpp \
GnssConfiguration.cpp \
GnssBatching.cpp \
GnssGeofencing.cpp \
GnssNi.cpp \
GnssDebug.cpp \
GnssAntennaInfo.cpp \
MeasurementCorrections.cpp \
GnssVisibilityControl.cpp
LOCAL_SRC_FILES += \
location_api/GnssAPIClient.cpp \
location_api/MeasurementAPIClient.cpp \
location_api/GeofenceAPIClient.cpp \
location_api/BatchingAPIClient.cpp \
location_api/LocationUtil.cpp \
ifeq ($(GNSS_HIDL_LEGACY_MEASURMENTS),true)
LOCAL_CFLAGS += \
-DGNSS_HIDL_LEGACY_MEASURMENTS
endif
LOCAL_C_INCLUDES:= \
$(LOCAL_PATH)/location_api
LOCAL_HEADER_LIBRARIES := \
libgps.utils_headers \
libloc_core_headers \
libloc_pla_headers \
liblocation_api_headers \
liblocbatterylistener_headers
LOCAL_SHARED_LIBRARIES := \
liblog \
libhidlbase \
libcutils \
libutils \
android.hardware.gnss@1.0 \
android.hardware.gnss@1.1 \
android.hardware.gnss@2.0 \
android.hardware.gnss@2.1 \
android.hardware.gnss.measurement_corrections@1.0 \
android.hardware.gnss.measurement_corrections@1.1 \
android.hardware.gnss.visibility_control@1.0 \
android.hardware.health@1.0 \
android.hardware.health@2.0 \
android.hardware.health@2.1 \
android.hardware.power@1.2 \
libbase
LOCAL_SHARED_LIBRARIES += \
libloc_core \
libgps.utils \
libdl \
liblocation_api \
LOCAL_CFLAGS += $(GNSS_CFLAGS)
LOCAL_STATIC_LIBRARIES := liblocbatterylistener
LOCAL_STATIC_LIBRARIES += libhealthhalutils
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.gnss@2.1-service-qti
LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@2.1-service-qti.xml
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_INIT_RC := android.hardware.gnss@2.1-service-qti.rc
LOCAL_SRC_FILES := \
service.cpp \
LOCAL_HEADER_LIBRARIES := \
libgps.utils_headers \
libloc_core_headers \
libloc_pla_headers \
liblocation_api_headers
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libdl \
libbase \
libutils \
libgps.utils \
libqti_vndfwk_detect \
LOCAL_SHARED_LIBRARIES += \
libhidlbase \
android.hardware.gnss@1.0 \
android.hardware.gnss@1.1 \
android.hardware.gnss@2.0 \
android.hardware.gnss@2.1 \
LOCAL_CFLAGS += $(GNSS_CFLAGS)
ifneq ($(LOC_HIDL_VERSION),)
LOCAL_CFLAGS += -DLOC_HIDL_VERSION='"$(LOC_HIDL_VERSION)"'
endif
include $(BUILD_EXECUTABLE)

View File

@ -1,2 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(call all-subdir-makefiles)

View File

@ -33,5 +33,6 @@ cc_library_static {
cc_library_headers {
name: "liblocbatterylistener_headers",
vendor: true,
export_include_dirs: ["."],
}

View File

@ -1,6 +0,0 @@
LOCAL_PATH := $(call my-dir)
GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address
include $(call all-makefiles-under,$(LOCAL_PATH))

View File

@ -1,4 +0,0 @@
ifneq ($(QCPATH),)
LOCAL_PATH := $(call my-dir)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif #QCPATH

View File

@ -0,0 +1,25 @@
cc_library_shared {
name: "libloc_socket",
vendor: true,
shared_libs: [
"libutils",
"libcutils",
"liblog",
"libgps.utils",
],
srcs: ["LocSocket.cpp"],
cflags: [
"-fno-short-enums",
"-D_ANDROID_",
] + GNSS_CFLAGS,
header_libs: [
"libloc_core_headers",
"libgps.utils_headers",
"libloc_pla_headers",
"liblocation_api_headers",
],
}

View File

@ -1,42 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libloc_socket
# activate the following line for debug purposes only, comment out for production
#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
LOCAL_MODULE_TAGS := optional
LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
liblog \
libgps.utils
LOCAL_SRC_FILES := \
LocSocket.cpp
LOCAL_CFLAGS := \
-fno-short-enums \
-D_ANDROID_
## Includes
LOCAL_C_INCLUDES := \
$(TARGET_OUT_HEADERS)/qmi-framework/inc \
$(TARGET_OUT_HEADERS)/qmi/inc
LOCAL_HEADER_LIBRARIES := \
libloc_core_headers \
libgps.utils_headers \
libloc_pla_headers \
liblocation_api_headers
LOCAL_CFLAGS += $(GNSS_CFLAGS)
ifeq ($(TARGET_KERNEL_VERSION),$(filter $(TARGET_KERNEL_VERSION),3.18 4.4 4.9))
LOCAL_CFLAGS += -DUSE_QSOCKET
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/qsocket/inc
LOCAL_SHARED_LIBRARIES += libqsocket
endif
include $(BUILD_SHARED_LIBRARY)