From: Thomas Petazzoni Date: Mon, 13 Apr 2020 13:17:21 +0000 (+0200) Subject: package/azure-iot-sdk-c: create function for library installation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=43822bb6db8851df4d6568622b58196895028f91;p=buildroot.git package/azure-iot-sdk-c: create function for library installation As a preparation for adding the creation of some symlinks, let's factor the library installation into a function. Signed-off-by: Thomas Petazzoni --- diff --git a/package/azure-iot-sdk-c/azure-iot-sdk-c.mk b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk index e6345104eb..6781da4177 100644 --- a/package/azure-iot-sdk-c/azure-iot-sdk-c.mk +++ b/package/azure-iot-sdk-c/azure-iot-sdk-c.mk @@ -44,18 +44,20 @@ AZURE_IOT_SDK_C_LIBS += \ umqtt/libumqtt.so endif -define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS +define AZURE_IOT_SDK_C_INSTALL_LIBS $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \ - $(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/$(notdir $(l)) + $(INSTALL) -D -m 0755 $(@D)/$(l) $(1)/usr/lib/$(notdir $(l)) ) +endef + +define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS + $(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(STAGING_DIR)) 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 - $(foreach l,$(AZURE_IOT_SDK_C_LIBS), \ - $(INSTALL) -D -m 0755 $(@D)/$(l) $(TARGET_DIR)/usr/lib/$(notdir $(l)) - ) + $(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(TARGET_DIR)) endef $(eval $(cmake-package))