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