]> mj.ucw.cz Git - pciutils.git/blob - Makefile
Replaced `buffer' access method by a real cache.
[pciutils.git] / Makefile
1 # $Id: Makefile,v 1.10 1999/01/22 21:04:46 mj Exp $
2 # Makefile for Linux PCI Utilities
3 # (c) 1998--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
4
5 OPT=-O2 -fomit-frame-pointer
6 #OPT=-O2 -g
7 CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Werror
8
9 VERSION=1.99.2-alpha
10 DATE=22 January 1999
11
12 ROOT=/
13 PREFIX=/usr
14
15 export
16
17 all: lib lspci setpci lspci.8 setpci.8
18
19 lib: lib/config.h
20         $(MAKE) -C lib all
21
22 lib/config.h:
23         cd lib && ./configure $(PREFIX) $(VERSION)
24
25 lspci: lspci.o common.o lib/libpci.a
26 setpci: setpci.o common.o lib/libpci.a
27
28 lspci.o: lspci.c pciutils.h lib/libpci.a
29 setpci.o: setpci.c pciutils.h lib/libpci.a
30 common.o: common.c pciutils.h lib/libpci.a
31
32 %.8: %.man
33         sed <$< >$@ "s/@TODAY@/$(DATE)/;s/@VERSION@/pciutils-$(VERSION)/"
34
35 clean:
36         rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
37         rm -f lspci setpci lib/config.* lib/header.h *.8
38
39 install: all
40         install -o root -g root -m 755 -s lspci setpci $(ROOT)/sbin
41         install -o root -g root -m 644 pci.ids $(PREFIX)/share
42         install -o root -g root -m 644 lspci.8 setpci.8 $(PREFIX)/man/man8
43         # Remove relics from old versions
44         rm -f $(ROOT)/etc/pci.ids
45
46 dist: clean
47         cp /usr/src/linux/include/linux/pci.h lib/header.h
48         sh -c 'X=`pwd` ; X=`basename $$X` ; cd .. ; tar czvvf /tmp/$$X.tar.gz $$X --exclude CVS --exclude tmp'
49         rm -f lib/header.h
50
51 .PHONY: all lib clean install dist man