ack/mach/proto/mcg/build.lua
David Given 4546dd5f22 Massive grammar overhaul and refactor. Hacked in support for predicates, where
instructions can be turned on and off based on their parameters. New lexer
using a lexer. Now quite a lot of the way towards being a real instruction
selector.
2016-09-21 00:43:10 +02:00

48 lines
761 B
Lua

normalrule {
name = "ircodes",
outleaves = { "ircodes.h", "ircodes.c" },
ins = {
"./ircodes.sh",
"./ir.dat"
},
commands = {
"%{ins[1]} %{ins[2]} %{outs[1]} %{outs[2]}"
}
}
cprogram {
name = "mcg",
srcs = {
"./*.c",
matching(filenamesof("+ircodes"), "%.c$")
},
deps = {
"+ircodes",
"h+emheaders",
"modules+headers",
"modules/src/alloc+lib",
"modules/src/em_code+lib_k",
"modules/src/em_data+lib",
"modules/src/idf+lib",
"modules/src/read_em+lib_kv",
"modules/src/system+lib",
"./*.h",
"util/mcgg+mcgg",
},
vars = {
["+cflags"] = {
"-Werror-implicit-function-declaration",
"-Wint-conversion"
}
}
}
-- Just for test purposes for now
installable {
name = "pkg",
map = {
["$(PLATDEP)/mcg"] = "+mcg"
}
}