pciutils.mk 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #############################################################
  2. #
  3. # pciutils
  4. #
  5. #############################################################
  6. PCIUTILS_VERSION:=2.2.10
  7. PCIUTILS_SOURCE:=pciutils-$(PCIUTILS_VERSION).tar.gz
  8. PCIUTILS_CAT:=$(ZCAT)
  9. PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
  10. PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-$(PCIUTILS_VERSION)
  11. # Yet more targets...
  12. PCIIDS_SITE:=http://pciids.sourceforge.net/
  13. PCIIDS_SOURCE:=pci.ids.bz2
  14. PCIIDS_CAT:=$(BZCAT)
  15. $(DL_DIR)/$(PCIUTILS_SOURCE):
  16. $(WGET) -P $(DL_DIR) $(PCIUTILS_SITE)/$(PCIUTILS_SOURCE)
  17. $(DL_DIR)/$(PCIIDS_SOURCE):
  18. $(WGET) -P $(DL_DIR) $(PCIIDS_SITE)/$(PCIIDS_SOURCE)
  19. pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
  20. $(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
  21. $(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  22. $(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) > $(PCIUTILS_DIR)/pci.ids
  23. toolchain/patch-kernel.sh $(PCIUTILS_DIR) package/pciutils pciutils\*.patch
  24. touch $@
  25. $(PCIUTILS_DIR)/.compiled: $(PCIUTILS_DIR)/.unpacked
  26. $(MAKE1) CC=$(TARGET_CC) OPT="$(TARGET_CFLAGS)" -C $(PCIUTILS_DIR) \
  27. SHAREDIR="/usr/share/misc" \
  28. PREFIX=/usr
  29. touch $@
  30. $(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/.compiled
  31. install -c $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci
  32. $(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/.compiled
  33. install -c $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci
  34. $(TARGET_DIR)/usr/share/misc/pci.ids: $(PCIUTILS_DIR)/.unpacked
  35. install -Dc $(PCIUTILS_DIR)/pci.ids $(TARGET_DIR)/usr/share/misc/pci.ids
  36. pciutils: uclibc zlib $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/pci.ids
  37. pciutils-clean:
  38. rm $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/usr/share/misc/pci.ids
  39. -$(MAKE) -C $(PCIUTILS_DIR) clean
  40. pciutils-dirclean:
  41. rm -rf $(PCIUTILS_DIR)
  42. #############################################################
  43. #
  44. # Toplevel Makefile options
  45. #
  46. #############################################################
  47. ifeq ($(strip $(BR2_PACKAGE_PCIUTILS)),y)
  48. TARGETS+=pciutils
  49. endif