-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
45 lines (31 loc) · 1.31 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="samdos">
<property name="python" location="d:/sam/python36/python.exe" />
<property name="pyz80" location="../pyz80/pyz80.py" />
<property name="simcoupe" location="C:\Program Files (x86)\SimCoupe\SimCoupe.exe" />
<property name="cmp" location="res/cmp_v1b/cmp.exe" />
<target name="compare" description="compare assembled with reference" depends="assemble" xmlns:unless="ant:unless">
<property name="file1" location="obj/samdos2" />
<property name="file2" location="res/samdos2.reference.bin" />
<condition property="identical" value="true">
<filesmatch file1="${file1}" file2="${file2}" />
</condition>
<exec executable="${cmp}" unless:true="${identical}">
<arg value="${file1}" />
<arg value="${file2}" />
</exec>
<fail message="compiled file '${file1}' does not match reference binary '${file2}'" unless:true="${identical}" />
</target>
<target name="assemble">
<exec executable="${python}" failonerror="true">
<arg value="${pyz80}" />
<arg value="--mapfile=obj/samdos2.map" />
<arg value="--obj=obj/samdos2" />
<arg value="src/samdos.s" />
</exec>
</target>
<target name="clean" description="clean obj">
<delete dir="obj" />
<mkdir dir="obj" />
</target>
</project>