 +THIRD_LIB = $(OUT)/libmupdf-third.so
 +THREAD_LIB = $(OUT)/libmupdf-threads.so
 +PKCS7_LIB = $(OUT)/libmupdf-pkcs7.so
-
+ 
 -$(MUPDF_LIB) : $(MUPDF_OBJ)
 +$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_LIB) $(THREAD_LIB)
 +	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf.so -Wl,--no-undefined $(THIRD_LIBS)

 $(THREAD_LIB) : $(THREAD_OBJ)
+	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupdf-threads.so -Wl,--no-undefined -lpthread
 $(PKCS7_LIB) : $(PKCS7_OBJ)
+	$(LINK_CMD) -shared -Wl,-soname -Wl,libmupfs-pkcs7.so

-INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
+INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB) $(PKCS7_LIB)

 # --- Main tools and viewers ---


--- Makefile.orig	2020-03-25 11:02:34.874709800 -0500
+++ Makefile	2020-04-03 13:06:00.681559332 -0500
@@ -20,7 +20,7 @@
 # Do not specify CFLAGS or LIBS on the make invocation line - specify
 # XCFLAGS or XLIBS instead. Make ignores any lines in the makefile that
