summaryrefslogtreecommitdiff
path: root/pkg/cproc/gen.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-06 00:01:37 -0700
committerMichael Forney <mforney@mforney.org>2019-07-06 16:22:36 -0700
commitd7cc628c0f81cc119dd8ee02023eaae9d8f3e998 (patch)
tree3fffd83a3a1614dd53319b26c1b0d73dfde6a5ff /pkg/cproc/gen.lua
parenta3b6be9a0e6dfa4e85bc49d59d7b816605fc29b3 (diff)
Add cproc
Diffstat (limited to 'pkg/cproc/gen.lua')
-rw-r--r--pkg/cproc/gen.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkg/cproc/gen.lua b/pkg/cproc/gen.lua
new file mode 100644
index 00000000..bba3f8aa
--- /dev/null
+++ b/pkg/cproc/gen.lua
@@ -0,0 +1,32 @@
+cflags{
+ '-std=c11', '-pedantic',
+ '-Wall', '-Wno-switch', '-Wno-parentheses',
+ '-I $dir',
+}
+
+cc('util.c')
+
+exe('cproc', {'driver.c', 'util.c.o'})
+exe('cproc-qbe', {
+ 'decl.c',
+ 'eval.c',
+ 'expr.c',
+ 'init.c',
+ 'main.c',
+ 'map.c',
+ 'pp.c',
+ 'qbe.c',
+ 'scan.c',
+ 'scope.c',
+ 'siphash.c',
+ 'stmt.c',
+ 'targ.c',
+ 'token.c',
+ 'tree.c',
+ 'type.c',
+ 'util.c.o',
+})
+file('bin/cproc', '755', '$outdir/cproc')
+file('bin/cproc-qbe', '755', '$outdir/cproc-qbe')
+
+fetch 'git'