Commit e0b8d172 authored by Michael Scott's avatar Michael Scott Committed by Anas Nashif
Browse files

net: lwm2m: setup LwM2M build as static library



Instead of building under the "app" context, let's build the
LwM2M library as a separate static library.  This will be helpful
later when adding support for DTLS as w/o this configuration,
the build breaks on MBEDTLS config includes.

Signed-off-by: default avatarMichael Scott <michael@opensourcefoundries.com>
parent 21c2cf78
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
zephyr_library()

zephyr_include_directories(.)

zephyr_sources(
zephyr_library_sources(
    lwm2m_engine.c
    lwm2m_obj_security.c
    lwm2m_obj_server.c
@@ -10,27 +12,27 @@ zephyr_sources(
    )

# LWM2M RD Client Support
zephyr_sources_ifdef(CONFIG_LWM2M_RD_CLIENT_SUPPORT
zephyr_library_sources_ifdef(CONFIG_LWM2M_RD_CLIENT_SUPPORT
    lwm2m_rd_client.c
    )

# LWM2M Object Support
zephyr_sources_ifdef(CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT
zephyr_library_sources_ifdef(CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT
    lwm2m_obj_firmware.c
    )
zephyr_sources_ifdef(CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
zephyr_library_sources_ifdef(CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
    lwm2m_obj_firmware_pull.c
    )

# JSON Support
zephyr_sources_ifdef(CONFIG_LWM2M_RW_JSON_SUPPORT
zephyr_library_sources_ifdef(CONFIG_LWM2M_RW_JSON_SUPPORT
    lwm2m_rw_json.c
    )

# IPSO Objects
zephyr_sources_ifdef(CONFIG_LWM2M_IPSO_TEMP_SENSOR
zephyr_library_sources_ifdef(CONFIG_LWM2M_IPSO_TEMP_SENSOR
    ipso_temp_sensor.c
    )
zephyr_sources_ifdef(CONFIG_LWM2M_IPSO_LIGHT_CONTROL
zephyr_library_sources_ifdef(CONFIG_LWM2M_IPSO_LIGHT_CONTROL
    ipso_light_control.c
    )