1ifeq ($(GNSS_HIDL_VERSION),1.0)
2
3LOCAL_PATH := $(call my-dir)
4
5include $(CLEAR_VARS)
6LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti
7LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
8LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
9LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
10LOCAL_SANITIZE += $(GNSS_SANITIZE)
11
12# activate the following line for debug purposes only, comment out for production
13#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
14LOCAL_VENDOR_MODULE := true
15LOCAL_MODULE_RELATIVE_PATH := hw
16LOCAL_SRC_FILES := \
17    AGnss.cpp \
18    Gnss.cpp \
19    GnssBatching.cpp \
20    GnssGeofencing.cpp \
21    GnssMeasurement.cpp \
22    GnssNi.cpp \
23    GnssConfiguration.cpp \
24    GnssDebug.cpp \
25    AGnssRil.cpp
26
27LOCAL_SRC_FILES += \
28    location_api/LocationUtil.cpp \
29    location_api/GnssAPIClient.cpp \
30    location_api/GeofenceAPIClient.cpp \
31    location_api/BatchingAPIClient.cpp \
32    location_api/MeasurementAPIClient.cpp \
33
34LOCAL_C_INCLUDES:= \
35    $(LOCAL_PATH)/location_api
36LOCAL_HEADER_LIBRARIES := \
37    libgps.utils_headers \
38    libloc_core_headers \
39    libloc_pla_headers \
40    liblocation_api_headers \
41    liblocbatterylistener_headers
42
43LOCAL_SHARED_LIBRARIES := \
44    liblog \
45    libhidlbase \
46    libcutils \
47    libutils \
48    android.hardware.gnss@1.0 \
49    android.hardware.health@1.0 \
50    android.hardware.health@2.0 \
51    android.hardware.power@1.2 \
52    libbase
53
54LOCAL_SHARED_LIBRARIES += \
55    libloc_core \
56    libgps.utils \
57    libdl \
58    liblocation_api \
59
60LOCAL_CFLAGS += $(GNSS_CFLAGS)
61LOCAL_STATIC_LIBRARIES := liblocbatterylistener
62LOCAL_STATIC_LIBRARIES += libhealthhalutils
63include $(BUILD_SHARED_LIBRARY)
64
65include $(CLEAR_VARS)
66LOCAL_MODULE := android.hardware.gnss@1.0-service-qti
67LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD legacy_not_a_contribution
68LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
69LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../LICENSE
70LOCAL_SANITIZE += $(GNSS_SANITIZE)
71
72# activate the following line for debug purposes only, comment out for production
73#LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
74LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@1.0-service-qti.xml
75LOCAL_VENDOR_MODULE := true
76LOCAL_MODULE_RELATIVE_PATH := hw
77LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc
78LOCAL_SRC_FILES := \
79    service.cpp \
80
81LOCAL_C_INCLUDES:= \
82    $(LOCAL_PATH)/location_api
83LOCAL_HEADER_LIBRARIES := \
84    libgps.utils_headers \
85    libloc_core_headers \
86    libloc_pla_headers \
87    liblocation_api_headers
88
89
90LOCAL_SHARED_LIBRARIES := \
91    liblog \
92    libcutils \
93    libdl \
94    libbase \
95    libutils \
96    libgps.utils \
97    libqti_vndfwk_detect \
98
99LOCAL_SHARED_LIBRARIES += \
100    libhidlbase \
101    android.hardware.gnss@1.0 \
102
103LOCAL_CFLAGS += $(GNSS_CFLAGS)
104
105ifneq ($(LOC_HIDL_VERSION),)
106LOCAL_CFLAGS += -DLOC_HIDL_VERSION='"$(LOC_HIDL_VERSION)"'
107endif
108
109include $(BUILD_EXECUTABLE)
110
111endif #ifeq ($(GNSS_HIDL_VERSION),1.0)
112