ack/util/ego/build.lua
George Koehler a7bb4ec4b1 Fixes for compiling ego with -DTRACE
- In share/debug.c, undo my mistake in commit 9037d13 by changing
   vfprintf back to fprintf in OUTTRACE.

 - In ud/ud.c, move the trace output from stdout to stderr, because
   stdout has ego's output file, which becomes opt2's input file.  If
   trace output goes to stdout, it gets prepended to the output file,
   and opt2 errors with "wrong input file".

I also edit both build.lua files so ego depends on its header files;
this part isn't needed for -DTRACE.

One can now use -DTRACE by adding it to the cflags in both build.lua
files.
2018-03-01 13:19:38 -05:00

60 lines
1.1 KiB
Lua

local function build_ego(name)
cprogram {
name = name,
srcs = { "./"..name.."/*.c" },
deps = {
"./"..name.."/*.h",
"util/ego/share+lib",
"modules/src/em_data+lib",
"h+emheaders",
},
vars = {
["+cflags"] = {"-DVERBOSE", "-DNOTCOMPACT"}
}
}
end
build_ego("bo")
build_ego("ca")
build_ego("cf")
build_ego("cj")
build_ego("cs")
build_ego("ic")
build_ego("il")
build_ego("lv")
build_ego("sp")
build_ego("sr")
build_ego("ud")
cprogram {
name = "em_ego",
srcs = { "./em_ego/em_ego.c" },
deps = {
"modules/src/print+lib",
"modules/src/string+lib",
"modules/src/system+lib",
"modules+headers",
"h+emheaders",
}
}
installable {
name = "pkg",
map = {
["$(PLATDEP)/em_ego"] = "+em_ego",
["$(PLATDEP)/ego/bo"] = "+bo",
["$(PLATDEP)/ego/ca"] = "+ca",
["$(PLATDEP)/ego/cf"] = "+cf",
["$(PLATDEP)/ego/cj"] = "+cj",
["$(PLATDEP)/ego/cs"] = "+cs",
["$(PLATDEP)/ego/ic"] = "+ic",
["$(PLATDEP)/ego/il"] = "+il",
["$(PLATDEP)/ego/lv"] = "+lv",
["$(PLATDEP)/ego/ra"] = "./ra+ra",
["$(PLATDEP)/ego/sp"] = "+sp",
["$(PLATDEP)/ego/sr"] = "+sr",
["$(PLATDEP)/ego/ud"] = "+ud",
"./descr+pkg",
}
}