1 # $Id: Makefile,v 1.11 1999/01/24 21:48:11 mj Exp $
2 # Makefile for Linux PCI Utilities
3 # (c) 1998--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
5 OPT=-O2 -fomit-frame-pointer
7 CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Werror
17 all: lib lspci setpci lspci.8 setpci.8
23 cd lib && ./configure $(PREFIX) $(VERSION)
25 lspci: lspci.o common.o lib/libpci.a
26 setpci: setpci.o common.o lib/libpci.a
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
33 sed <$< >$@ "s/@TODAY@/$(DATE)/;s/@VERSION@/pciutils-$(VERSION)/"
36 rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
37 rm -f lspci setpci lib/config.* *.8
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
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'
51 .PHONY: all lib clean install dist man