diff -ru mupdf-1.1-source.org/Makefile mupdf-1.1-source/Makefile
--- mupdf-1.1-source.org/Makefile	2012-09-12 09:12:08.012999683 +0200
+++ mupdf-1.1-source/Makefile	2012-09-12 10:17:51.093999177 +0200
@@ -34,6 +34,7 @@
 
 CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $<
 AR_CMD = $(QUIET_AR) $(AR) cr $@ $^
+SO_CMD = $(QUIET_LINK) $(CC) -fPIC --shared -Wl,-soname -Wl,`basename $@` $^ -o $@
 LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@
 
@@ -73,7 +74,8 @@
 
 # --- Fitz, MuPDF, MuXPS and MuCBZ library ---
 
-FITZ_LIB := $(OUT)/libfitz.a
+FITZ_LIB_A := $(OUT)/libfitz.a
+FITZ_LIB_SO := $(OUT)/libfitz.so.1.1
 
 FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c))
 FITZ_SRC := $(filter-out draw_simple_scale.c, $(FITZ_SRC))
@@ -81,12 +83,19 @@
 MUXPS_SRC := $(notdir $(wildcard xps/*.c))
 MUCBZ_SRC := $(notdir $(wildcard cbz/*.c))
 
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o))
-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o))
-
-libs: $(FITZ_LIB) $(THIRD_LIBS)
+FITZ_OBJECT_FILES := $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) \
+                     $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) \
+                     $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) \
+                     $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o))
+
+$(FITZ_LIB_A) : $(FITZ_OBJECT_FILES)
+$(FITZ_LIB_SO) : $(FITZ_OBJECT_FILES)
+
+libs: $(FITZ_LIB_A) $(FITZ_LIB_SO) $(THIRD_LIBS)
+
+$(FITZ_LIB_SO) :
+	$(SO_CMD)
+	@cd $(OUT) && ln -s `basename $(FITZ_LIB_SO)` libfitz.so
 
 # --- Generated CMAP and FONT files ---
 
@@ -134,14 +143,14 @@
 # --- Tools and Apps ---
 
 MUDRAW := $(addprefix $(OUT)/, mudraw)
-$(MUDRAW) : $(FITZ_LIB) $(THIRD_LIBS)
+$(MUDRAW) : $(FITZ_LIB_A) $(THIRD_LIBS)
 
 MUBUSY := $(addprefix $(OUT)/, mubusy)
-$(MUBUSY) : $(addprefix $(OUT)/, mupdfclean.o mupdfextract.o mupdfinfo.o mupdfposter.o mupdfshow.o) $(FITZ_LIB) $(THIRD_LIBS)
+$(MUBUSY) : $(addprefix $(OUT)/, mupdfclean.o mupdfextract.o mupdfinfo.o mupdfposter.o mupdfshow.o) $(FITZ_LIB_A) $(THIRD_LIBS)
 
 ifeq "$(NOX11)" ""
 MUVIEW := $(OUT)/mupdf
-$(MUVIEW) : $(FITZ_LIB) $(THIRD_LIBS)
+$(MUVIEW) : $(FITZ_LIB_A) $(THIRD_LIBS)
 $(MUVIEW) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o)
 	$(LINK_CMD) $(X11_LIBS)
 endif
@@ -166,7 +175,9 @@
 
 install: $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUBUSY)
 	install -d $(bindir) $(libdir) $(incdir) $(mandir)/man1
-	install $(FITZ_LIB) $(libdir)
+	install $(FITZ_LIB_A) $(libdir)
+	install $(FITZ_LIB_SO) $(libdir)
+	install $(OUT)/libfitz.so $(libdir)
 	install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir)
 	install $(MUVIEW) $(MUDRAW) $(MUBUSY) $(bindir)
 	install $(wildcard apps/man/*.1) $(mandir)/man1
@@ -175,7 +186,7 @@
 
 all: all-nojs
 
-all-nojs: $(THIRD_LIBS) $(FITZ_LIB) $(MUVIEW) $(MUDRAW) $(MUBUSY)
+all-nojs: $(THIRD_LIBS) $(FITZ_LIB_A) $(FITZ_LIB_SO) $(MUVIEW) $(MUDRAW) $(MUBUSY)
 
 third: $(THIRD_LIBS)
 
Nur in mupdf-1.1-source: Makefile~.
diff -ru mupdf-1.1-source.org/Makerules mupdf-1.1-source/Makerules
--- mupdf-1.1-source.org/Makerules	2012-09-12 09:12:08.037999646 +0200
+++ mupdf-1.1-source/Makerules	2012-09-12 10:17:04.900999214 +0200
@@ -3,7 +3,7 @@
 OS ?= $(shell uname)
 OS := $(OS:MINGW%=MINGW)
 
-CFLAGS += -Wall
+CFLAGS += -Wall -fPIC
 
 ifeq "$(build)" "debug"
 CFLAGS += -pipe -g -DDEBUG
Nur in mupdf-1.1-source: Makerules~.