summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2014-10-19 23:13:06 -0400
committerMartin Mares <mj@ucw.cz>2014-11-01 16:41:00 +0100
commit8d1cb3d74a34971d89602ccd6fc03cf3ab72003a (patch)
tree0a54a65de2cd4e30ee00d0f43de6fe6f04d099ef /Makefile
parent444b85776bed1bba8678da8993bbc4ae7f78e572 (diff)
downloadpciutils-8d1cb3d74a34971d89602ccd6fc03cf3ab72003a.tar.gz
Fix building shared libraries on Darwin
The original patch by Apple did not support building shared libraries on Darwin. This corrects that oversight. It also fixes a few other miscellaneous issues like incorrect platform detection and the lack of an entry in the README file. Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0a21ee8..9589ea3 100644
--- a/Makefile
+++ b/Makefile
@@ -114,7 +114,11 @@ install: all
$(INSTALL) -c -m 644 lspci.8 setpci.8 update-pciids.8 $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -c -m 644 pcilib.7 $(DESTDIR)$(MANDIR)/man7
ifeq ($(SHARED),yes)
- ln -sf $(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so$(ABI_VERSION)
+ifeq ($(LIBEXT),dylib)
+ ln -sf $(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME)$(ABI_VERSION).$(LIBEXT)
+else
+ ln -sf $(PCILIB) $(DESTDIR)$(LIBDIR)/$(LIBNAME).$(LIBEXT)$(ABI_VERSION)
+endif
endif
ifeq ($(SHARED),yes)
@@ -130,7 +134,11 @@ install-lib: $(PCIINC_INS) lib/$(PCILIBPC) install-pcilib
$(INSTALL) -c -m 644 $(PCIINC_INS) $(DESTDIR)$(INCDIR)/pci
$(INSTALL) -c -m 644 lib/$(PCILIBPC) $(DESTDIR)$(PKGCFDIR)
ifeq ($(SHARED),yes)
- ln -sf $(LIBNAME).so$(ABI_VERSION) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
+ifeq ($(LIBEXT),dylib)
+ ln -sf $(LIBNAME)$(ABI_VERSION).$(LIBEXT) $(DESTDIR)$(LIBDIR)/$(LIBNAME).$(LIBEXT)
+else
+ ln -sf $(LIBNAME).$(LIBEXT)$(ABI_VERSION) $(DESTDIR)$(LIBDIR)/$(LIBNAME).$(LIBEXT)
+endif
endif
uninstall: all