1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<?xml version="1.0"?>
<project name="Cecil" default="cecil" basedir=".">
<property name="debug" value="true" />
<property name="optimize" value="false" />
<property name="build.dir" value="bin" />
<!-- allow properties to be customized in external file" -->
<include buildfile="build.properties" if="${file::exists('build.properties')}" />
<fileset id="all-files">
<include name="./**/*.cs" />
<exclude name="CodeGen/**/*.*" />
</fileset>
<target name="clean">
<foreach item="Folder" property="f">
<in>
<items>
<include name="**/bin" />
<include name="**/obj" />
<include name="${build.dir}" />
</items>
</in>
<do>
<delete dir="${f}" failonerror="false"/>
</do>
</foreach>
</target>
<target name="init">
<mkdir dir="${build.dir}" />
</target>
<target name="cecil" depends="init">
<csc output="${build.dir}/Mono.Cecil.dll"
target="library" debug="${debug}" unsafe="false" optimize="${optimize}">
<sources refid="all-files"/>
</csc>
</target>
<target name="compactframework" depends="init" description="compiles cecil to run on the CompactFramework 1.0">
<property name="compactframework.defines" value="CF_1_0" />
<call target="compactframework-compilation" />
</target>
<target name="compactframework2" depends="init" description="compiles cecil to run on the CompactFramework 2.0">
<property name="compactframework.defines" value="CF_2_0" />
<call target="compactframework-compilation" />
</target>
<target name="compactframework-compilation">
<csc output="${build.dir}/Mono.Cecil.dll"
target="library" debug="${debug}" unsafe="false" optimize="${optimize}"
noconfig="true" nostdlib="true"
define="${compactframework.defines}">
<sources refid="all-files" />
<references basedir="${compactframework.dir}">
<include name="mscorlib.dll" />
<include name="System.dll" />
</references>
</csc>
</target>
<target name="codegen">
<exec program="ruby" commandline="cecil-gen.rb" workingdir="CodeGen" />
</target>
</project>
|