argus: use pkg-config for libtirpc flags
authorThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Sun, 26 Jul 2015 18:45:18 +0000 (20:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Jul 2015 19:49:57 +0000 (21:49 +0200)
Instead of hardcoding the flags needed for libtirpc, use pkg-config.
The linker flags are added to LIBS rather than LDFLAGS, which is more
correct in case of static builds.

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

index c39b664ed84c7fbdb8aac3ac63f21664ea728ca7..bd1c55904a165f8efc44df65b279609a0f8bf4dd 100644 (file)
@@ -13,10 +13,10 @@ ARGUS_LICENSE = GPLv2+
 ARGUS_LICENSE_FILES = README
 
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
-ARGUS_DEPENDENCIES += libtirpc
+ARGUS_DEPENDENCIES += libtirpc host-pkgconf
 ARGUS_CONF_ENV += \
-       CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/tirpc/" \
-       LDFLAGS="$(TARGET_LDFLAGS) -ltirpc"
+       CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \
+       LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
 endif
 
 $(eval $(autotools-package))