buildrootschalter/package/nbd/nbd.mk
Thomas Petazzoni 381616e77a Introduce BR2_TOOLCHAIN_USES_{UCLIBC, GLIBC}
Currently, when we need to do a conditional on the type of C library
used, we need to take into account the three toolchain backends. As we
are going to add eglibc support to the Buildroot toolchain backend, it
would become even uglier, so this patch introduces two new hidden
options: BR2_TOOLCHAIN_USES_UCLIBC and BR2_TOOLCHAIN_USES_GLIBC, that
exist regardless of the toolchain backend. The entire Buildroot code
base is converted to use those options.

Note that we have intentionally created only one option
(BR2_TOOLCHAIN_USES_GLIBC) for both glibc and eglibc, since they are
essentially the same, as far as Buildroot is concerned.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-04 09:08:42 +02:00

34 lines
904 B
Makefile

################################################################################
#
# nbd
#
################################################################################
NBD_VERSION = 3.3
NBD_SOURCE = nbd-$(NBD_VERSION).tar.bz2
NBD_SITE = http://downloads.sourceforge.net/project/nbd/nbd/$(NBD_VERSION)
NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs)
NBD_DEPENDENCIES = libglib2
NBD_LICENSE = GPLv2
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# We have linux/falloc.h
# but uClibc lacks fallocate(2) which is a glibc-ism
NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no
endif
ifneq ($(BR2_NBD_CLIENT),y)
NBD_TOREMOVE += nbd-client
endif
ifneq ($(BR2_NBD_SERVER),y)
NBD_TOREMOVE += nbd-server
endif
define NBD_CLEANUP_AFTER_INSTALL
rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(NBD_TOREMOVE))
endef
NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL
$(eval $(autotools-package))