0849e8193e
Thanks to the pkgparentdir and pkgname functions, we can rewrite the GENTARGETS macro in a way that avoids the need for each package to repeat its name and the directory in which it is present. [Peter: pkgdir->pkgparentdir] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
#############################################################
|
|
#
|
|
# PCIUTILS
|
|
#
|
|
#############################################################
|
|
|
|
PCIUTILS_VERSION = 3.1.7
|
|
PCIUTILS_SITE = ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
PCIUTILS_ZLIB=yes
|
|
PCIUTILS_DEPENDENCIES += zlib
|
|
else
|
|
PCIUTILS_ZLIB=no
|
|
endif
|
|
PCIUTILS_DNS=no
|
|
PCIUTILS_SHARED=yes
|
|
|
|
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
|
|
$(MAKE) CC="$(TARGET_CC)" \
|
|
HOST="$(KERNEL_ARCH)-linux" \
|
|
OPT="$(TARGET_CFLAGS)" \
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
RANLIB=$(TARGET_RANLIB) \
|
|
AR=$(TARGET_AR) \
|
|
-C $(PCIUTILS_DIR) \
|
|
SHARED=$(PCIUTILS_SHARED) \
|
|
ZLIB=$(PCIUTILS_ZLIB) \
|
|
DNS=$(PCIUTILS_DNS) \
|
|
PREFIX=/usr
|
|
endef
|
|
|
|
# Ditch install-lib if SHARED is an option in the future
|
|
define PCIUTILS_INSTALL_TARGET_CMDS
|
|
$(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr \
|
|
SHARED=$(PCIUTILS_SHARED) install
|
|
$(MAKE) BUILDDIR=$(@D) -C $(@D) PREFIX=$(TARGET_DIR)/usr \
|
|
SHARED=$(PCIUTILS_SHARED) install-lib
|
|
endef
|
|
|
|
$(eval $(call GENTARGETS))
|