--- a/Makefile
+++ b/Makefile
@@ -449,7 +449,7 @@
 incdir ?= $(prefix)/include
 mandir ?= $(prefix)/share/man
 docdir ?= $(prefix)/share/doc/mupdf
-pydir ?= $(shell python3 -c "import sysconfig; print(sysconfig.get_path('platlib'))")
+pydir ?= $(libdir)/python$(shell python3 -c "import sysconfig; print(sysconfig.get_python_version())")/site-packages
 SO_INSTALL_MODE ?= 644
 
 third: $(THIRD_LIB)
@@ -660,17 +656,13 @@
 
 install-shared-c: install-shared-check install-libs install-headers
 
-install-shared-c++: install-shared-c c++
+install-shared-c++:
 	install -m 644 platform/c++/include/mupdf/*.h $(DESTDIR)$(incdir)/mupdf
-	install -m $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/
-ifneq ($(OS),OpenBSD)
-	ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)
-	ln -sf libmupdfcpp.$(SO)$(SO_VERSION) $(DESTDIR)$(libdir)/libmupdfcpp.$(SO)$(SO_VERSION_MAJOR)
-endif
+	install -vDm $(SO_INSTALL_MODE) $(OUT)/libmupdfcpp.$(SO) -t $(DESTDIR)$(bindir)/
 
-install-shared-python: install-shared-c++ python
+install-shared-python:
 	install -d $(DESTDIR)$(pydir)/mupdf
-	install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.$(SO) $(DESTDIR)$(pydir)/mupdf
+	install -m $(SO_INSTALL_MODE) $(OUT)/_mupdf.so $(DESTDIR)$(pydir)/mupdf/_mupdf.pyd
 	install -m 644 $(OUT)/mupdf.py $(DESTDIR)$(pydir)/mupdf/__init__.py
 
 else
