# This file should contain the paths to all header and source
# files that are required for building ubxlib on PlatformIO.
# Paths are relative to the ubxlib root directory, forward-slashes
# must be used.
# Note that test/automation and the examples from the ubxlib root
# directory are NOT brought in here since they are not required for
# normal use: for those see inc_src_test.txt.
# Framework specific directories will only be included for the
# actual framework used and ignored otherwise.
# For references to the current build framework the macro
# $FRAMEWORK can be used.

# This section contains regular expressions matching paths which
# should be excluded in subsequent wild card searches
[EXCLUDE]
/port/platform/(?!common|$FRAMEWORK)
/example/
/common/lib_common

# A module directory is one which contains one or more of
# api, src and test sub-directories with the src and test
# directories containing .c files (can also contain .h files)
[MODULE]
common/at_client
common/error
common/assert
common/timeout
common/location
common/mqtt_client
common/http_client
common/security
common/sock
common/ubx_protocol
common/spartn
common/utils
common/geofence
port/platform/common/debug_utils
# Even though the common network and device directories are
# organised as modules, they contain source files which need
# to be separated in terms of cell/gnss/short_range and hence
# their components are treated separately below
# The port directory is also treated separately as the src
# directory is not immediately below it

[MODULE cell]
cell

[MODULE gnss]
gnss

[MODULE short_range]
common/short_range
ble
wifi
common/dns

# Include file directories (ones which aren't in a module)
[INCLUDE]
**/cfg/
port/api
port/platform/common/*/
port/platform/common/debug_utils/src/freertos/additions/
port/clib/
port/platform/$FRAMEWORK
# Ideally this would be private
port/platform/$FRAMEWORK/src
common/type/api
common/network/api
common/device/api
# Ideally these would be private
common/network/src
common/device/src
# Ideally this  would be private
gnss/src/lib_mga

# Source files (ones which aren't in a module)
[SOURCE]
port/platform/$FRAMEWORK/src/*.c
port/platform/common/event_queue/u_port_event_queue.c
port/clib/u_port_clib_mktime64.c
port/u_port_timezone.c
port/u_port_heap.c
port/u_port_resource.c
port/u_port_i2c_default.c
port/u_port_spi_default.c
port/u_port_named_pipe_default.c
port/u_port_heap.c
port/u_port_ppp_default.c
port/u_port_board_cfg.c
port/platform/common/mutex_debug/u_mutex_debug.c
gnss/src/lib_mga/u_lib_mga.c
common/network/src/u_network.c
common/network/src/u_network_shared.c
common/network/src/u_network_private_ble_extmod_stub.c
common/network/src/u_network_private_cell_stub.c
common/network/src/u_network_private_gnss_stub.c
common/network/src/u_network_private_wifi_stub.c
common/device/src/u_device.c
common/device/src/u_device_serial.c
common/device/src/u_device_serial_wrapped.c
common/device/src/u_device_shared.c
common/device/src/u_device_private.c
common/device/src/u_device_private_cell_stub.c
common/device/src/u_device_private_gnss_stub.c
common/device/src/u_device_private_short_range_stub.c
common/geofence/src/u_geofence_geodesic.cpp

[SOURCE cell]
common/network/src/u_network_private_cell.c
common/device/src/u_device_private_cell.c

[SOURCE !cell]
common/network/src/u_network_private_cell_link.c
common/device/src/u_device_private_cell_link.c

[SOURCE gnss]
common/network/src/u_network_private_gnss.c
common/device/src/u_device_private_gnss.c

[SOURCE !gnss]
common/network/src/u_network_private_gnss_link.c
common/device/src/u_device_private_gnss_link.c

[SOURCE short_range]
common/network/src/u_network_private_ble_extmod.c
common/network/src/u_network_private_ble_intmod.c
common/network/src/u_network_private_wifi.c
common/device/src/u_device_private_short_range.c

[SOURCE !short_range]
common/network/src/u_network_private_ble_extmod_link.c
common/network/src/u_network_private_wifi_link.c
common/device/src/u_device_private_short_range_link.c

# Source files brought in only for Zephyr
[zephyr]
# Ubxlib by default uses the Zephyr minimal C library
# and hence some functions which are missing there needs to be added.
# If you use another library you may have to remove the files below.
port/clib/u_port_clib_isblank.c
port/clib/u_port_clib_mktime.c

# Ubxlib also by default uses its own wrapper of malloc which calls
# k_malloc. The heap size is controlled by the kconfig variable
# CONFIG_HEAP_MEM_POOL_SIZE. The variable CONFIG_MINIMAL_LIBC_MALLOC
# must also be set. All this is done in prj.conf
# If you want to use the default heap manager from the C library you
# should remove the file below. Please note that you also need to set
# the config variable CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE to the
# desired size for the heap in this case.
port/platform/zephyr/src/u_port_clib.c
