Create makefile output
This commit is contained in:
parent
4a5eb97ab2
commit
1e2c524e51
|
@ -0,0 +1,18 @@
|
|||
use super::super::types::OverlaySlot;
|
||||
use tool_helper::{Error, Output};
|
||||
|
||||
pub fn write(output: &mut Output, overlay_desc: &Vec<OverlaySlot>) -> Result<(), Error> {
|
||||
if !overlay_desc.is_empty() {
|
||||
write!(output, "OVERLAYSECTION = ")?;
|
||||
|
||||
for slot in overlay_desc {
|
||||
for overlay in &slot.sections {
|
||||
write!(output, ".{} ", overlay.name)?;
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(output, "")?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -19,6 +19,7 @@ fn run_main() -> Result<(), Error> {
|
|||
let input = mkoverlay::types::json_reader::read_config(open_input(Some(PathBuf::from("../Tests/Overlay.json")))?)?;
|
||||
let mut output = open_output(None)?;
|
||||
|
||||
mkoverlay::creator::makefile::write(&mut output, &input)?;
|
||||
mkoverlay::creator::ldscript::write(&mut output, &input)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue