]> git.ipfire.org Git - thirdparty/pciutils.git/blame - Makefile
When device ID lookup fails, return hexadecimal device ID instead of vendor ID.
[thirdparty/pciutils.git] / Makefile
CommitLineData
55c815b5 1# $Id: Makefile,v 1.16 1999/05/19 12:01:26 mj Exp $
98e39e09 2# Makefile for Linux PCI Utilities
727ce158 3# (c) 1998--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
98e39e09 4
f17b962b 5OPT=-O2 -fomit-frame-pointer
727ce158
MM
6#OPT=-O2 -g
7CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Werror
8
d38471fd
MM
9ROOT=/
10PREFIX=/usr
98e39e09 11
55c815b5
MM
12VERSION=2.0
13SUFFIX=
14#SUFFIX=-alpha
15DATE=99-05-19
f6c86928 16
727ce158
MM
17export
18
19all: lib lspci setpci lspci.8 setpci.8
20
21lib: lib/config.h
22 $(MAKE) -C lib all
e4842ff3 23
727ce158
MM
24lib/config.h:
25 cd lib && ./configure $(PREFIX) $(VERSION)
98e39e09 26
727ce158
MM
27lspci: lspci.o common.o lib/libpci.a
28setpci: setpci.o common.o lib/libpci.a
29
30lspci.o: lspci.c pciutils.h lib/libpci.a
31setpci.o: setpci.c pciutils.h lib/libpci.a
32common.o: common.c pciutils.h lib/libpci.a
33
34%.8: %.man
f6c86928 35 sed <$< >$@ "s/@TODAY@/`date -d $(DATE) '+%d %B %Y'`/;s/@VERSION@/pciutils-$(VERSION)$(SUFFIX)/"
98e39e09
MM
36
37clean:
38 rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
d6b297d0 39 rm -f lspci setpci lib/config.* *.8
f6c86928 40 rm -rf dist
f17b962b
MM
41
42install: all
f3395cc5
MM
43 install -m 755 -s lspci setpci $(ROOT)/sbin
44 install -m 644 pci.ids $(PREFIX)/share
45 install -m 644 lspci.8 setpci.8 $(PREFIX)/man/man8
d38471fd
MM
46 # Remove relics from old versions
47 rm -f $(ROOT)/etc/pci.ids
f17b962b 48
f6c86928
MM
49release:
50 sed "s/^\\(Version:[ ]*\\)[0-9.]*/\\1$(VERSION)/;s/^\\(Entered-date:[ ]*\\)[0-9]*/\\1`date -d$(DATE) '+%y%m%d'`/;s/\\(pciutils-\\)[0-9.]*/\\1$(VERSION)\\./" <pciutils.lsm >pciutils.lsm.new
51 sed "s/^\\(Version:[ ]*\\)[0-9.]*/\\1$(VERSION)/" <pciutils.spec >pciutils.spec.new
52 sed "s/\\(, version \\).*\./\\1$(VERSION)$(SUFFIX)./" <README >README.new
53 mv pciutils.lsm.new pciutils.lsm
54 mv pciutils.spec.new pciutils.spec
55 mv README.new README
56
57REL=pciutils-$(VERSION)
58
f17b962b 59dist: clean
f6c86928
MM
60 mkdir dist
61 cp -a . dist/$(REL)
62 rm -rf `find dist/$(REL) -name CVS -o -name tmp` dist/$(REL)/dist
63 [ -f dist/$(REL)/lib/header.h ] || cp /usr/src/linux/include/linux/pci.h dist/$(REL)/lib/header.h
64 cd dist ; tar czvvf /tmp/$(REL).tar.gz $(REL)
727ce158 65
f6c86928 66.PHONY: all lib clean install dist man release