OSDN Git Service

lejos_NXJ_win32_0_5_0beta.zip
[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                 <condition property="includePath" value=".">
34                         <not>
35                                 <os family="mac"/>
36                         </not>
37                 </condition>
38                 <condition property="includePath" value="/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/">
39                         <and>
40                                 <os family="mac"/>
41                                 <matches pattern="^10\.5.*" string="${os.version}"/>
42                         </and>
43                 </condition>
44                 <condition property="includePath" value="/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/">
45                         <and>
46                                 <os family="mac"/>
47                                 <matches pattern="^10\.4.*" string="${os.version}"/>
48                         </and>
49                 </condition>
50                 <cc subsystem="console" 
51                                 outfile="nxt"
52                                 objdir="." 
53                                 outtype="static" 
54                                 debug="false"
55                             exceptions="false"
56                             rtti="true"
57                             optimize="speed"
58                                 name="gcc">
59                             <compilerarg value="-Wall"/>
60                             <compilerarg value="-std=gnu99"/>
61                             <compilerarg value="-g"/>
62                             <compilerarg value="-ggdb"/>
63                             <compilerarg value="-D${endian}"/>
64                                 <fileset dir=".">
65                                         <include name="error.c"/>
66                                         <include name="firmware.c"/>
67                                         <include name="flash_routine.c"/>                                       
68                                         <include name="error.c"/>
69                                         <include name="flash.c"/> 
70                                         <include name="lowlevel.c"/>
71                                         <include name="samba.c"/>
72                                 </fileset>
73                                 <includepath>
74                                         <pathelement location="${includePath}"/>
75                                 </includepath>
76                                 <versioninfo refid="libnxt"/>
77                 </cc>
78         </target>
79         
80         <!-- make runc --> 
81         <target name="runc" description="makes runc utility">
82                 <cc subsystem="console" 
83                                 outfile="runc"
84                                 objdir="." 
85                                 outtype="executable" 
86                                 debug="false"
87                             exceptions="false"
88                             rtti="true"
89                             optimize="speed"
90                                 name="gcc">
91                             <compilerarg value="-Wall"/>
92                             <compilerarg value="-std=gnu99"/>
93                             <compilerarg value="-g"/>
94                             <compilerarg value="-ggdb"/>
95                             <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
96                                 <fileset dir=".">
97                                         <include name="main_runc.c"/>
98                                 </fileset>
99                                 <libset dir="." libs="nxt,usb"/>                                
100                                 <includepath>
101                                         <pathelement location="."/>
102                                 </includepath>
103                                 <versioninfo refid="runc"/>
104                 </cc>
105         </target>
106         
107         <!-- make nxjflash --> 
108         <target name="nxjflash" description="makes nxjflash utility">
109                 <cc subsystem="console" 
110                                 outfile="nxjflash"
111                                 objdir="." 
112                                 outtype="executable" 
113                                 debug="false"
114                             exceptions="false"
115                             rtti="true"
116                             optimize="speed"
117                                 name="gcc">
118                             <compilerarg value="-Wall"/>
119                             <compilerarg value="-std=gnu99"/>
120                             <compilerarg value="-g"/>
121                             <compilerarg value="-ggdb"/>
122                             <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
123                                 <fileset dir=".">
124                                         <include name="main_nxjflash.c"/>
125                                 </fileset>
126                                 <libset dir="." libs="nxt,usb"/>                                
127                                 <includepath>
128                                         <pathelement location="."/>
129                                 </includepath>
130                                 <versioninfo refid="nxjflash"/>
131                 </cc>
132         </target>
133         
134         <!-- make jlibnxt --> 
135         <target name="jlibnxt" description="makes jlibnxt">
136                 <cc subsystem="console" 
137                                 outfile="jlibnxt"
138                                 objdir="." 
139                                 outtype="shared" 
140                                 debug="false"
141                             exceptions="false"
142                             rtti="true"
143                             optimize="speed"
144                                 name="gcc">
145                             <compilerarg value="-Wall"/>
146                             <compilerarg value="-std=gnu99"/>
147                             <compilerarg value="-g"/>
148                             <compilerarg value="-ggdb"/>
149                             <compilerarg value="-D${endian}"/>
150                                 <fileset dir=".">
151                                         <include name="main_jlibnxt.c"/>
152                                 </fileset>
153                                 <libset dir="." libs="nxt,usb"/>
154                                 <includepath>
155                                         <pathelement location="."/>
156                                 </includepath>
157                                 <versioninfo refid="libnxt"/>
158                 </cc>
159         </target>
160 </project>
161