OSDN Git Service

c762e1ad122a64a5d8943ce40b84ddcdb2e20ed6
[nxt-jsp/lejos_nxj.git] / nxtOSEK / lejos_nxj / src / libnxt / build.xml
1 <!-- ant file to make libnxt, runc, nxjflash and jlibnxt -->
2
3 <project name="libnxt" default="make" basedir=".">
4         <property name="endian" value="_NXT_LITTLE_ENDIAN"/>
5         <!-- cpptasks task & type def 
6         <taskdef resource="cpptasks.tasks">
7           <classpath>
8             <pathelement location="../jtools/3rdparty/lib/cpptasks.jar"/>
9           </classpath>
10         </taskdef>
11         <typedef resource="cpptasks.types">
12           <classpath>
13             <pathelement location="../jtools/3rdparty/lib/cpptasks.jar"/>
14           </classpath>
15         </typedef>
16         -->
17         
18         <!-- cleans all compilation artifacts -->
19         <target name="clean" description="cleans all compilation artifacts">
20                 <delete>
21                         <fileset dir=".">
22                                 <include name="*.o"/>
23                         </fileset>
24                 </delete>
25         </target>
26         
27         <!-- make libnxt and its utilities --> 
28         <target name="make" depends="clean,libnxt,nxjflash,jlibnxt" description="makes libnxt and its tools">
29         </target>
30
31         <!-- make libnxt --> 
32         <target name="libnxt" description="makes libnxt">
33                 <cc subsystem="console" 
34                                 outfile="nxt"
35                                 objdir="." 
36                                 outtype="static" 
37                                 debug="false"
38                             exceptions="false"
39                             rtti="true"
40                             optimize="speed"
41                                 name="gcc">
42                             <compilerarg value="-Wall"/>
43                             <compilerarg value="-std=gnu99"/>
44                             <compilerarg value="-g"/>
45                             <compilerarg value="-ggdb"/>
46                             <compilerarg value="-D${endian}"/>
47                                 <fileset dir=".">
48                                         <include name="error.c"/>
49                                         <include name="firmware.c"/>
50                                         <include name="flash_routine.c"/>                                       <include name="error.c"/>
51                                         <include name="flash.c"/> 
52                                         <include name="lowlevel.c"/>
53                                         <include name="samba.c"/>
54                                 </fileset>
55                                 <includepath>
56                                         <pathelement location="."/>
57                                 </includepath>
58                                 <versioninfo refid="libnxt"/>
59                 </cc>
60         </target>
61         
62         <!-- make runc --> 
63         <target name="runc" description="makes runc utility">
64                 <cc subsystem="console" 
65                                 outfile="runc"
66                                 objdir="." 
67                                 outtype="executable" 
68                                 debug="false"
69                             exceptions="false"
70                             rtti="true"
71                             optimize="speed"
72                                 name="gcc">
73                             <compilerarg value="-Wall"/>
74                             <compilerarg value="-std=gnu99"/>
75                             <compilerarg value="-g"/>
76                             <compilerarg value="-ggdb"/>
77                             <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
78                                 <fileset dir=".">
79                                         <include name="main_runc.c"/>
80                                 </fileset>
81                                 <libset dir="." libs="nxt,usb"/>                                
82                                 <includepath>
83                                         <pathelement location="."/>
84                                 </includepath>
85                                 <versioninfo refid="runc"/>
86                 </cc>
87         </target>
88         
89         <!-- make nxjflash --> 
90         <target name="nxjflash" description="makes nxjflash utility">
91                 <cc subsystem="console" 
92                                 outfile="nxjflash"
93                                 objdir="." 
94                                 outtype="executable" 
95                                 debug="false"
96                             exceptions="false"
97                             rtti="true"
98                             optimize="speed"
99                                 name="gcc">
100                             <compilerarg value="-Wall"/>
101                             <compilerarg value="-std=gnu99"/>
102                             <compilerarg value="-g"/>
103                             <compilerarg value="-ggdb"/>
104                             <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
105                                 <fileset dir=".">
106                                         <include name="main_nxjflash.c"/>
107                                 </fileset>
108                                 <libset dir="." libs="nxt,usb"/>                                
109                                 <includepath>
110                                         <pathelement location="."/>
111                                 </includepath>
112                                 <versioninfo refid="nxjflash"/>
113                 </cc>
114         </target>
115         
116         <!-- make jlibnxt --> 
117         <target name="jlibnxt" description="makes jlibnxt">
118                 <cc subsystem="console" 
119                                 outfile="jlibnxt"
120                                 objdir="." 
121                                 outtype="shared" 
122                                 debug="false"
123                             exceptions="false"
124                             rtti="true"
125                             optimize="speed"
126                                 name="gcc">
127                             <compilerarg value="-Wall"/>
128                             <compilerarg value="-std=gnu99"/>
129                             <compilerarg value="-g"/>
130                             <compilerarg value="-ggdb"/>
131                             <compilerarg value="-D${endian}"/>
132                                 <fileset dir=".">
133                                         <include name="main_jlibnxt.c"/>
134                                 </fileset>
135                                 <libset dir="." libs="nxt,usb"/>
136                                 <includepath>
137                                         <pathelement location="."/>
138                                 </includepath>
139                                 <versioninfo refid="libnxt"/>
140                 </cc>
141         </target>
142
143 </project>
144