blob: 536b904e3597dc774aa9362e77465de904ba0640 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
--- Makefile.orig 2023-05-01 12:59:54 UTC
+++ Makefile
@@ -1,8 +1,8 @@
# Makefile for The PCI Utilities
# (c) 1998--2023 Martin Mares <mj@ucw.cz>
-OPT=-O2
-CFLAGS=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
+#OPT=-O2
+CFLAGS+=$(OPT) -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes
VERSION=3.10.0
DATE=2023-05-01
@@ -32,11 +32,11 @@ HWDB=
ABI_VERSION=3
# Installation directories
-PREFIX=/usr/local
+#PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
SBINDIR=$(PREFIX)/sbin
SHAREDIR=$(PREFIX)/share
-IDSDIR=$(SHAREDIR)
+IDSDIR=$(SHAREDIR)/pciids
MANDIR:=$(shell if [ -d $(PREFIX)/share/man ] ; then echo $(PREFIX)/share/man ; else echo $(PREFIX)/man ; fi)
INCDIR=$(PREFIX)/include
LIBDIR=$(PREFIX)/lib
@@ -45,13 +45,13 @@ PKGCFDIR=$(LIBDIR)/pkgconfig
# Commands
INSTALL=install
DIRINSTALL=install -d
-ifdef CROSS_COMPILE
-STRIP=--strip-program $(CROSS_COMPILE)-strip
-CC=$(CROSS_COMPILE)gcc
-else
-STRIP=-s
-CC=cc
-endif
+#ifdef CROSS_COMPILE
+#STRIP=--strip-program $(CROSS_COMPILE)-strip
+#CC=$(CROSS_COMPILE)gcc
+#else
+#STRIP=-s
+#CC=cc
+#endif
AR=$(CROSS_COMPILE)ar
RANLIB=$(CROSS_COMPILE)ranlib
DLLTOOL=$(CROSS_COMPILE)dlltool
@@ -67,7 +67,7 @@ PCIINC_INS=lib/config.h lib/header.h lib/pci.h lib/typ
export
-all: lib/$(PCIIMPLIB) lspci$(EXEEXT) setpci$(EXEEXT) example$(EXEEXT) lspci.8 setpci.8 pcilib.7 pci.ids.5 update-pciids update-pciids.8 $(PCI_IDS)
+all: lspci$(EXEEXT) setpci$(EXEEXT) example$(EXEEXT) lspci.8 setpci.8 pcilib.7 pci.ids.5 update-pciids update-pciids.8 $(PCI_IDS)
lib/$(PCIIMPLIB): $(PCIINC) force
$(MAKE) -C lib all
@@ -83,8 +83,8 @@ PCIINC+=compat/getopt.h
COMMON+=compat/getopt.o
endif
-lspci$(EXEEXT): lspci.o ls-vpd.o ls-caps.o ls-caps-vendor.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o $(COMMON) lib/$(PCIIMPLIB)
-setpci$(EXEEXT): setpci.o $(COMMON) lib/$(PCIIMPLIB)
+lspci$(EXEEXT): lspci.o ls-vpd.o ls-caps.o ls-caps-vendor.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o $(COMMON)
+setpci$(EXEEXT): setpci.o $(COMMON)
LSPCIINC=lspci.h pciutils.h $(PCIINC)
lspci.o: lspci.c $(LSPCIINC)
@@ -107,7 +107,7 @@ update-pciids: update-pciids.sh
chmod +x $@
# The example of use of libpci
-example$(EXEEXT): example.o lib/$(PCIIMPLIB)
+example$(EXEEXT): example.o
example.o: example.c $(PCIINC)
%$(EXEEXT): %.o
|