1LOCAL_PATH := $(call my-dir)
2
3include $(CLEAR_VARS)
4LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti
5LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
6LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
7LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
8LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
9LOCAL_MODULE_RELATIVE_PATH := hw
10LOCAL_SRC_FILES := \
11    AGnss.cpp \
12    Gnss.cpp \
13    GnssBatching.cpp \
14    GnssGeofencing.cpp \
15    GnssMeasurement.cpp \
16    GnssNi.cpp \
17    GnssConfiguration.cpp \
18    GnssDebug.cpp \
19    AGnssRil.cpp
20
21LOCAL_SRC_FILES += \
22    location_api/LocationUtil.cpp \
23    location_api/GnssAPIClient.cpp \
24    location_api/GeofenceAPIClient.cpp \
25    location_api/BatchingAPIClient.cpp \
26    location_api/MeasurementAPIClient.cpp \
27
28LOCAL_C_INCLUDES:= \
29    $(LOCAL_PATH)/location_api
30LOCAL_HEADER_LIBRARIES := \
31    libgps.utils_headers \
32    libloc_core_headers \
33    libloc_pla_headers \
34    liblocation_api_headers
35
36LOCAL_SHARED_LIBRARIES := \
37    liblog \
38    libhidlbase \
39    libutils \
40    android.hardware.gnss@1.0 \
41
42LOCAL_SHARED_LIBRARIES += \
43    libloc_core \
44    libgps.utils \
45    libdl \
46    libloc_pla \
47    liblocation_api \
48
49LOCAL_CFLAGS += $(GNSS_CFLAGS) \
50    -Wno-error
51include $(BUILD_SHARED_LIBRARY)
52
53BUILD_GNSS_HIDL_SERVICE := true
54ifneq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET), true)
55ifneq ($(LW_FEATURE_SET),true)
56BUILD_GNSS_HIDL_SERVICE := false
57endif # LW_FEATURE_SET
58endif # BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET
59
60ifeq ($(BUILD_GNSS_HIDL_SERVICE), true)
61include $(CLEAR_VARS)
62LOCAL_MODULE := android.hardware.gnss@1.0-service-qti
63LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
64LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
65LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
66LOCAL_MODULE_RELATIVE_PATH := hw
67LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc
68LOCAL_SRC_FILES := \
69    service.cpp \
70
71LOCAL_C_INCLUDES:= \
72    $(LOCAL_PATH)/location_api
73LOCAL_HEADER_LIBRARIES := \
74    libgps.utils_headers \
75    libloc_core_headers \
76    libloc_pla_headers \
77    liblocation_api_headers
78
79
80LOCAL_SHARED_LIBRARIES := \
81    liblog \
82    libcutils \
83    libdl \
84    libbase \
85    libutils \
86
87LOCAL_SHARED_LIBRARIES += \
88    libhidlbase \
89    android.hardware.gnss@1.0 \
90
91LOCAL_CFLAGS += $(GNSS_CFLAGS) \
92    -Wno-error
93include $(BUILD_EXECUTABLE)
94endif # BUILD_GNSS_HIDL_SERVICE
95