kumquat-buildroot/package/pciutils/pciutils.mk
Thomas Petazzoni 665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.

As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.

This also helps preparing the addition of other options to select
shared, shared+static or just static.

Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-11 22:48:13 +01:00

79 lines
1.9 KiB
Makefile

################################################################################
#
# pciutils
#
################################################################################
PCIUTILS_VERSION = 3.3.0
PCIUTILS_SITE = $(BR2_KERNEL_MIRROR)/software/utils/pciutils
PCIUTILS_SOURCE = pciutils-$(PCIUTILS_VERSION).tar.xz
PCIUTILS_INSTALL_STAGING = YES
PCIUTILS_LICENSE = GPLv2+
PCIUTILS_LICENSE_FILES = COPYING
ifeq ($(BR2_PACKAGE_ZLIB),y)
PCIUTILS_ZLIB=yes
PCIUTILS_DEPENDENCIES += zlib
else
PCIUTILS_ZLIB=no
endif
PCIUTILS_DNS = no
ifeq ($(BR2_PACKAGE_KMOD),y)
PCIUTILS_DEPENDENCIES += kmod
PCIUTILS_KMOD = yes
else
PCIUTILS_KMOD = no
endif
ifeq ($(BR2_STATIC_LIBS),y)
PCIUTILS_SHARED=no
else
PCIUTILS_SHARED=yes
endif
PCIUTILS_MAKE_OPTS = \
CC="$(TARGET_CC)" \
HOST="$(KERNEL_ARCH)-linux" \
OPT="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
RANLIB=$(TARGET_RANLIB) \
AR=$(TARGET_AR) \
ZLIB=$(PCIUTILS_ZLIB) \
DNS=$(PCIUTILS_DNS) \
LIBKMOD=$(PCIUTILS_KMOD) \
SHARED=$(PCIUTILS_SHARED)
# Build after busybox since it's got a lightweight lspci
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
PCIUTILS_DEPENDENCIES += busybox
endif
define PCIUTILS_CONFIGURE_CMDS
$(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh
$(SED) 's/uname -s/echo Linux/' \
-e 's/uname -r/echo $(LINUX_HEADERS_VERSION)/' \
$(PCIUTILS_DIR)/lib/configure
$(SED) 's/^STRIP/#STRIP/' $(PCIUTILS_DIR)/Makefile
endef
define PCIUTILS_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(PCIUTILS_MAKE_OPTS) \
PREFIX=/usr
endef
define PCIUTILS_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(PCIUTILS_MAKE_OPTS) \
PREFIX=$(TARGET_DIR)/usr SBINDIR=$(TARGET_DIR)/usr/bin \
install install-lib install-pcilib
endef
define PCIUTILS_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(PCIUTILS_MAKE_OPTS) \
PREFIX=$(STAGING_DIR)/usr SBINDIR=$(STAGING_DIR)/usr/bin \
install install-lib install-pcilib
endef
$(eval $(generic-package))