dev.fron.io rc / master patches / lowdown-shared.patch
master

Tree @master (Download .tar.gz)

lowdown-shared.patch @masterraw · history · blame

diff --git a/Makefile b/Makefile
index 955f737..2c9532c 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ REGRESS_ARGS	+= "--parse-no-autolink"
 REGRESS_ARGS	+= "--parse-no-cmark"
 REGRESS_ARGS	+= "--parse-no-deflists"
 
-all: lowdown lowdown-diff lowdown.pc
+all: lowdown lowdown-diff liblowdown.so lowdown.pc
 
 www: $(HTMLS) $(PDFS) $(THUMBS) lowdown.tar.gz lowdown.tar.gz.sha512
 
@@ -101,6 +101,9 @@ lowdown-diff: lowdown
 liblowdown.a: $(OBJS) $(COMPAT_OBJS)
 	$(AR) rs $@ $(OBJS) $(COMPAT_OBJS)
 
+liblowdown.so: $(OBJS) $(COMPAT_OBJS)
+	$(CC) -shared -o $@ $(OBJS) $(COMPAT_OBJS) $(LDFLAGS)
+
 install: all
 	mkdir -p $(DESTDIR)$(BINDIR)
 	mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
@@ -111,7 +114,7 @@ install: all
 	$(INSTALL_DATA) lowdown.pc $(DESTDIR)$(LIBDIR)/pkgconfig
 	$(INSTALL_PROGRAM) lowdown $(DESTDIR)$(BINDIR)
 	$(INSTALL_PROGRAM) lowdown-diff $(DESTDIR)$(BINDIR)
-	$(INSTALL_LIB) liblowdown.a $(DESTDIR)$(LIBDIR)
+	$(INSTALL_LIB) liblowdown.so $(DESTDIR)$(LIBDIR)
 	$(INSTALL_DATA) lowdown.h $(DESTDIR)$(INCLUDEDIR)
 	for f in $(MANS) ; do \
 		name=`basename $$f .html` ; \
@@ -199,7 +202,7 @@ main.o: lowdown.h
 
 clean:
 	rm -f $(OBJS) $(COMPAT_OBJS) main.o
-	rm -f lowdown lowdown-diff liblowdown.a lowdown.pc
+	rm -f lowdown lowdown-diff liblowdown.so lowdown.pc
 	rm -f index.xml diff.xml diff.diff.xml README.xml lowdown.tar.gz.sha512 lowdown.tar.gz
 	rm -f $(PDFS) $(HTMLS) $(THUMBS)