--- a/lib/Makefile	2011-01-07 16:04:28.000000000 -0500
+++ b/lib/Makefile	2014-03-05 17:28:09.060760262 -0500
@@ -42,18 +42,17 @@ ifdef PCI_HAVE_PM_NBSD_LIBPCI
 OBJS += nbsd-libpci
 endif
 
-all: $(PCILIB) $(PCILIBPC)
+PCILIBA=libpci.a
 
-ifeq ($(SHARED),no)
-$(PCILIB): $(addsuffix .o,$(OBJS))
+all: $(PCILIB) $(PCILIBPC) $(PCILIBA)
+
+$(PCILIBA): $(addsuffix .o,$(OBJS))
 	rm -f $@
 	$(AR) rcs $@ $^
 	$(RANLIB) $@
-else
 CFLAGS += -fPIC -fvisibility=hidden
 $(PCILIB): $(addsuffix .o,$(OBJS))
 	$(CC) -shared $(LDFLAGS) $(SONAME) -Wl,--version-script=libpci.ver -o $@ $^ $(LIB_LDLIBS)
-endif
 
 $(PCILIBPC): libpci.pc.in
 	sed <$< >$@ -e 's,@PREFIX@,$(PREFIX),' \
--- a/Makefile	2014-03-05 17:28:04.668760300 -0500
+++ b/Makefile	2014-03-05 17:28:09.060760262 -0500
@@ -58,7 +58,7 @@ export
 
 all: lib/$(PCILIB) lspci setpci example lspci.8 setpci.8 pcilib.7 update-pciids update-pciids.8 $(PCI_IDS)
 
-lib/$(PCILIB): $(PCIINC) force
+lib/$(PCILIB) lib/libpci.a: $(PCIINC) force
 	$(MAKE) -C lib all
 
 force:
@@ -66,8 +66,8 @@ force:
 lib/config.h lib/config.mk:
 	cd lib && ./configure
 
-lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/$(PCILIB)
-setpci: setpci.o common.o lib/$(PCILIB)
+lspci: lspci.o ls-vpd.o ls-caps.o ls-ecaps.o ls-kernel.o ls-tree.o ls-map.o common.o lib/libpci.a
+setpci: setpci.o common.o lib/libpci.a
 
 LSPCIINC=lspci.h pciutils.h $(PCIINC)
 lspci.o: lspci.c $(LSPCIINC)
@@ -89,7 +89,7 @@ update-pciids: update-pciids.sh
 	chmod +x $@
 
 # The example of use of libpci
-example: example.o lib/$(PCILIB)
+example: example.o lib/libpci.a
 example.o: example.c $(PCIINC)
 
 %: %.o
