main([File, OutDir]) ->
Dir = filename:dirname(File),
Defs = [
warn_export_all,
warn_export_vars,
warn_shadow_vars,
warn_obsolete_guard,
warn_unused_import,
report,
report,
{i, Dir ++ "/include"},
{i, Dir ++ "/../include"},
{i, Dir ++ "/../../include"},
{outdir, OutDir}],
compile:file(File, Defs), %再次编译,这次会生成目标代码
Result;