I am building GPS/GNSS HAL driver in Android Pi(9.0.X). I am copied libgps folder to Vendor/inxp-source/imx/libgps and configured Android.mk file as below.
ifeq ($(findstring imx, $(TARGET_BOARD_PLATFORM)), imx)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware
LOCAL_SRC_FILES := gps_parser.c
LOCAL_SRC_FILES += gps.c
LOCAL_MODULE := gps.$(TARGET_BOARD_PLATFORM)
LOCAL_MODULE_TAGS := eng
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
endif