diff --git a/Makefile b/Makefile
index 557f28e..7edc4ae 100644
--- a/Makefile
+++ b/Makefile
@@ -277,13 +277,15 @@ MUPDF_LIB_IMPORT = $(OUT)/libmupdf_$(SO).a
 LIBS_TO_INSTALL_IN_BIN = $(MUPDF_LIB)
 LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB_IMPORT)
 else
-LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB)
+LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)
 endif
 ifneq ($(USE_SYSTEM_GLUT),yes)
-THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
+THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.$(SO)
+LIBS_TO_INSTALL_IN_LIB += $(THIRD_GLUT_LIB)
 endif
-THREAD_LIB = $(OUT)/libmupdf-threads.a
-PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
+THIRD_LIB = $(OUT)/libmupdf-third.$(SO)
+THREAD_LIB = $(OUT)/libmupdf-threads.$(SO)
+PKCS7_LIB = $(OUT)/libmupdf-pkcs7.$(SO)
 
 $(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
 $(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
