From d884bb1def2f64b2116ab2a967467dea92adb2eb Mon Sep 17 00:00:00 2001 From: nyyu Date: Mon, 23 Aug 2021 21:14:20 +0200 Subject: [PATCH] mondrianwifi: gps: Replacing copy headers with header libraries Bug: 33241851 Test: Build target and pass CTS location tests Change-Id: I75db5e6de3c4194a6a46e0d37fcd899ea1d1db04 --- gps/core/Android.mk | 19 +++++++------------ gps/loc_api/libloc_api_50001/Android.mk | 18 ++++++++---------- gps/utils/Android.mk | 24 +++++------------------- 3 files changed, 20 insertions(+), 41 deletions(-) diff --git a/gps/core/Android.mk b/gps/core/Android.mk index d602a2f..292ad06 100755 --- a/gps/core/Android.mk +++ b/gps/core/Android.mk @@ -28,17 +28,12 @@ LOCAL_C_INCLUDES:= \ $(TARGET_OUT_HEADERS)/gps.utils \ $(TARGET_OUT_HEADERS)/libflp -LOCAL_COPY_HEADERS_TO:= libloc_core/ -LOCAL_COPY_HEADERS:= \ - LocApiBase.h \ - LocAdapterBase.h \ - ContextBase.h \ - LocDualContext.h \ - LBSProxyBase.h \ - UlpProxyBase.h \ - gps_extended_c.h \ - gps_extended.h \ - loc_core_log.h \ - LocAdapterProxyBase.h +LOCAL_HEADER_LIBRARIES := libgps.utils_headers + include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libloc_core_headers +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) +include $(BUILD_HEADER_LIBRARY) diff --git a/gps/loc_api/libloc_api_50001/Android.mk b/gps/loc_api/libloc_api_50001/Android.mk index 68c477a..8b14d5f 100755 --- a/gps/loc_api/libloc_api_50001/Android.mk +++ b/gps/loc_api/libloc_api_50001/Android.mk @@ -40,19 +40,15 @@ LOCAL_C_INCLUDES:= \ $(LOCAL_PATH) \ $(TARGET_OUT_HEADERS)/libflp -LOCAL_COPY_HEADERS_TO:= libloc_eng/ -LOCAL_COPY_HEADERS:= \ - LocEngAdapter.h \ - loc.h \ - loc_eng.h \ - loc_eng_xtra.h \ - loc_eng_ni.h \ - loc_eng_agps.h \ - loc_eng_msg.h \ - loc_eng_log.h +LOCAL_HEADER_LIBRARIES := libgps.utils_headers libloc_core_headers include $(BUILD_SHARED_LIBRARY) +include $(CLEAR_VARS) +LOCAL_MODULE := libloc_eng_headers +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) +include $(BUILD_HEADER_LIBRARY) + include $(CLEAR_VARS) LOCAL_MODULE := gps.$(TARGET_BOARD_PLATFORM) @@ -87,4 +83,6 @@ LOCAL_C_INCLUDES:= \ LOCAL_MODULE_RELATIVE_PATH := hw +LOCAL_HEADER_LIBRARIES := libgps.utils_headers libloc_core_headers + include $(BUILD_SHARED_LIBRARY) diff --git a/gps/utils/Android.mk b/gps/utils/Android.mk index 1dce091..2968370 100755 --- a/gps/utils/Android.mk +++ b/gps/utils/Android.mk @@ -36,27 +36,13 @@ LOCAL_LDFLAGS += -Wl,--export-dynamic LOCAL_C_INCLUDES:= \ $(LOCAL_PATH)/platform_lib_abstractions -LOCAL_COPY_HEADERS_TO:= gps.utils/ -LOCAL_COPY_HEADERS:= \ - loc_log.h \ - loc_cfg.h \ - log_util.h \ - linked_list.h \ - msg_q.h \ - MsgTask.h \ - LocHeap.h \ - LocThread.h \ - LocTimer.h \ - loc_target.h \ - loc_timer.h \ - LocSharedLock.h \ - platform_lib_abstractions/platform_lib_includes.h \ - platform_lib_abstractions/platform_lib_time.h \ - platform_lib_abstractions/platform_lib_macros.h \ - loc_misc_utils.h - LOCAL_MODULE := libgps.utils LOCAL_MODULE_OWNER := qcom LOCAL_PROPRIETARY_MODULE := true include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) +LOCAL_MODULE := libgps.utils_headers +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) $(LOCAL_PATH)/platform_lib_abstractions +include $(BUILD_HEADER_LIBRARY)