2017-06-22 17:11:30 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# azure-iot-sdk-c
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-12-21 18:37:29 +01:00
|
|
|
AZURE_IOT_SDK_C_VERSION = 2018-12-13
|
2017-06-22 17:11:30 +02:00
|
|
|
AZURE_IOT_SDK_C_SITE = https://github.com/Azure/azure-iot-sdk-c
|
|
|
|
AZURE_IOT_SDK_C_SITE_METHOD = git
|
|
|
|
AZURE_IOT_SDK_C_GIT_SUBMODULES = YES
|
|
|
|
AZURE_IOT_SDK_C_LICENSE = MIT
|
|
|
|
AZURE_IOT_SDK_C_LICENSE_FILES = LICENSE
|
|
|
|
AZURE_IOT_SDK_C_INSTALL_STAGING = YES
|
|
|
|
AZURE_IOT_SDK_C_DEPENDENCIES = libxml2 openssl libcurl util-linux
|
|
|
|
AZURE_IOT_SDK_C_CONF_OPTS = -Dskip_samples=ON
|
|
|
|
|
|
|
|
# The project only supports building one kind of library.
|
|
|
|
# Further the install target installs the wrong files, so we do it here:
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2020-04-13 14:54:44 +02:00
|
|
|
AZURE_IOT_SDK_C_LIBS += \
|
|
|
|
uamqp/libuamqp.a \
|
|
|
|
c-utility/libaziotsharedutil.a \
|
|
|
|
iothub_client/libiothub_client.a \
|
|
|
|
iothub_client/libiothub_client_mqtt_ws_transport.a \
|
2017-06-22 17:11:30 +02:00
|
|
|
iothub_client/libiothub_client_amqp_ws_transport.a \
|
|
|
|
iothub_client/libiothub_client_http_transport.a \
|
|
|
|
iothub_client/libiothub_client_amqp_transport.a \
|
|
|
|
iothub_client/libiothub_client_mqtt_transport.a \
|
2020-04-13 14:54:44 +02:00
|
|
|
iothub_service_client/libiothub_service_client.a \
|
|
|
|
serializer/libserializer.a \
|
2020-04-13 15:43:42 +02:00
|
|
|
umqtt/libumqtt.a \
|
|
|
|
libparson.a
|
2017-06-22 17:11:30 +02:00
|
|
|
else
|
2020-04-13 14:54:44 +02:00
|
|
|
AZURE_IOT_SDK_C_LIBS += \
|
|
|
|
uamqp/libuamqp.so \
|
|
|
|
c-utility/libaziotsharedutil.so \
|
|
|
|
iothub_client/libiothub_client.so \
|
|
|
|
iothub_client/libiothub_client_mqtt_ws_transport.so \
|
2017-06-22 17:11:30 +02:00
|
|
|
iothub_client/libiothub_client_amqp_ws_transport.so \
|
|
|
|
iothub_client/libiothub_client_http_transport.so \
|
|
|
|
iothub_client/libiothub_client_amqp_transport.so \
|
|
|
|
iothub_client/libiothub_client_mqtt_transport.so \
|
2020-04-13 14:54:44 +02:00
|
|
|
iothub_service_client/libiothub_service_client.so \
|
|
|
|
serializer/libserializer.so \
|
2020-04-13 15:43:42 +02:00
|
|
|
umqtt/libumqtt.so.1.1.11 \
|
|
|
|
libparson.so
|
2020-04-13 15:22:31 +02:00
|
|
|
|
|
|
|
define AZURE_IOT_SDK_C_CREATE_SYMLINKS
|
|
|
|
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so.1
|
|
|
|
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so
|
|
|
|
endef
|
2017-06-22 17:11:30 +02:00
|
|
|
endif
|
|
|
|
|
2020-04-13 15:17:21 +02:00
|
|
|
define AZURE_IOT_SDK_C_INSTALL_LIBS
|
2017-06-22 17:11:30 +02:00
|
|
|
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
|
2020-04-13 15:17:21 +02:00
|
|
|
$(INSTALL) -D -m 0755 $(@D)/$(l) $(1)/usr/lib/$(notdir $(l))
|
2017-06-22 17:11:30 +02:00
|
|
|
)
|
2020-04-13 15:22:31 +02:00
|
|
|
$(call AZURE_IOT_SDK_C_CREATE_SYMLINKS,$(1))
|
2020-04-13 15:17:21 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
|
|
|
|
$(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(STAGING_DIR))
|
2017-06-22 17:11:30 +02:00
|
|
|
cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
|
|
|
|
cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS
|
2020-04-13 15:17:21 +02:00
|
|
|
$(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(TARGET_DIR))
|
2017-06-22 17:11:30 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(cmake-package))
|