summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2008-02-11 15:48:53 +0100
committerMartin Mares <mj@ucw.cz>2008-02-11 15:48:53 +0100
commitbb8c98633136217db4851845b47dc5fbf6e3741b (patch)
treec53c137ca0e1845f556bdcf54bfd3e1fc978b85a /Makefile
parenta3d33b940876d0d05d8fdd51f54957436a782823 (diff)
parentd26b53789cd7484808f131b3f729b1c0b20c0fd1 (diff)
downloadpciutils-bb8c98633136217db4851845b47dc5fbf6e3741b.tar.gz
Merge with git+ssh://git.ucw.cz/home/mj/GIT/pciutils.git
Updated to reflect changes in current mainline repository (merged Makefile and ChangeLog manually).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 20 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index aec6ccb..3706917 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,28 @@
# Makefile for The PCI Utilities
-# (c) 1998--2007 Martin Mares <mj@ucw.cz>
+# (c) 1998--2008 Martin Mares <mj@ucw.cz>
OPT=-O2
CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
-VERSION=2.2.5-net1
-DATE=2007-02-13
+VERSION=2.2.9-net1
+DATE=2008-02-11
PREFIX=/usr/local
SBINDIR=$(PREFIX)/sbin
SHAREDIR=$(PREFIX)/share
IDSDIR=$(SHAREDIR)
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
+INCDIR=$(PREFIX)/include
+LIBDIR=$(PREFIX)/lib
+PKGCFDIR=$(LIBDIR)/pkgconfig
INSTALL=install
DIRINSTALL=install -d
+AR=ar
+RANLIB=ranlib
PCILIB=lib/libpci.a
+PCILIBPC=lib/libpci.pc
PCIINC=lib/config.h lib/header.h lib/pci.h lib/types.h lib/sysdep.h
+PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/types.h
-include lib/config.mk
@@ -45,12 +52,15 @@ update-pciids: update-pciids.sh
sed <$< >$@ "s@^DEST=.*@DEST=$(IDSDIR)/$(PCI_IDS)@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@"
chmod +x $@
+%: %.o
+ $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) -o $@
+
%.8: %.man
M=`echo $(DATE) | sed 's/-01-/-January-/;s/-02-/-February-/;s/-03-/-March-/;s/-04-/-April-/;s/-05-/-May-/;s/-06-/-June-/;s/-07-/-July-/;s/-08-/-August-/;s/-09-/-September-/;s/-10-/-October-/;s/-11-/-November-/;s/-12-/-December-/;s/\(.*\)-\(.*\)-\(.*\)/\3 \2 \1/'` ; sed <$< >$@ "s/@TODAY@/$$M/;s/@VERSION@/pciutils-$(VERSION)/;s#@IDSDIR@#$(IDSDIR)#"
clean:
rm -f `find . -name "*~" -o -name "*.[oa]" -o -name "\#*\#" -o -name TAGS -o -name core -o -name "*.orig"`
- rm -f update-pciids lspci setpci lib/config.* lib/example *.8 pci.ids.*
+ rm -f update-pciids lspci setpci lib/config.* lib/example *.8 pci.ids.* lib/*.pc
rm -rf maint/dist
distclean: clean
@@ -63,6 +73,12 @@ install: all
$(INSTALL) -c -m 644 $(PCI_IDS) $(DESTDIR)$(IDSDIR)
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
+install-lib: $(PCIINC_INS) $(PCILIB) $(PCILIBPC)
+ $(DIRINSTALL) -m 755 $(DESTDIR)$(INCDIR)/pci $(DESTDIR)$(LIBDIR) $(DESTDIR)$(PKGCFDIR)
+ $(INSTALL) -c -m 644 $(PCIINC_INS) $(DESTDIR)$(INCDIR)/pci
+ $(INSTALL) -c -m 644 $(PCILIB) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -c -m 644 $(PCILIBPC) $(DESTDIR)$(PKGCFDIR)
+
uninstall: all
rm -f $(DESTDIR)$(SBINDIR)/lspci $(DESTDIR)$(SBINDIR)/setpci $(DESTDIR)$(SBINDIR)/update-pciids
rm -f $(DESTDIR)$(IDSDIR)/$(PCI_IDS)