-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
105 lines (98 loc) · 3.93 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="JavaCardPlayground build">
<!-- Applet building dependencies -->
<property name="JC211" value="sdks/jc211_kit"/>
<property name="JC212" value="sdks/jc212_kit"/>
<property name="JC221" value="sdks/jc221_kit"/>
<property name="JC222" value="sdks/jc222_kit"/>
<property name="JC303" value="sdks/jc303_kit"/>
<property name="JC304" value="sdks/jc304_kit"/>
<property name="JC305" value="sdks/jc305u3_kit"/>
<property name="JCKIT" value="${JC304}"/>
<property name="src.dir" value="src/main/java"/>
<property name="build.dir" value="build"/>
<property name="cap.dir" value="${build.dir}/cap"/>
<property name="class.dir" value="${build.dir}/classes"/>
<property name="exp.dir" value="${build.dir}/exp"/>
<property name="deps.crypto" value="Crypto*,HMAC*,Secp*,Transient*,Finite*"/>
<property name="deps.secureapplet" value="Secure*,${deps.crypto},PinCode.java"/>
<!-- ant-javacard task from javacard.pro -->
<taskdef name="javacard" classname="pro.javacard.ant.JavaCard" classpath="ant-javacard.jar"/>
<!-- All included applets -->
<target name="Teapot" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/TeapotApplet.cap"
sources="${src.dir}/toys"
classes="${class.dir}/Teapot"
includes="TeapotApplet.java,DataEntry.java"
>
<applet class="toys.TeapotApplet" aid="B00B5111CA01"/>
</cap>
</javacard>
</target>
<target name="SecureApplet" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/SecureApplet.cap"
sources="${src.dir}/toys"
classes="${class.dir}/Secure"
includes="${deps.secureapplet}"
>
<applet class="toys.SecureApplet" aid="B00B5111FF01"/>
</cap>
</javacard>
</target>
<target name="MemoryCard" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/MemoryCardApplet.cap"
sources="${src.dir}/toys"
classes="${class.dir}/MemoryCard"
includes="${deps.secureapplet},DataEntry.java,MemoryCardApplet.java"
>
<applet class="toys.MemoryCardApplet" aid="B00B5111CB01"/>
</cap>
</javacard>
</target>
<target name="SingleUseKey" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/SingleUseKeyApplet.cap"
sources="${src.dir}/toys"
classes="${class.dir}/SingleUseKey"
includes="${deps.secureapplet},SingleUseKeyApplet.java"
>
<applet class="toys.SingleUseKeyApplet" aid="B00B5111CD01"/>
</cap>
</javacard>
</target>
<target name="BlindOracle" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/BlindOracleApplet.cap"
sources="${src.dir}/toys"
classes="${class.dir}/BlindOracle"
includes="${deps.secureapplet},BlindOracleApplet.java"
>
<applet class="toys.BlindOracleApplet" aid="B00B5111CE01"/>
</cap>
</javacard>
</target>
<target name="Bundle" depends="init">
<javacard jckit="${JCKIT}">
<cap output="${cap.dir}/Bundle.cap" sources="${src.dir}/toys" classes="${class.dir}/Bundle">
<applet class="toys.TeapotApplet" aid="B00B5111CF01"/>
<applet class="toys.SecureApplet" aid="B00B5111CF02"/>
<applet class="toys.MemoryCardApplet" aid="B00B5111CF03"/>
<applet class="toys.BlindOracleApplet" aid="B00B5111CF04"/>
<applet class="toys.SingleUseKeyApplet" aid="B00B5111CF05"/>
</cap>
</javacard>
</target>
<target name="all" depends="Teapot,SecureApplet,MemoryCard,SingleUseKey,BlindOracle,Bundle"/>
<target name="init">
<mkdir dir="${build.dir}"/>
<mkdir dir="${cap.dir}"/>
<mkdir dir="${class.dir}"/>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="clean-build" depends="clean,all"/>
</project>