]> git.ipfire.org Git - thirdparty/pciutils.git/blame - Makefile
Rewrote the PCI Utilities. All PCI configuration space access has been
[thirdparty/pciutils.git] / Makefile
CommitLineData
727ce158 1# $Id: Makefile,v 1.10 1999/01/22 21:04:46 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
9VERSION=1.99.2-alpha
10DATE=22 January 1999
f17b962b 11
d38471fd
MM
12ROOT=/
13PREFIX=/usr
98e39e09 14
727ce158
MM
15export
16
17all: lib lspci setpci lspci.8 setpci.8
18
19lib: lib/config.h
20 $(MAKE) -C lib all
e4842ff3 21
727ce158
MM
22lib/config.h:
23 cd lib && ./configure $(PREFIX) $(VERSION)
98e39e09 24
727ce158
MM
25lspci: lspci.o common.o lib/libpci.a
26setpci: setpci.o common.o lib/libpci.a
27
28lspci.o: lspci.c pciutils.h lib/libpci.a
29setpci.o: setpci.c pciutils.h lib/libpci.a
30common.o: common.c pciutils.h lib/libpci.a
31
32%.8: %.man
33 sed <$< >$@ "s/@TODAY@/$(DATE)/;s/@VERSION@/pciutils-$(VERSION)/"
98e39e09
MM
34
35clean:
36 rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
727ce158 37 rm -f lspci setpci lib/config.* lib/header.h *.8
f17b962b
MM
38
39install: all
d38471fd
MM
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
f17b962b
MM
45
46dist: clean
727ce158 47 cp /usr/src/linux/include/linux/pci.h lib/header.h
18928b91 48 sh -c 'X=`pwd` ; X=`basename $$X` ; cd .. ; tar czvvf /tmp/$$X.tar.gz $$X --exclude CVS --exclude tmp'
727ce158
MM
49 rm -f lib/header.h
50
51.PHONY: all lib clean install dist man