Michael Bestas | 58e7cab | 2023-05-12 04:05:32 +0300 | [diff] [blame^] | 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) |
| 2 | ifneq ($(BUILD_TINY_ANDROID),true) |
| 3 | #Compile this library only for builds with the latest modem image |
| 4 | |
| 5 | LOCAL_PATH := $(call my-dir) |
| 6 | |
| 7 | include $(CLEAR_VARS) |
| 8 | |
| 9 | |
| 10 | ## Libs |
| 11 | LOCAL_SHARED_LIBRARIES := \ |
| 12 | libdl \ |
| 13 | libutils \ |
| 14 | libcutils \ |
| 15 | liblog \ |
| 16 | libprocessgroup |
| 17 | |
| 18 | LOCAL_SRC_FILES += \ |
| 19 | loc_log.cpp \ |
| 20 | loc_cfg.cpp \ |
| 21 | msg_q.c \ |
| 22 | linked_list.c \ |
| 23 | loc_target.cpp \ |
| 24 | LocHeap.cpp \ |
| 25 | LocTimer.cpp \ |
| 26 | LocThread.cpp \ |
| 27 | MsgTask.cpp \ |
| 28 | loc_misc_utils.cpp \ |
| 29 | loc_nmea.cpp \ |
| 30 | LocIpc.cpp \ |
| 31 | LogBuffer.cpp |
| 32 | |
| 33 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true |
| 34 | LOCAL_CFLAGS += \ |
| 35 | -fno-short-enums \ |
| 36 | -D_ANDROID_ |
| 37 | |
| 38 | ifeq ($(TARGET_BUILD_VARIANT),user) |
| 39 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER |
| 40 | endif |
| 41 | |
| 42 | LOCAL_LDFLAGS += -Wl,--export-dynamic |
| 43 | |
| 44 | ## Includes |
| 45 | LOCAL_HEADER_LIBRARIES := \ |
| 46 | libutils_headers \ |
| 47 | libloc_pla_headers \ |
| 48 | liblocation_api_headers |
| 49 | |
| 50 | LOCAL_MODULE := libgps.utils |
| 51 | LOCAL_SANITIZE += $(GNSS_SANITIZE) |
| 52 | # activate the following line for debug purposes only, comment out for production |
| 53 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) |
| 54 | LOCAL_VENDOR_MODULE := true |
| 55 | LOCAL_MODULE_TAGS := optional |
| 56 | |
| 57 | LOCAL_PRELINK_MODULE := false |
| 58 | |
| 59 | LOCAL_CFLAGS += $(GNSS_CFLAGS) |
| 60 | |
| 61 | include $(BUILD_SHARED_LIBRARY) |
| 62 | |
| 63 | include $(CLEAR_VARS) |
| 64 | LOCAL_MODULE := libgps.utils_headers |
| 65 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
| 66 | include $(BUILD_HEADER_LIBRARY) |
| 67 | |
| 68 | endif # not BUILD_TINY_ANDROID |
| 69 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE |