默认情况下,该项目不会在 Mac OS X 上创建动态库。我对似乎有效的 makefile 做了一个快速补丁:
From a3d6793c5f291d253b8e7aa99e5534503808c325 Mon Sep 17 00:00:00 2001
From: Carl Norum <carl@norum.ca>
Date: Thu, 31 Jan 2013 16:59:24 -0800
Subject: [PATCH] Patch to generate a dynamic library.
---
Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 8532e70..11805dd 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ install: $(PGMS) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR)
/usr/bin/install -s -m 755 $(PGMS) $(DESTDIR)$(BINDIR)
./librarian.sh install libmarkdown VERSION $(DESTDIR)$(LIBDIR)
/usr/bin/install -m 444 mkdio.h $(DESTDIR)$(INCDIR)
+ /usr/bin/install -m 755 $(MKDLIB).dylib $(DESTDIR)$(LIBDIR)
install.everything: install install.samples install.man
@@ -82,7 +83,7 @@ theme: theme.o $(MKDLIB) mkdio.h
mkd2html: mkd2html.o $(MKDLIB) mkdio.h
$(CC) $(LFLAGS) -o mkd2html mkd2html.o -lmarkdown
-markdown: main.o pgm_options.o $(MKDLIB)
+markdown: main.o pgm_options.o $(MKDLIB) $(MKDLIB).dylib
$(CC) $(LFLAGS) -o markdown main.o pgm_options.o -lmarkdown
makepage: makepage.c pgm_options.o $(MKDLIB) mkdio.h
@@ -94,6 +95,9 @@ pgm_options.o: pgm_options.c mkdio.h config.h
main.o: main.c mkdio.h config.h
$(CC) -I. -c main.c
+$(MKDLIB).dylib: $(OBJS)
+ $(CC) -dynamiclib -o $(MKDLIB).dylib $(OBJS)
+
$(MKDLIB): $(OBJS)
./librarian.sh make $(MKDLIB) VERSION $(OBJS)
--
1.7.12.1
您可以在运行配置脚本之后和构建之前将其应用于您的树,它应该可以解决。如果您只想要简单的部分,请运行:
cc -Wno-implicit-int -I. -dynamiclib -o libmarkdown.dylib mkdio.o markdown.o dumptree.o generate.o resource.o docheader.o version.o toc.o css.o xml.o Csio.o xmlpage.o basename.o emmatch.o github_flavoured.o setup.o tags.o html5.o flags.o
在构建常规包后的命令行上应该为您生成动态库。然后你可以自己安装它。