2003-01-18 22:27:22 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# pciutils
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-10-31 13:14:39 +01:00
|
|
|
PCIUTILS_VERSION:=3.0.1
|
2007-07-11 16:06:06 +02:00
|
|
|
PCIUTILS_SOURCE:=pciutils-$(PCIUTILS_VERSION).tar.gz
|
2006-11-17 16:43:51 +01:00
|
|
|
PCIUTILS_CAT:=$(ZCAT)
|
2003-01-18 22:27:22 +01:00
|
|
|
PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
|
2007-07-11 16:06:06 +02:00
|
|
|
PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-$(PCIUTILS_VERSION)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
# Yet more targets...
|
|
|
|
PCIIDS_SITE:=http://pciids.sourceforge.net/
|
|
|
|
PCIIDS_SOURCE:=pci.ids.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
PCIIDS_CAT:=$(BZCAT)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2008-10-31 13:14:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
PCIUTILS_HAVE_ZLIB=yes
|
|
|
|
PCIIDS_FILE=pci.ids.gz
|
2009-01-02 13:01:49 +01:00
|
|
|
PCIIDS_COMPRESSOR=gzip -9 -c
|
2008-10-31 13:14:39 +01:00
|
|
|
else
|
|
|
|
PCIUTILS_HAVE_ZLIB=no
|
|
|
|
PCIIDS_FILE=pci.ids
|
2009-01-02 13:01:49 +01:00
|
|
|
PCIIDS_COMPRESSOR=cat
|
2008-10-31 13:14:39 +01:00
|
|
|
endif
|
|
|
|
|
2003-01-18 22:27:22 +01:00
|
|
|
$(DL_DIR)/$(PCIUTILS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(PCIUTILS_SITE),$(PCIUTILS_SOURCE))
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(DL_DIR)/$(PCIIDS_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(PCIIDS_SITE),$(PCIIDS_SOURCE))
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
$(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2009-01-02 13:01:49 +01:00
|
|
|
$(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) | $(PCIIDS_COMPRESSOR) > $(PCIUTILS_DIR)/$(PCIIDS_FILE)
|
2008-10-31 13:14:39 +01:00
|
|
|
toolchain/patch-kernel.sh $(PCIUTILS_DIR) package/pciutils pciutils-$(PCIUTILS_VERSION)\*.patch
|
|
|
|
#$(CONFIG_UPDATE) $(@D)
|
|
|
|
$(SED) 's/uname -s/echo Linux/' \
|
|
|
|
-e 's/uname -r/echo $(LINUX_HEADERS_VERSION)/' \
|
|
|
|
$(PCIUTILS_DIR)/lib/configure
|
2008-10-31 04:55:03 +01:00
|
|
|
touch $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2004-10-08 18:00:05 +02:00
|
|
|
$(PCIUTILS_DIR)/.compiled: $(PCIUTILS_DIR)/.unpacked
|
2009-01-01 15:05:54 +01:00
|
|
|
$(MAKE1) CC="$(TARGET_CC)" OPT="$(TARGET_CFLAGS)" RANLIB=$(TARGET_RANLIB) AR=$(TARGET_AR) -C $(PCIUTILS_DIR) \
|
2006-12-05 13:57:41 +01:00
|
|
|
SHAREDIR="/usr/share/misc" \
|
2008-10-31 13:14:39 +01:00
|
|
|
ZLIB=$(PCIUTILS_HAVE_ZLIB) \
|
2009-03-09 15:09:20 +01:00
|
|
|
HOST=$(KERNEL_ARCH)-linux \
|
2006-12-05 13:57:41 +01:00
|
|
|
PREFIX=/usr
|
2008-10-31 04:55:03 +01:00
|
|
|
touch $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2004-10-08 18:00:05 +02:00
|
|
|
$(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/.compiled
|
2008-10-31 13:14:39 +01:00
|
|
|
$(INSTALL) $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2004-10-08 18:00:05 +02:00
|
|
|
$(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/.compiled
|
2008-10-31 13:14:39 +01:00
|
|
|
$(INSTALL) $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $@
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/share/misc/$(PCIIDS_FILE): $(PCIUTILS_DIR)/.unpacked
|
2009-01-01 18:28:51 +01:00
|
|
|
$(INSTALL) -D $(PCIUTILS_DIR)/$(PCIIDS_FILE) $@
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2008-10-31 13:41:02 +01:00
|
|
|
pciutils: uclibc $(if $(BR2_PACKAGE_ZLIB),zlib) $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/$(PCIIDS_FILE)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2008-10-31 13:14:39 +01:00
|
|
|
pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
pciutils-clean:
|
|
|
|
-$(MAKE) -C $(PCIUTILS_DIR) clean
|
2008-10-31 13:14:39 +01:00
|
|
|
rm -f $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/usr/share/misc/pci.ids*
|
2003-01-18 22:27:22 +01:00
|
|
|
|
|
|
|
pciutils-dirclean:
|
|
|
|
rm -rf $(PCIUTILS_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-10-31 13:14:39 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=pciutils
|
|
|
|
endif
|