busybox: use pkg-config for libtirpc flags
authorThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Sun, 26 Jul 2015 18:45:15 +0000 (20:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Jul 2015 19:49:24 +0000 (21:49 +0200)
Instead of hardcoding the flags needed for libtirpc, use pkg-config.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/busybox/busybox.mk

index 65ce7efe95e1d13470beb35ae0b4388c6435538d..6e302f461322109daab4854460c307b2243f6ab2 100644 (file)
@@ -19,11 +19,11 @@ BUSYBOX_LDFLAGS = \
 # Link against libtirpc if available so that we can leverage its RPC
 # support for NFS mounting with BusyBox
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
-BUSYBOX_DEPENDENCIES += libtirpc
-BUSYBOX_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
+BUSYBOX_DEPENDENCIES += libtirpc host-pkgconf
+BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
 # Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for
 # the non-final link of modules as well.
-BUSYBOX_CFLAGS_busybox += -ltirpc
+BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
 endif
 
 BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config