1################################################################################ 2# 3# util-linux-libs 4# 5################################################################################ 6 7# Please keep this file as similar as possible to util-linux.mk 8 9UTIL_LINUX_LIBS_VERSION = $(UTIL_LINUX_VERSION) 10UTIL_LINUX_LIBS_SOURCE = $(UTIL_LINUX_SOURCE) 11UTIL_LINUX_LIBS_SITE = $(UTIL_LINUX_SITE) 12UTIL_LINUX_LIBS_DL_SUBDIR = $(UTIL_LINUX_DL_SUBDIR) 13UTIL_LINUX_LIBS_CPE_ID_VENDOR = $(UTIL_LINUX_CPE_ID_VENDOR) 14UTIL_LINUX_LIBS_CPE_ID_PRODUCT = $(UTIL_LINUX_CPE_ID_PRODUCT) 15 16# README.licensing claims that some files are GPL-2.0 only, but this is not 17# true. Some files are GPL-3.0+ but only in tests and optionally in hwclock 18# (but we disable that option). rfkill uses an ISC-style license. 19UTIL_LINUX_LIBS_LICENSE = LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid) 20UTIL_LINUX_LIBS_LICENSE_FILES = README.licensing \ 21 Documentation/licenses/COPYING.BSD-3-Clause \ 22 Documentation/licenses/COPYING.LGPL-2.1-or-later 23 24UTIL_LINUX_LIBS_INSTALL_STAGING = YES 25UTIL_LINUX_LIBS_DEPENDENCIES = \ 26 host-pkgconf \ 27 $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) \ 28 $(TARGET_NLS_DEPENDENCIES) 29UTIL_LINUX_LIBS_CONF_OPTS += \ 30 --disable-rpath \ 31 --disable-makeinstall-chown 32 33UTIL_LINUX_LIBS_LINK_LIBS = $(TARGET_NLS_LIBS) 34 35# Prevent the installation from attempting to move shared libraries from 36# ${usrlib_execdir} (/usr/lib) to ${libdir} (/lib), since both paths are 37# the same when merged usr is in use. 38ifeq ($(BR2_ROOTFS_MERGED_USR),y) 39UTIL_LINUX_LIBS_CONF_OPTS += --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib 40endif 41 42# systemd depends on util-linux-libs so we disable systemd support 43UTIL_LINUX_LIBS_CONF_OPTS += \ 44 --without-systemd \ 45 --with-systemdsystemunitdir=no 46 47# systemd/eudev depend on util-linux-libs so we disable udev support 48UTIL_LINUX_LIBS_CONF_OPTS += --without-udev 49 50# No libs use wchar 51UTIL_LINUX_LIBS_CONF_OPTS += --disable-widechar 52 53# No libs use ncurses 54UTIL_LINUX_LIBS_CONF_OPTS += --without-ncursesw --without-ncurses 55 56# workaround for static_assert on uclibc-ng < 1.0.42 57UTIL_LINUX_LIBS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert" 58 59# Unfortunately, the util-linux does LIBS="" at the end of its 60# configure script. So we have to pass the proper LIBS value when 61# calling the configure script to make configure tests pass properly, 62# and then pass it again at build time. 63UTIL_LINUX_LIBS_CONF_ENV += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)" 64UTIL_LINUX_LIBS_MAKE_OPTS += LIBS="$(UTIL_LINUX_LIBS_LINK_LIBS)" 65 66# libmount optionally uses selinux 67ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT)$(BR2_PACKAGE_LIBSELINUX),yy) 68UTIL_LINUX_LIBS_DEPENDENCIES += libselinux 69UTIL_LINUX_LIBS_CONF_OPTS += --with-selinux 70else 71UTIL_LINUX_LIBS_CONF_OPTS += --without-selinux 72endif 73 74# Disable utilities 75UTIL_LINUX_LIBS_CONF_OPTS += \ 76 --disable-all-programs \ 77 $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \ 78 $(if $(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),--enable-libfdisk,--disable-libfdisk) \ 79 $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \ 80 $(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \ 81 $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) 82 83# libmount python bindings are separate, will be installed by full util-linux 84UTIL_LINUX_LIBS_CONF_OPTS += --without-python --disable-pylibmount 85 86# No libs use readline 87UTIL_LINUX_LIBS_CONF_OPTS += --without-readline 88 89# No libs use audit 90UTIL_LINUX_LIBS_CONF_OPTS += --without-audit 91 92# No libs use libmagic 93UTIL_LINUX_LIBS_CONF_OPTS += --without-libmagic 94 95$(eval $(autotools-package)) 96