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