summaryrefslogtreecommitdiff
path: root/pkg/cmark/gen.lua
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/cmark/gen.lua')
-rw-r--r--pkg/cmark/gen.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkg/cmark/gen.lua b/pkg/cmark/gen.lua
new file mode 100644
index 00000000..fc058678
--- /dev/null
+++ b/pkg/cmark/gen.lua
@@ -0,0 +1,38 @@
+cflags{
+ '-I $dir',
+}
+
+pkg.hdrs = {
+ copy('$outdir/include', '$srcdir/src', {'cmark.h'}),
+ copy('$outdir/include', '$dir', {'cmark_export.h', 'cmark_version.h'}),
+ install=true,
+}
+
+lib('libcmark.a', expand{'src/', {
+ 'cmark.c',
+ 'node.c',
+ 'iterator.c',
+ 'blocks.c',
+ 'inlines.c',
+ 'scanners.c',
+ 'utf8.c',
+ 'buffer.c',
+ 'references.c',
+ 'render.c',
+ 'man.c',
+ 'xml.c',
+ 'html.c',
+ 'commonmark.c',
+ 'latex.c',
+ 'houdini_href_e.c',
+ 'houdini_html_e.c',
+ 'houdini_html_u.c',
+ 'cmark_ctype.c',
+}})
+file('lib/libcmark.a', '644', '$outdir/libcmark.a')
+
+exe('cmark', {'src/main.c', 'libcmark.a'})
+file('bin/cmark', '755', '$outdir/cmark')
+man{'man/man1/cmark.1'}
+
+fetch 'git'