Skip to content
Snippets Groups Projects
Commit f1870a64 authored by Sergey Zverlov's avatar Sergey Zverlov
Browse files

No commit message

No commit message
parent 71fd9cc2
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,6 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.executable;
import static org.fortiss.af3.generator.common.utils.SourceModelElementFactory.createStaticContentSourceUnit;
import java.util.List;
import java.util.Map;
......@@ -28,7 +26,6 @@ import org.fortiss.af3.generator.common.model.source.SourcePackage;
import org.fortiss.af3.platform.language.executable.TransmissionUnitExecutableBase;
import org.fortiss.af3.platform.model.ExecutionUnit;
import org.fortiss.af3.platform.model.TransmissionUnit;
import org.fortiss.af3.platform.raspberry.templates.RaspberryTemplateLoader;
/**
*
......@@ -52,19 +49,6 @@ public class CANBusExecutable extends TransmissionUnitExecutableBase<Transmissio
public void createAllFiles(SourcePackage pack, Map<ExecutionUnit, List<Port>> euPortsPair,
Map<ExecutionUnit, List<Component>> euComponentList, Component topComponent,
int deploymentID) {
createMakeFileUsingTemplate(pack, "test_targetName");
createMakeMKUsingTemplate(pack);
}
/** Creates a Makefile for an executable with a certain target name. */
private void createMakeFileUsingTemplate(SourcePackage pack, String targetName) {
String content = RaspberryTemplateLoader.getMakeFileTemplate(targetName).toString();
pack.addUnit(createStaticContentSourceUnit("Makefile", content, false));
}
/** Creates the make.mk file. */
private void createMakeMKUsingTemplate(SourcePackage pack) {
String content = RaspberryTemplateLoader.getMakeMkTemplate().toString();
pack.addUnit(createStaticContentSourceUnit("make.mk", content, false));
}
}
......@@ -55,17 +55,11 @@ public class RaspberryTemplateLoader {
/** Returns the Template of a Makefile for the Raspberry Platform. */
public static StringTemplate getMakeFileTemplate(String binaryName) {
/*
* return loadResourceSTG(RaspberryTemplateLoader.class, "MakeFileTemplate").getInstanceOf(
* "MakeFileTemplate");
*/
StringTemplate template =
loadResourceSTG(RaspberryTemplateLoader.class, "MakeFileTemplate").getInstanceOf(
"MakeFileTemplate");
template.setAttribute("binaryName", binaryName);
return template;
}
/** Returns the Template of make.mk file for the Raspberry Platform. */
......@@ -75,7 +69,6 @@ public class RaspberryTemplateLoader {
"MakeMkTemplate");
return template;
}
/**
* @param string
* @return
......@@ -87,13 +80,4 @@ public class RaspberryTemplateLoader {
template.setAttribute("headerFile", headerFile);
return template;
}
public static StringTemplate getMakeMkTemplate() {
StringTemplate template =
loadResourceSTG(RaspberryTemplateLoader.class, "MakeMkTemplate").getInstanceOf(
"MakeMkTemplate");
// template.setAttribute("binaryName", binaryName);
return template;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment