dmalloc: fix static build
authorWaldemar Brodkorb <wbx@openadk.org>
Mon, 13 Jun 2016 06:07:17 +0000 (08:07 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 2 Jul 2016 13:54:43 +0000 (15:54 +0200)
For example coldfire uses FLAT binaries, which are statically
build. Fixes following autobuild failure:
http://autobuild.buildroot.net/results/cc4233a4c3f92275a4071c172330c920c35219ca/

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
[Thomas: use an intermediate variable rather than duplicating code.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/dmalloc/dmalloc.mk

index f87ae1709aec774570be507ebfe525eee3ea469c..ffa9a3979e7c8ea3558c1604fbec3b266fcbd02c 100644 (file)
@@ -56,8 +56,14 @@ define DMALLOC_INSTALL_STAGING_CMDS
                -C $(@D) install
 endef
 
-define DMALLOC_INSTALL_TARGET_CMDS
+ifeq ($(BR2_STATIC_LIBS),)
+define DMALLOC_INSTALL_SHARED_LIB
        cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib
+endef
+endif
+
+define DMALLOC_INSTALL_TARGET_CMDS
+       $(DMALLOC_INSTALL_SHARED_LIB)
        cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc
 endef