|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | + + Compile sleigh languages within this module. |
| 5 | + + Eclipse: right-click on this file and choose menu item "Run As->Ant Build" |
| 6 | + + From command line (requires ant install) |
| 7 | + + - cd to data directory containing this file |
| 8 | + + - run ant |
| 9 | + --> |
| 10 | + |
| 11 | +<project name="privateBuildDeveloper" default="sleighCompile"> |
| 12 | + |
| 13 | + <property name="sleigh.compile.class" value="ghidra.pcodeCPort.slgh_compile.SleighCompile"/> |
| 14 | + |
| 15 | + <property name="repo.dir" value="../../../.." /> |
| 16 | + <property name="repo.marker.dir" value="${repo.dir}/.git" /> |
| 17 | + |
| 18 | + <!--Import optional ant properties. GhidraDev Eclipse plugin produces this so this file can find the Ghidra installation--> |
| 19 | + <import file="../.antProperties.xml" optional="true" /> |
| 20 | + |
| 21 | + <condition property="devmode"> |
| 22 | + <available file="${repo.marker.dir}" type="dir" /> |
| 23 | + </condition> |
| 24 | + |
| 25 | + <target name="buildSleighClasspathDev" if="devmode"> |
| 26 | + |
| 27 | + <property name="framework.path" value="${repo.dir}/../ghidra.git/Ghidra/Framework"/> |
| 28 | + <property name="libs.path" value="${repo.dir}/../ghidra.bin.git/ExternalLibraries/libsForRuntime"/> |
| 29 | + |
| 30 | + <path id="sleigh.class.path"> |
| 31 | + <pathelement location="${framework.path}/SoftwareModeling/bin"/> |
| 32 | + <pathelement location="${framework.path}/Generic/bin"/> |
| 33 | + <pathelement location="${framework.path}/Utility/bin"/> |
| 34 | + <fileset dir="${libs.path}"> |
| 35 | + <include name="*.jar"/> |
| 36 | + </fileset> |
| 37 | + </path> |
| 38 | + |
| 39 | + <available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/> |
| 40 | + |
| 41 | + </target> |
| 42 | + |
| 43 | + <target name="buildSleighClasspathDist" unless="devmode"> |
| 44 | + |
| 45 | + <!-- If language module is detached from installation, get Ghidra installation directory path from imported properties --> |
| 46 | + <condition property="framework.path" value="${ghidra.install.dir}/Ghidra/Framework" else="../../../Framework"> |
| 47 | + <available file="${ghidra.install.dir}" type="dir" /> |
| 48 | + </condition> |
| 49 | + |
| 50 | + <path id="sleigh.class.path"> |
| 51 | + <fileset dir="${framework.path}/SoftwareModeling/lib"> |
| 52 | + <include name="*.jar"/> |
| 53 | + </fileset> |
| 54 | + <fileset dir="${framework.path}/Generic/lib"> |
| 55 | + <include name="*.jar"/> |
| 56 | + </fileset> |
| 57 | + <fileset dir="${framework.path}/Utility/lib"> |
| 58 | + <include name="*.jar"/> |
| 59 | + </fileset> |
| 60 | + </path> |
| 61 | + <available classname="${sleigh.compile.class}" classpathref="sleigh.class.path" property="sleigh.compile.exists"/> |
| 62 | + |
| 63 | + </target> |
| 64 | + |
| 65 | + <target name="sleighCompile" depends="buildSleighClasspathDist, buildSleighClasspathDev"> |
| 66 | + |
| 67 | + <fail unless="sleigh.compile.exists" /> |
| 68 | + |
| 69 | + <java classname="${sleigh.compile.class}" |
| 70 | + classpathref="sleigh.class.path" |
| 71 | + fork="true" |
| 72 | + failonerror="true"> |
| 73 | + <jvmarg value="-Xmx2048M"/> |
| 74 | + <arg value="-a"/> |
| 75 | + <arg value="./languages"/> |
| 76 | + </java> |
| 77 | + |
| 78 | + </target> |
| 79 | + |
| 80 | +</project> |
0 commit comments