buildroot/package/xinetd/xinetd.mk
Thomas De Schampheleire 9daa5e3f55 xinetd: use pkg-config for libtirpc flags
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>
2015-07-26 21:49:48 +02:00

34 lines
1 KiB
Makefile

################################################################################
#
# xinetd
#
################################################################################
XINETD_VERSION = xinetd-2-3-15
XINETD_SITE = $(call github,xinetd-org,xinetd,$(XINETD_VERSION))
XINETD_LICENSE = xinetd license
XINETD_LICENSE_FILES = COPYRIGHT
XINETD_CFLAGS = $(TARGET_CFLAGS)
# Three cases here:
# 1. We have libtirpc, use it by passing special flags
# 2. We have native RPC support, use it, no need to pass special
# flags (so this case 2 is implicit and not visible below)
# 3. We don't have RPC support, pass -DNO_RPC to disable it
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
XINETD_DEPENDENCIES += libtirpc host-pkgconf
XINETD_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
XINETD_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),)
XINETD_CFLAGS += -DNO_RPC
endif
XINETD_CONF_ENV += \
CFLAGS="$(XINETD_CFLAGS)" \
LIBS="$(XINETD_LIBS)"
XINETD_MAKE_OPTS = AR="$(TARGET_AR)"
$(eval $(autotools-package))