]>
Commit | Line | Data |
---|---|---|
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 | 5 | OPT=-O2 -fomit-frame-pointer |
727ce158 MM |
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 | |
f17b962b | 11 | |
d38471fd MM |
12 | ROOT=/ |
13 | PREFIX=/usr | |
98e39e09 | 14 | |
727ce158 MM |
15 | export |
16 | ||
17 | all: lib lspci setpci lspci.8 setpci.8 | |
18 | ||
19 | lib: lib/config.h | |
20 | $(MAKE) -C lib all | |
e4842ff3 | 21 | |
727ce158 MM |
22 | lib/config.h: |
23 | cd lib && ./configure $(PREFIX) $(VERSION) | |
98e39e09 | 24 | |
727ce158 MM |
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)/" | |
98e39e09 MM |
34 | |
35 | clean: | |
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 | |
39 | install: 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 | |
46 | dist: 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 |