mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GT-2667 added support for generating sleigh build.xml files
This commit is contained in:
parent
9edd697171
commit
7179c6de81
37 changed files with 377 additions and 1801 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,6 +23,7 @@ ghidra.repos.config
|
||||||
**/dist
|
**/dist
|
||||||
repositories/
|
repositories/
|
||||||
*.sla
|
*.sla
|
||||||
|
**/data/build.xml
|
||||||
|
|
||||||
# Misc files
|
# Misc files
|
||||||
*.setting
|
*.setting
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -461,8 +461,8 @@ public class Application {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
File file = getModuleFile(module, "build/os/" + Platform.CURRENT_PLATFORM.getDirectoryName(),
|
File file = getModuleFile(module,
|
||||||
exactFilename);
|
"build/os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), exactFilename);
|
||||||
|
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
file = getModuleFile(module, "os/" + Platform.CURRENT_PLATFORM.getDirectoryName(),
|
file = getModuleFile(module, "os/" + Platform.CURRENT_PLATFORM.getDirectoryName(),
|
||||||
|
@ -471,7 +471,8 @@ public class Application {
|
||||||
|
|
||||||
// Allow win32 to be used for win64 as fallback
|
// Allow win32 to be used for win64 as fallback
|
||||||
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_64) {
|
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_64) {
|
||||||
file = getModuleFile(module, "build/os/" + Platform.WIN_32.getDirectoryName(), exactFilename);
|
file = getModuleFile(module, "build/os/" + Platform.WIN_32.getDirectoryName(),
|
||||||
|
exactFilename);
|
||||||
}
|
}
|
||||||
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_64) {
|
if (file == null && Platform.CURRENT_PLATFORM == Platform.WIN_64) {
|
||||||
file = getModuleFile(module, "os/" + Platform.WIN_32.getDirectoryName(), exactFilename);
|
file = getModuleFile(module, "os/" + Platform.WIN_32.getDirectoryName(), exactFilename);
|
||||||
|
@ -492,7 +493,8 @@ public class Application {
|
||||||
|
|
||||||
private File getOSFileInAnyModule(String path) throws FileNotFoundException {
|
private File getOSFileInAnyModule(String path) throws FileNotFoundException {
|
||||||
|
|
||||||
File file = findModuleFile("build/os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), path);
|
File file =
|
||||||
|
findModuleFile("build/os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), path);
|
||||||
|
|
||||||
if (file == null) {
|
if (file == null) {
|
||||||
file = findModuleFile("os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), path);
|
file = findModuleFile("os/" + Platform.CURRENT_PLATFORM.getDirectoryName(), path);
|
||||||
|
@ -657,7 +659,7 @@ public class Application {
|
||||||
/**
|
/**
|
||||||
* Return the module root directory for the module with the given name.
|
* Return the module root directory for the module with the given name.
|
||||||
* @param moduleName the name of the module.
|
* @param moduleName the name of the module.
|
||||||
* @return the module root directory for the module with the given name.
|
* @return the module root directory for the module with the given name or null if not found.
|
||||||
*/
|
*/
|
||||||
public static ResourceFile getModuleRootDir(String moduleName) {
|
public static ResourceFile getModuleRootDir(String moduleName) {
|
||||||
checkAppInitialized();
|
checkAppInitialized();
|
||||||
|
|
|
@ -1,19 +1,27 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||||
<listEntry value="/Framework SoftwareModeling/src/main/java/ghidra/pcodeCPort/slgh_compile/SleighCompile.java"/>
|
<listEntry value="/Framework Utility/src/main/java/ghidra/GhidraLauncher.java"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||||
<listEntry value="1"/>
|
<listEntry value="1"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
|
||||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||||
</listAttribute>
|
</listAttribute>
|
||||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
<listAttribute key="org.eclipse.jdt.launching.MODULEPATH"/>
|
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-a "${project_loc}/data/languages""/>
|
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry path="5" projectName="Framework Utility" type="1"/> "/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Framework SoftwareModeling"/>
|
</listAttribute>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.awt.headless=true -Xmx2048M -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant"/>
|
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="ghidra.GhidraLauncher"/>
|
||||||
|
<listAttribute key="org.eclipse.jdt.launching.MODULEPATH">
|
||||||
|
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11" path="4" type="4"/> "/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="ghidra.pcodeCPort.slgh_compile.SleighCompileLauncher -i "${project_loc}/build/data/sleighArgs.txt" -a "${project_loc}/data/languages""/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Framework Utility"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.awt.headless=true -Xmx1048M -XX:+IgnoreUnrecognizedVMOptions -Djava.system.class.loader=ghidra.GhidraClassLoader -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -Xdock:name="Sleigh" -Dvisualvm.display.name=Sleigh"/>
|
||||||
</launchConfiguration>
|
</launchConfiguration>
|
||||||
|
|
|
@ -23,6 +23,10 @@ dependencies {
|
||||||
antlr "org.antlr:antlr:3.5.2"
|
antlr "org.antlr:antlr:3.5.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define classpath needed to execute sleigh compiler during development
|
||||||
|
// (see gradleScripts/processorUtils.gradle)
|
||||||
|
ext.sleighDevClasspath = project.sourceSets.main.runtimeClasspath.collect { it.absolutePath }.join(':')
|
||||||
|
|
||||||
def genSrcDir = 'generated-src/antlr/main'
|
def genSrcDir = 'generated-src/antlr/main'
|
||||||
generateGrammarSource {
|
generateGrammarSource {
|
||||||
|
|
||||||
|
|
|
@ -412,11 +412,39 @@ public class SleighLanguage implements Language {
|
||||||
String languageName = specName + ".slaspec";
|
String languageName = specName + ".slaspec";
|
||||||
ResourceFile languageFile = new ResourceFile(slaFile.getParentFile(), languageName);
|
ResourceFile languageFile = new ResourceFile(slaFile.getParentFile(), languageName);
|
||||||
|
|
||||||
|
// see gradleScripts/processorUtils.gradle for sleighArgs.txt generation
|
||||||
|
ResourceFile sleighArgsFile = null;
|
||||||
|
ResourceFile languageModule = Application.getModuleContainingResourceFile(languageFile);
|
||||||
|
if (languageModule != null) {
|
||||||
|
if (SystemUtilities.isInReleaseMode()) {
|
||||||
|
sleighArgsFile = new ResourceFile(languageModule, "data/sleighArgs.txt");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sleighArgsFile = new ResourceFile(languageModule, "build/data/sleighArgs.txt");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, String> defineMap;
|
||||||
|
String[] args;
|
||||||
|
if (sleighArgsFile != null && sleighArgsFile.isFile()) {
|
||||||
|
args = new String[] { "-i", sleighArgsFile.getAbsolutePath(),
|
||||||
|
languageFile.getAbsolutePath(), description.getSlaFile().getAbsolutePath() };
|
||||||
|
defineMap = new HashMap<>();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
args = new String[] { languageFile.getAbsolutePath(),
|
||||||
|
description.getSlaFile().getAbsolutePath() };
|
||||||
|
defineMap = ModuleDefinitionsMap.getModuleMap();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int returnCode = SleighCompileLauncher.runMain(
|
StringBuilder buf = new StringBuilder();
|
||||||
new String[] { languageFile.getAbsolutePath(),
|
for (String str : args) {
|
||||||
description.getSlaFile().getAbsolutePath() },
|
buf.append(str);
|
||||||
ModuleDefinitionsMap.getModuleMap());
|
buf.append(" ");
|
||||||
|
}
|
||||||
|
Msg.debug(this, "Sleigh compile: " + buf);
|
||||||
|
int returnCode = SleighCompileLauncher.runMain(args, defineMap);
|
||||||
if (returnCode != 0) {
|
if (returnCode != 0) {
|
||||||
throw new SleighException("Errors compiling " + languageFile.getAbsolutePath() +
|
throw new SleighException("Errors compiling " + languageFile.getAbsolutePath() +
|
||||||
" -- please check log messages for details");
|
" -- please check log messages for details");
|
||||||
|
|
|
@ -963,8 +963,7 @@ public class SleighCompile extends SleighBase {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (firstContextField != null && sym.getId() == firstContextField) {
|
if (firstContextField != null && sym.getId() == firstContextField) {
|
||||||
reportError(location,
|
reportError(location, sym.getName() +
|
||||||
sym.getName() +
|
|
||||||
" cannot be used to attach variables because it occurs at the lowest bit position in context at " +
|
" cannot be used to attach variables because it occurs at the lowest bit position in context at " +
|
||||||
sym.getLocation());
|
sym.getLocation());
|
||||||
continue;
|
continue;
|
||||||
|
@ -1569,7 +1568,9 @@ public class SleighCompile extends SleighBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the sleigh compiler.
|
* Run the sleigh compiler. This provides a direct means of invoking the
|
||||||
|
* compiler without using the launcher. The full SoftwareModeling classpath
|
||||||
|
* must be established including any dependencies.
|
||||||
* @param args compiler command line arguments
|
* @param args compiler command line arguments
|
||||||
* @throws JDOMException
|
* @throws JDOMException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
@ -1578,5 +1579,4 @@ public class SleighCompile extends SleighBase {
|
||||||
public static void main(String[] args) throws JDOMException, IOException, RecognitionException {
|
public static void main(String[] args) throws JDOMException, IOException, RecognitionException {
|
||||||
System.exit(SleighCompileLauncher.runMain(args, new HashMap<String, String>()));
|
System.exit(SleighCompileLauncher.runMain(args, new HashMap<String, String>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,17 +21,18 @@ import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.antlr.runtime.*;
|
import org.antlr.runtime.*;
|
||||||
import org.antlr.runtime.tree.CommonTreeNodeStream;
|
import org.antlr.runtime.tree.CommonTreeNodeStream;
|
||||||
import org.jdom.*;
|
import org.jdom.JDOMException;
|
||||||
import org.jdom.input.SAXBuilder;
|
|
||||||
|
|
||||||
|
import generic.jar.ResourceFile;
|
||||||
import generic.stl.IteratorSTL;
|
import generic.stl.IteratorSTL;
|
||||||
import ghidra.GhidraApplicationLayout;
|
import ghidra.GhidraApplicationLayout;
|
||||||
import ghidra.GhidraLaunchable;
|
import ghidra.GhidraLaunchable;
|
||||||
|
import ghidra.framework.Application;
|
||||||
|
import ghidra.framework.ApplicationConfiguration;
|
||||||
import ghidra.pcodeCPort.context.SleighError;
|
import ghidra.pcodeCPort.context.SleighError;
|
||||||
import ghidra.pcodeCPort.translate.XmlError;
|
|
||||||
import ghidra.sleigh.grammar.*;
|
import ghidra.sleigh.grammar.*;
|
||||||
import ghidra.util.Msg;
|
import ghidra.util.Msg;
|
||||||
import ghidra.util.xml.XmlUtilities;
|
import ghidra.util.SystemUtilities;
|
||||||
import utilities.util.FileResolutionResult;
|
import utilities.util.FileResolutionResult;
|
||||||
import utilities.util.FileUtilities;
|
import utilities.util.FileUtilities;
|
||||||
|
|
||||||
|
@ -63,6 +64,11 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
@Override
|
@Override
|
||||||
public void launch(GhidraApplicationLayout layout, String[] args)
|
public void launch(GhidraApplicationLayout layout, String[] args)
|
||||||
throws JDOMException, IOException, RecognitionException {
|
throws JDOMException, IOException, RecognitionException {
|
||||||
|
|
||||||
|
// Initialize the application
|
||||||
|
ApplicationConfiguration configuration = new ApplicationConfiguration();
|
||||||
|
Application.initializeApplication(layout, configuration);
|
||||||
|
|
||||||
System.exit(runMain(args, new HashMap<String, String>()));
|
System.exit(runMain(args, new HashMap<String, String>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +93,14 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
|
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
Msg.info(SleighCompile.class, "USAGE: sleigh [-x] [-dNAME=VALUE] inputfile outputfile");
|
Msg.info(SleighCompile.class, "Usage: sleigh [options...] [<infile.slaspec> [<outfile.sla>] | -a <directory-path>]");
|
||||||
|
Msg.info(SleighCompile.class, " sleigh [options...] <infile.slaspec> [<outfile.sla>]");
|
||||||
|
Msg.info(SleighCompile.class, " <infile.slaspec> source slaspec file to be compiled");
|
||||||
|
Msg.info(SleighCompile.class, " <outfile.sla> optional output sla file (infile.sla assumed)");
|
||||||
|
Msg.info(SleighCompile.class, " or");
|
||||||
|
Msg.info(SleighCompile.class, " sleigh [options...] -a <directory-path>");
|
||||||
|
Msg.info(SleighCompile.class, " <directory-path> directory to have all slaspec files compiled");
|
||||||
|
Msg.info(SleighCompile.class, " options:");
|
||||||
Msg.info(SleighCompile.class, " -x turns on parser debugging");
|
Msg.info(SleighCompile.class, " -x turns on parser debugging");
|
||||||
Msg.info(SleighCompile.class, " -u print warnings for unnecessary pcode instructions");
|
Msg.info(SleighCompile.class, " -u print warnings for unnecessary pcode instructions");
|
||||||
Msg.info(SleighCompile.class, " -l report pattern conflicts");
|
Msg.info(SleighCompile.class, " -l report pattern conflicts");
|
||||||
|
@ -95,9 +108,9 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
Msg.info(SleighCompile.class, " -t print warnings for dead temporaries");
|
Msg.info(SleighCompile.class, " -t print warnings for dead temporaries");
|
||||||
Msg.info(SleighCompile.class, " -e enforce use of 'local' keyword for temporaries");
|
Msg.info(SleighCompile.class, " -e enforce use of 'local' keyword for temporaries");
|
||||||
Msg.info(SleighCompile.class, " -f print warnings for unused token fields");
|
Msg.info(SleighCompile.class, " -f print warnings for unused token fields");
|
||||||
Msg.info(SleighCompile.class, " -DNAME=VALUE defines a preprocessor macro NAME with value VALUE");
|
Msg.info(SleighCompile.class, " -DNAME=VALUE defines a preprocessor macro NAME with value VALUE (option may be repeated)");
|
||||||
Msg.info(SleighCompile.class, " OR sleigh -a directory-root");
|
Msg.info(SleighCompile.class, " -dMODULE defines a preprocessor macro MODULE with a value of its module path (option may be repeated)");
|
||||||
Msg.info(SleighCompile.class, " compiles all .slaspec files to .sla files anywhere under directory-root");
|
Msg.info(SleighCompile.class, " -i <options-file> inject options from specified file");
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -114,6 +127,13 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
if (args[i].charAt(0) != '-') {
|
if (args[i].charAt(0) != '-') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if (args[i].charAt(1) == 'i') {
|
||||||
|
// inject options from file specified by next argument
|
||||||
|
args = injectOptionsFromFile(args, ++i);
|
||||||
|
if (args == null) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (args[i].charAt(1) == 'D') {
|
else if (args[i].charAt(1) == 'D') {
|
||||||
String preproc = args[i].substring(2);
|
String preproc = args[i].substring(2);
|
||||||
int pos = preproc.indexOf('=');
|
int pos = preproc.indexOf('=');
|
||||||
|
@ -125,6 +145,18 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
String value = preproc.substring(pos + 1);
|
String value = preproc.substring(pos + 1);
|
||||||
preprocs.put(name, value); // Preprocessor macro definitions
|
preprocs.put(name, value); // Preprocessor macro definitions
|
||||||
}
|
}
|
||||||
|
else if (args[i].charAt(1) == 'd') {
|
||||||
|
String moduleName = args[i].substring(2);
|
||||||
|
ResourceFile module = Application.getModuleRootDir(moduleName);
|
||||||
|
if (module == null || !module.isDirectory()) {
|
||||||
|
Msg.error(SleighCompile.class,
|
||||||
|
"Failed to resolve module reference: " + args[i]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
Msg.debug(SleighCompile.class,
|
||||||
|
"Sleigh resolved module: " + moduleName + "=" + module.getAbsolutePath());
|
||||||
|
preprocs.put(moduleName, module.getAbsolutePath()); // Preprocessor macro definitions
|
||||||
|
}
|
||||||
else if (args[i].charAt(1) == 'u') {
|
else if (args[i].charAt(1) == 'u') {
|
||||||
unnecessaryPcodeWarning = true;
|
unnecessaryPcodeWarning = true;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +187,16 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i < args.length - 2) {
|
||||||
|
Msg.error(SleighCompile.class, "Too many parameters");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (allMode) {
|
if (allMode) {
|
||||||
|
if (i == args.length) {
|
||||||
|
Msg.error(SleighCompile.class, "Missing input directory path");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
String directory = args[i];
|
String directory = args[i];
|
||||||
File dir = new File(directory);
|
File dir = new File(directory);
|
||||||
if (!dir.exists() || !dir.isDirectory()) {
|
if (!dir.exists() || !dir.isDirectory()) {
|
||||||
|
@ -195,6 +236,7 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
return -totalFailures;
|
return -totalFailures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// single file compile
|
||||||
SleighCompile compiler = new SleighCompile();
|
SleighCompile compiler = new SleighCompile();
|
||||||
initCompiler(compiler, preprocs, unnecessaryPcodeWarning, lenientConflict, allNopWarning,
|
initCompiler(compiler, preprocs, unnecessaryPcodeWarning, lenientConflict, allNopWarning,
|
||||||
deadTempWarning, unusedFieldWarning, enforceLocalKeyWord);
|
deadTempWarning, unusedFieldWarning, enforceLocalKeyWord);
|
||||||
|
@ -202,60 +244,71 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
Msg.error(SleighCompile.class, "Missing input file name");
|
Msg.error(SleighCompile.class, "Missing input file name");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (i < args.length - 2) {
|
|
||||||
Msg.error(SleighCompile.class, "Too many parameters");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
filein = args[i];
|
filein = args[i];
|
||||||
if (i < args.length - 1) {
|
if (i < args.length - 1) {
|
||||||
fileout = args[i + 1];
|
fileout = args[i + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
String fileinExamine = filein;
|
String baseName = filein;
|
||||||
int extInPos = fileinExamine.indexOf(FILE_IN_DEFAULT_EXT);
|
if (filein.toLowerCase().endsWith(FILE_IN_DEFAULT_EXT)) {
|
||||||
boolean autoExtInSet = false;
|
baseName = filein.substring(0, filein.length() - FILE_IN_DEFAULT_EXT.length());
|
||||||
String fileinPreExt = "";
|
|
||||||
if (extInPos == -1) {// No Extension Given...
|
|
||||||
// cout << "No Ext Given" << endl;
|
|
||||||
fileinPreExt = fileinExamine;
|
|
||||||
fileinExamine += FILE_IN_DEFAULT_EXT;
|
|
||||||
filein = fileinExamine;
|
|
||||||
// cout << "filein = " << filein << endl;
|
|
||||||
autoExtInSet = true;
|
|
||||||
}
|
}
|
||||||
else {
|
filein = baseName + FILE_IN_DEFAULT_EXT;
|
||||||
fileinPreExt = fileinExamine.substring(0, extInPos);
|
|
||||||
}
|
|
||||||
// cout << "fileinPreExt = " << fileinPreExt << endl;
|
|
||||||
|
|
||||||
if (fileout != null) {
|
String baseOutName = fileout;
|
||||||
String fileoutExamine = fileout;
|
if (fileout == null) {
|
||||||
int extOutPos = fileoutExamine.indexOf(FILE_OUT_DEFAULT_EXT);
|
baseOutName = baseName;
|
||||||
if (extOutPos == -1) {// No Extension Given...
|
|
||||||
// cout << "No Ext Given" << endl;
|
|
||||||
fileoutExamine += FILE_OUT_DEFAULT_EXT;
|
|
||||||
fileout = fileoutExamine;
|
|
||||||
// cout << "fileout = " << fileout << endl;
|
|
||||||
}
|
}
|
||||||
retval = run_compilation(filein, fileout, compiler);
|
else if (fileout.toLowerCase().endsWith(FILE_OUT_DEFAULT_EXT)) {
|
||||||
|
baseOutName = fileout.substring(0, fileout.length() - FILE_OUT_DEFAULT_EXT.length());
|
||||||
}
|
}
|
||||||
else {
|
fileout = baseOutName + FILE_OUT_DEFAULT_EXT;
|
||||||
// First determine whether or not to use Run_XML...
|
|
||||||
if (autoExtInSet) {// Assumed format of at least "sleigh file" .
|
return run_compilation(filein, fileout, compiler);
|
||||||
// "sleigh file.slaspec file.sla"
|
|
||||||
String fileoutSTR = fileinPreExt;
|
|
||||||
fileoutSTR += FILE_OUT_DEFAULT_EXT;
|
|
||||||
fileout = fileoutSTR;
|
|
||||||
// cout << "generated fileout = " << fileout << endl;
|
|
||||||
retval = run_compilation(filein, fileout, compiler);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
retval = run_xml(filein, compiler);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String[] injectOptionsFromFile(String[] args, int index) {
|
||||||
|
if (index >= args.length) {
|
||||||
|
Msg.error(SleighCompile.class, "Missing options input file name");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return retval;
|
|
||||||
|
File optionsFile = new File(args[index]);
|
||||||
|
if (!optionsFile.isFile()) {
|
||||||
|
Msg.error(SleighCompile.class,
|
||||||
|
"Options file not found: " + optionsFile.getAbsolutePath());
|
||||||
|
if (SystemUtilities.isInDevelopmentMode()) {
|
||||||
|
Msg.error(SleighCompile.class,
|
||||||
|
"Eclipse language module must be selected and 'gradle prepdev' prevously run");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
ArrayList<String> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i <= index; i++) {
|
||||||
|
list.add(args[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
try (BufferedReader r = new BufferedReader(new FileReader(optionsFile))) {
|
||||||
|
String option = r.readLine();
|
||||||
|
while (option != null) {
|
||||||
|
option = option.trim();
|
||||||
|
if (option.length() != 0 && !option.startsWith("#")) {
|
||||||
|
list.add(option);
|
||||||
|
}
|
||||||
|
option = r.readLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IOException e) {
|
||||||
|
Msg.error(SleighCompile.class,
|
||||||
|
"Reading options file failed (" + optionsFile.getName() + "): " + e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = index + 1; i < args.length; i++) {
|
||||||
|
list.add(args[i]);
|
||||||
|
}
|
||||||
|
return list.toArray(new String[list.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int run_compilation(String filein, String fileout, SleighCompile compiler)
|
private static int run_compilation(String filein, String fileout, SleighCompile compiler)
|
||||||
|
@ -384,64 +437,4 @@ public class SleighCompileLauncher implements GhidraLaunchable {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int run_xml(String filein, SleighCompile compiler)
|
|
||||||
throws JDOMException, IOException, RecognitionException {
|
|
||||||
FileInputStream s = new FileInputStream(new File(filein));
|
|
||||||
Document doc = null;
|
|
||||||
String specfileout = "";
|
|
||||||
String specfilein = "";
|
|
||||||
|
|
||||||
try {
|
|
||||||
SAXBuilder builder = XmlUtilities.createSecureSAXBuilder(false, false);
|
|
||||||
doc = builder.build(s);
|
|
||||||
}
|
|
||||||
catch (XmlError err) {
|
|
||||||
Msg.error(SleighCompile.class,
|
|
||||||
"Unable to parse single input file as XML spec: " + filein, err);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
s.close();
|
|
||||||
|
|
||||||
Element el = doc.getRootElement();
|
|
||||||
for (;;) {
|
|
||||||
List<?> list = el.getChildren();
|
|
||||||
Iterator<?> iter = list.iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
el = (Element) iter.next();
|
|
||||||
if (el.getName().equals("processorfile")) {
|
|
||||||
specfileout = el.getText();
|
|
||||||
List<?> atts = el.getAttributes();
|
|
||||||
Iterator<?> i = atts.iterator();
|
|
||||||
while (i.hasNext()) {
|
|
||||||
Attribute att = (Attribute) i.next();
|
|
||||||
if (att.getName().equals("slaspec")) {
|
|
||||||
specfilein = att.getValue();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
compiler.setPreprocValue(att.getName(), att.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (el.getName().equals("language_spec")) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (el.getName().equals("language_description")) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!iter.hasNext()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (specfilein.length() == 0) {
|
|
||||||
Msg.error(SleighCompile.class, "Input slaspec file was not specified in " + filein);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (specfileout.length() == 0) {
|
|
||||||
Msg.error(SleighCompile.class, "Output sla file was not specified in " + filein);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return run_compilation(specfilein, specfileout, compiler);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleighCompile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="buildSleighClasspathDev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/build/classes/main"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/build/classes/main"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/build/classes/main"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="buildSleighClasspathDist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleighCompile" depends="buildSleighClasspathDist, buildSleighClasspathDev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="-u"/>
|
|
||||||
<arg value="-t"/>
|
|
||||||
<arg value="-l"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="-l"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,73 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleigh-compile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin/main"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin/main"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin/main"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build-sleigh-classpath-dist" unless="devmode">
|
|
||||||
<property name="framework.path" value="../../../Framework"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleigh-compile" depends="build-sleigh-classpath-dist, build-sleigh-classpath-dev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -6,3 +6,5 @@ JsonDoclet/.project||GHIDRA||||END|
|
||||||
JsonDoclet/Module.manifest||GHIDRA||||END|
|
JsonDoclet/Module.manifest||GHIDRA||||END|
|
||||||
JsonDoclet/build.gradle||GHIDRA||||END|
|
JsonDoclet/build.gradle||GHIDRA||||END|
|
||||||
build.gradle||GHIDRA||||END|
|
build.gradle||GHIDRA||||END|
|
||||||
|
sleighDevBuild.template||GHIDRA||||END|
|
||||||
|
sleighDistBuild.template||GHIDRA||||END|
|
||||||
|
|
57
GhidraBuild/BuildFiles/sleighDevBuild.template
Normal file
57
GhidraBuild/BuildFiles/sleighDevBuild.template
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
+ Compile sleigh languages within this source language module.
|
||||||
|
+ Sleigh compiler options are read from build/data/sleighArgs.txt which is
|
||||||
|
+ updated by "gradle prepdev" based upon specification within module's build.gradle.
|
||||||
|
+
|
||||||
|
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
||||||
|
+ From command line (requires ant install)
|
||||||
|
+ - cd to data directory containing this file
|
||||||
|
+ - run ant
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project name="privateBuildDeveloper" default="sleigh-compile">
|
||||||
|
|
||||||
|
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
||||||
|
|
||||||
|
<target name="sleigh-compile">
|
||||||
|
|
||||||
|
<path id="sleigh.class.path">
|
||||||
|
<pathelement path="${gradleSleighDevClasspath}"/>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<available classname="\${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
||||||
|
|
||||||
|
<fail unless="sleigh.compile.exists" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NOTE: sleighArgs.txt contains sleigh compile which are established by build.gradle
|
||||||
|
for the corresponding language module and output to this file with the execution of
|
||||||
|
the gradle prepDev or distribution build tasks. The '-a' and '-i' options
|
||||||
|
should not be specified by build.gradle. Other sleigh compile options may be specified
|
||||||
|
within build.gradle by inclusion of the sleighCompile args following all
|
||||||
|
'apply' statements. Example:
|
||||||
|
|
||||||
|
sleighCompile {
|
||||||
|
args '-l'
|
||||||
|
}
|
||||||
|
|
||||||
|
Available options may be determined by executing the sleigh script.
|
||||||
|
(see Ghidra/RuntimeScripts/Linux/support, Ghidra/RuntimeScripts/Windows/support)
|
||||||
|
-->
|
||||||
|
|
||||||
|
<java classname="\${sleigh.compile.class}"
|
||||||
|
classpathref="sleigh.class.path"
|
||||||
|
fork="true"
|
||||||
|
failonerror="true">
|
||||||
|
<jvmarg value="-Xmx2048M"/>
|
||||||
|
<arg value="-i"/>
|
||||||
|
<arg value="../build/data/sleighArgs.txt"/>
|
||||||
|
<arg value="-a"/>
|
||||||
|
<arg value="./languages"/>
|
||||||
|
</java>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
50
GhidraBuild/BuildFiles/sleighDistBuild.template
Normal file
50
GhidraBuild/BuildFiles/sleighDistBuild.template
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
+ Compile sleigh languages within this distribution language module.
|
||||||
|
+ Sleigh compiler options are read from the sleighArgs.txt file.
|
||||||
|
+
|
||||||
|
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
||||||
|
+ From command line (requires ant install)
|
||||||
|
+ - cd to data directory containing this file
|
||||||
|
+ - run ant
|
||||||
|
-->
|
||||||
|
|
||||||
|
<project name="privateBuildDistribution" default="sleigh-compile">
|
||||||
|
|
||||||
|
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
||||||
|
|
||||||
|
<target name="sleigh-compile">
|
||||||
|
|
||||||
|
<property name="framework.path" value="../../../Framework"/>
|
||||||
|
|
||||||
|
<path id="sleigh.class.path">
|
||||||
|
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset dir="${framework.path}/Generic/lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
<fileset dir="${framework.path}/Utility/lib">
|
||||||
|
<include name="*.jar"/>
|
||||||
|
</fileset>
|
||||||
|
</path>
|
||||||
|
|
||||||
|
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
||||||
|
|
||||||
|
<fail unless="sleigh.compile.exists" />
|
||||||
|
|
||||||
|
<java classname="${sleigh.compile.class}"
|
||||||
|
classpathref="sleigh.class.path"
|
||||||
|
fork="true"
|
||||||
|
failonerror="true">
|
||||||
|
<jvmarg value="-Xmx2048M"/>
|
||||||
|
<arg value="-i"/>
|
||||||
|
<arg value="sleighArgs.txt"/>
|
||||||
|
<arg value="-a"/>
|
||||||
|
<arg value="./languages"/>
|
||||||
|
</java>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</project>
|
|
@ -12,6 +12,7 @@ data/languages/skel.opinion||GHIDRA||||END|
|
||||||
data/languages/skel.pspec||GHIDRA||||END|
|
data/languages/skel.pspec||GHIDRA||||END|
|
||||||
data/languages/skel.sinc||GHIDRA||||END|
|
data/languages/skel.sinc||GHIDRA||||END|
|
||||||
data/languages/skel.slaspec||GHIDRA||||END|
|
data/languages/skel.slaspec||GHIDRA||||END|
|
||||||
|
data/sleighArgs.txt||GHIDRA||||END|
|
||||||
extension.properties||GHIDRA||||END|
|
extension.properties||GHIDRA||||END|
|
||||||
ghidra_scripts/README.txt||GHIDRA||||END|
|
ghidra_scripts/README.txt||GHIDRA||||END|
|
||||||
lib/README.txt||GHIDRA||||END|
|
lib/README.txt||GHIDRA||||END|
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
+ Compile sleigh languages within this module.
|
|
||||||
+ Eclipse: right-click on this file and choose menu item "Run As->Ant Build"
|
|
||||||
+ From command line (requires ant install)
|
|
||||||
+ - cd to data directory containing this file
|
|
||||||
+ - run ant
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project name="privateBuildDeveloper" default="sleighCompile">
|
|
||||||
|
|
||||||
<property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/>
|
|
||||||
|
|
||||||
<property name="repo.dir" value="../../../.." />
|
|
||||||
<property name="repo.marker.dir" value="${repo.dir}/.git" />
|
|
||||||
|
|
||||||
<!--Import optional ant properties. GhidraDev Eclipse plugin produces this so this file can find the Ghidra installation-->
|
|
||||||
<import file="../.antProperties.xml" optional="true" />
|
|
||||||
|
|
||||||
<condition property="devmode">
|
|
||||||
<available file="${repo.marker.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<target name="buildSleighClasspathDev" if="devmode">
|
|
||||||
|
|
||||||
<property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/>
|
|
||||||
<property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<pathelement location="${framework.path}/SoftwareModeling/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Generic/bin"/>
|
|
||||||
<pathelement location="${framework.path}/Utility/bin"/>
|
|
||||||
<fileset dir="${libs.path}">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="buildSleighClasspathDist" unless="devmode">
|
|
||||||
|
|
||||||
<!-- If language module is detached from installation, get Ghidra installation directory path from imported properties -->
|
|
||||||
<condition property="framework.path" value="${ghidra.install.dir}/Ghidra/Framework" else="../../../Framework">
|
|
||||||
<available file="${ghidra.install.dir}" type="dir" />
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<path id="sleigh.class.path">
|
|
||||||
<fileset dir="${framework.path}/SoftwareModeling/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Generic/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${framework.path}/Utility/lib">
|
|
||||||
<include name="*.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</path>
|
|
||||||
<available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="sleighCompile" depends="buildSleighClasspathDist, buildSleighClasspathDev">
|
|
||||||
|
|
||||||
<fail unless="sleigh.compile.exists" />
|
|
||||||
|
|
||||||
<java classname="${sleigh.compile.class}"
|
|
||||||
classpathref="sleigh.class.path"
|
|
||||||
fork="true"
|
|
||||||
failonerror="true">
|
|
||||||
<jvmarg value="-Xmx2048M"/>
|
|
||||||
<arg value="-a"/>
|
|
||||||
<arg value="./languages"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
6
GhidraBuild/Skeleton/data/sleighArgs.txt
Normal file
6
GhidraBuild/Skeleton/data/sleighArgs.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Add sleigh compiler options to this file (one per line) which will
|
||||||
|
# be used when compiling each language within this module.
|
||||||
|
# All options should start with a '-' character.
|
||||||
|
#
|
||||||
|
# IMPORTANT: The -a option should NOT be specified
|
||||||
|
#
|
|
@ -223,6 +223,7 @@ task assembleCommon (type: Copy) {
|
||||||
|
|
||||||
from (p.projectDir.toString() + "/data") {
|
from (p.projectDir.toString() + "/data") {
|
||||||
into { getZipPath(p) + "/data" }
|
into { getZipPath(p) + "/data" }
|
||||||
|
exclude 'build.xml' // associated with language modules (dev use only)
|
||||||
}
|
}
|
||||||
|
|
||||||
from (BIN_REPO + '/' + getZipPath(p) + "/data") {
|
from (BIN_REPO + '/' + getZipPath(p) + "/data") {
|
||||||
|
@ -697,6 +698,7 @@ subprojects { p ->
|
||||||
exclude 'bin/**'
|
exclude 'bin/**'
|
||||||
exclude 'src/**'
|
exclude 'src/**'
|
||||||
exclude 'test/**'
|
exclude 'test/**'
|
||||||
|
exclude 'data/build.xml'
|
||||||
exclude 'developer_scripts'
|
exclude 'developer_scripts'
|
||||||
|
|
||||||
// general place where extension modules can put files that won't get
|
// general place where extension modules can put files that won't get
|
||||||
|
|
|
@ -120,6 +120,7 @@ def Map<String, List<String>> getIpForModule(Project p) {
|
||||||
exclude "build.gradle"
|
exclude "build.gradle"
|
||||||
exclude "**/Misc/Tips.htm"
|
exclude "**/Misc/Tips.htm"
|
||||||
exclude "**/*.sla"
|
exclude "**/*.sla"
|
||||||
|
exclude "**/data/build.xml" // language build file (generated for dev only)
|
||||||
exclude "**/.gradle/**"
|
exclude "**/.gradle/**"
|
||||||
exclude "**/.settings/**"
|
exclude "**/.settings/**"
|
||||||
exclude "**/.vs/**"
|
exclude "**/.vs/**"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
/*****************************************************************************************
|
/*****************************************************************************************
|
||||||
*
|
*
|
||||||
* Create a configuration so the a dependency can be declared on the the software modeling
|
* Create a configuration so the a dependency can be declared on the the software modeling
|
||||||
|
@ -14,6 +13,64 @@ dependencies {
|
||||||
sleighConfig project(':SoftwareModeling')
|
sleighConfig project(':SoftwareModeling')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************************
|
||||||
|
*
|
||||||
|
* Task to write sleigh compiler args to build/data/sleighArgs.txt for use with sleigh
|
||||||
|
* external sleigh compiler.
|
||||||
|
*
|
||||||
|
*****************************************************************************************/
|
||||||
|
task saveSleighArgs {
|
||||||
|
def sleighArgsFile = file("build/data/sleighArgs.txt")
|
||||||
|
outputs.files sleighArgsFile
|
||||||
|
outputs.upToDateWhen { false }
|
||||||
|
doLast {
|
||||||
|
sleighArgsFile.withWriter { out->
|
||||||
|
project.sleighCompile.args.each { a->
|
||||||
|
// don't save -a option
|
||||||
|
if (!"-a".equals(a)) {
|
||||||
|
out.println a
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepDev.dependsOn(saveSleighArgs)
|
||||||
|
|
||||||
|
/*****************************************************************************************
|
||||||
|
*
|
||||||
|
* Task to write sleigh build.xml file for use is development mode only.
|
||||||
|
*
|
||||||
|
*****************************************************************************************/
|
||||||
|
task writeSleighDevBuild {
|
||||||
|
def templateFilePath = project(':BuildFiles').projectDir.toString() + "/sleighDevBuild.template"
|
||||||
|
doLast {
|
||||||
|
// Generate build.xml with injected classpath for running sleigh compiler
|
||||||
|
copy {
|
||||||
|
into "data"
|
||||||
|
from (templateFilePath) {
|
||||||
|
rename { "build.xml" }
|
||||||
|
expand ( [ 'gradleSleighDevClasspath': project(':SoftwareModeling').sleighDevClasspath ] )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prepDev.dependsOn(writeSleighDevBuild)
|
||||||
|
|
||||||
|
/*****************************************************************************************
|
||||||
|
*
|
||||||
|
* Write sleigh build.xml file for each language module into assembleCommon
|
||||||
|
*
|
||||||
|
*****************************************************************************************/
|
||||||
|
rootProject.assembleCommon {
|
||||||
|
into (getZipPath(this.project) + "/data") {
|
||||||
|
from (rootProject.projectDir.toString() + "/GhidraBuild/BuildFiles/sleighDistBuild.template") {
|
||||||
|
rename { "build.xml" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************************
|
/*****************************************************************************************
|
||||||
*
|
*
|
||||||
* Task to compile language files using the sleigh compiler.
|
* Task to compile language files using the sleigh compiler.
|
||||||
|
@ -27,12 +84,11 @@ task sleighCompile (type: JavaExec) {
|
||||||
classpath configurations.sleighConfig
|
classpath configurations.sleighConfig
|
||||||
main = 'ghidra.pcodeCPort.slgh_compile.SleighCompile'
|
main = 'ghidra.pcodeCPort.slgh_compile.SleighCompile'
|
||||||
|
|
||||||
args '-a'
|
|
||||||
|
|
||||||
// Delay adding the directory argument until the first part of the execution phase, so
|
// Delay adding the directory argument until the first part of the execution phase, so
|
||||||
// that any extra args added by a project override will be added to the arg list before
|
// that any extra args added by a project override will be added to the arg list before
|
||||||
// this argument.
|
// these arguments.
|
||||||
doFirst {
|
doFirst {
|
||||||
|
args '-a'
|
||||||
args './data/languages'
|
args './data/languages'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +96,9 @@ task sleighCompile (type: JavaExec) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The task that copies the common files to the distribution folder must depend on
|
// The task that copies the common files to the distribution folder must depend on
|
||||||
// this sleigh task before executing.
|
// the sleigh tasks before executing.
|
||||||
rootProject.assembleCommon.dependsOn(sleighCompile)
|
rootProject.assembleCommon.dependsOn(sleighCompile)
|
||||||
|
rootProject.assembleCommon.dependsOn(saveSleighArgs)
|
||||||
|
|
||||||
// For all tasks of type:Test (i.e., integrationTest, cunitTest, etc.), add a task dependency to
|
// For all tasks of type:Test (i.e., integrationTest, cunitTest, etc.), add a task dependency to
|
||||||
// sleighCompile. The sleighCompile task inputs and outputs are defined such that the *.slaspec
|
// sleighCompile. The sleighCompile task inputs and outputs are defined such that the *.slaspec
|
||||||
|
@ -53,7 +110,8 @@ rootProject.assembleCommon.dependsOn(sleighCompile)
|
||||||
// The tasks of type:Test do not know about sleighCompile during their configuration phase, so the
|
// The tasks of type:Test do not know about sleighCompile during their configuration phase, so the
|
||||||
// dependency must be done in this gradle file.
|
// dependency must be done in this gradle file.
|
||||||
rootProject.subprojects.findAll { subproject ->
|
rootProject.subprojects.findAll { subproject ->
|
||||||
if (!isSupportModule(subproject)) {
|
boolean isSupporProject = subproject.findProperty("isSupportProject") ?: false;
|
||||||
|
if (!isSupporProject) {
|
||||||
subproject.tasks.withType(Test).all {
|
subproject.tasks.withType(Test).all {
|
||||||
it.dependsOn(sleighCompile)
|
it.dependsOn(sleighCompile)
|
||||||
}
|
}
|
||||||
|
@ -91,25 +149,8 @@ def taskOutputs = fileTree(dir: 'data/languages', include: '**/*.sla')
|
||||||
sleighCompile.inputs.files (taskInputs)
|
sleighCompile.inputs.files (taskInputs)
|
||||||
sleighCompile.outputs.files (taskOutputs)
|
sleighCompile.outputs.files (taskOutputs)
|
||||||
|
|
||||||
task eclipseSleighLauncher(type: WriteEclipseLauncher) {
|
// define the sleigh compile inputs to saveSleighArgs to limit task creation to language modules
|
||||||
dest = forName("Sleigh $project.name")
|
saveSleighArgs.inputs.files (taskInputs)
|
||||||
isRunFave = true
|
|
||||||
isDbgFave = false
|
|
||||||
|
|
||||||
classpath = configurations.sleighConfig
|
|
||||||
main 'ghidra.pcodeCPort.slgh_compile.SleighCompile'
|
|
||||||
|
|
||||||
args '-a'
|
|
||||||
|
|
||||||
// Delay adding the directory argument until the first part of the execution phase, so
|
|
||||||
// that any extra args added by a project override will be added to the arg list before
|
|
||||||
// this argument.
|
|
||||||
doFirst {
|
|
||||||
args './data/languages'
|
|
||||||
}
|
|
||||||
|
|
||||||
jvmArgs '-Xmx2048M'
|
|
||||||
}
|
|
||||||
|
|
||||||
def isSupportModule(Project p) {
|
def isSupportModule(Project p) {
|
||||||
return p.findProperty("isSupportProject") ?: false
|
return p.findProperty("isSupportProject") ?: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue