summaryrefslogtreecommitdiffstats
path: root/make/pciutils.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-01-18 21:27:22 +0000
committerEric Andersen <andersen@codepoet.org>2003-01-18 21:27:22 +0000
commit7129da009cc72575a84a30c4587bd99f745c49d4 (patch)
tree5c16654726d0b4c230ed957f88fd1b26be805171 /make/pciutils.mk
parentf7070772fa2fef125169853747ff9aecc4a88962 (diff)
downloadbuildroot-novena-7129da009cc72575a84a30c4587bd99f745c49d4.tar.gz
buildroot-novena-7129da009cc72575a84a30c4587bd99f745c49d4.zip
Merge a bunch of stuff over from the tuxscreen buildroot, with
many updates to make things be more consistant. -Erik
Diffstat (limited to 'make/pciutils.mk')
-rw-r--r--make/pciutils.mk69
1 files changed, 69 insertions, 0 deletions
diff --git a/make/pciutils.mk b/make/pciutils.mk
new file mode 100644
index 000000000..4d60ed8b3
--- /dev/null
+++ b/make/pciutils.mk
@@ -0,0 +1,69 @@
+#############################################################
+#
+# pciutils
+#
+#############################################################
+PCIUTILS_SOURCE:=pciutils-2.1.10.tar.gz
+PCIUTILS_SITE:=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
+PCIUTILS_DIR:=$(BUILD_DIR)/pciutils-2.1.10
+PCIUTILS_CAT:=zcat
+
+# Yet more targets...
+PCIIDS_SITE:=http://pciids.sourceforge.net/
+PCIIDS_SOURCE:=pci.ids.bz2
+PCIIDS_CAT:=bzcat
+
+$(DL_DIR)/$(PCIUTILS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(PCIUTILS_SITE)/$(PCIUTILS_SOURCE)
+
+$(DL_DIR)/$(PCIIDS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(PCIIDS_SITE)/$(PCIIDS_SOURCE)
+
+pciutils-source: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
+
+$(PCIUTILS_DIR)/.unpacked: $(DL_DIR)/$(PCIUTILS_SOURCE) $(DL_DIR)/$(PCIIDS_SOURCE)
+ $(PCIUTILS_CAT) $(DL_DIR)/$(PCIUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ $(PCIIDS_CAT) $(DL_DIR)/$(PCIIDS_SOURCE) > $(PCIUTILS_DIR)/pci.id
+ touch $(PCIUTILS_DIR)/.unpacked
+
+$(PCIUTILS_DIR)/.configured: $(PCIUTILS_DIR)/.unpacked
+ (cd $(PCIUTILS_DIR); rm -rf config.cache; \
+ PATH=$(STAGING_DIR)/bin:$$PATH CC=$(TARGET_CC1) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ );
+ touch $(PCIUTILS_DIR)/.configured
+
+$(PCIUTILS_DIR)/lspci: $(PCIUTILS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC1) -C $(PCIUTILS_DIR)
+
+$(TARGET_DIR)/sbin/lspci: $(PCIUTILS_DIR)/lspci
+ install -c $(PCIUTILS_DIR)/lspci $(TARGET_DIR)/sbin/lspci
+
+$(TARGET_DIR)/sbin/setpci: $(PCIUTILS_DIR)/setpci
+ install -c $(PCIUTILS_DIR)/setpci $(TARGET_DIR)/sbin/setpci
+
+$(TARGET_DIR)/usr/share/misc/pci.ids: $(PCIUTILS_DIR)/.dist
+ install -Dc $(PCIUTILS_DIR)/pci.ids $(TARGET_DIR)/usr/share/misc/pci.ids
+
+
+pciutils: uclibc $(TARGET_DIR)/sbin/setpci $(TARGET_DIR)/sbin/lspci $(TARGET_DIR)/usr/share/misc/pci.ids
+
+pciutils-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC1) -C $(PCIUTILS_DIR) uninstall
+ -$(MAKE) -C $(PCIUTILS_DIR) clean
+
+pciutils-dirclean:
+ rm -rf $(PCIUTILS_DIR)
+