From cbf052e35e1dc19b2bd3a17f33ae2c395cc6b886 Mon Sep 17 00:00:00 2001 From: andrius bentkus Date: Wed, 11 Apr 2012 22:22:52 +0200 Subject: [PATCH] Add nmake build target for windows. Expose functions that are needed in the windows dynamic library with a definition file (sundown.def) --- Makefile.win | 33 +++++++++++++++++++++++++++++++++ sundown.def | 20 ++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Makefile.win create mode 100644 sundown.def diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..ea668b2 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,33 @@ + +CFLAGS=/O2 /EHsc /I"src/" /I"examples"/ /I"html"/ +CC=cl + +SUNDOWN_SRC=\ + src\markdown.obj \ + src\stack.obj \ + src\buffer.obj \ + src\autolink.obj \ + html\html.obj \ + html\html_smartypants.obj \ + html\houdini_html_e.obj \ + html\houdini_href_e.obj + +all: sundown.dll sundown.exe + +sundown.dll: $(SUNDOWN_SRC) sundown.def + $(CC) $(SUNDOWN_SRC) sundown.def /link /DLL $(LDFLAGS) /out:$@ + +sundown.exe: examples\sundown.obj $(SUNDOWN_SRC) + $(CC) examples\sundown.obj $(SUNDOWN_SRC) /link $(LDFLAGS) /out:$@ + +# housekeeping +clean: + del $(SUNDOWN_SRC) + del sundown.dll sundown.exe + del sundown.exp sundown.lib + +# generic object compilations + +.c.obj: + $(CC) $(CFLAGS) /c $< /Fo$@ + diff --git a/sundown.def b/sundown.def new file mode 100644 index 0000000..7cd41bb --- /dev/null +++ b/sundown.def @@ -0,0 +1,20 @@ +LIBRARY SUNDOWN +EXPORTS + sdhtml_renderer + sdhtml_toc_renderer + sdhtml_smartypants + bufgrow + bufnew + bufcstr + bufprefix + bufput + bufputs + bufputc + bufrelease + bufreset + bufslurp + bufprintf + sd_markdown_new + sd_markdown_render + sd_markdown_free + sd_version \ No newline at end of file