1 <!-- ant file to make libnxt, runc, nxjflash and jlibnxt -->
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">
8 <pathelement location="../jtools/3rdparty/lib/cpptasks.jar"/>
11 <typedef resource="cpptasks.types">
13 <pathelement location="../jtools/3rdparty/lib/cpptasks.jar"/>
18 <!-- cleans all compilation artifacts -->
19 <target name="clean" description="cleans all compilation artifacts">
27 <!-- make libnxt and its utilities -->
28 <target name="make" depends="clean,libnxt,nxjflash,jlibnxt" description="makes libnxt and its tools">
32 <target name="libnxt" description="makes libnxt">
33 <condition property="includePath" value=".">
38 <condition property="includePath" value="/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/">
41 <matches pattern="^10\.5.*" string="${os.version}"/>
44 <condition property="includePath" value="/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/">
47 <matches pattern="^10\.4.*" string="${os.version}"/>
50 <cc subsystem="console"
59 <compilerarg value="-Wall"/>
60 <compilerarg value="-std=gnu99"/>
61 <compilerarg value="-g"/>
62 <compilerarg value="-ggdb"/>
63 <compilerarg value="-D${endian}"/>
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"/>
74 <pathelement location="${includePath}"/>
76 <versioninfo refid="libnxt"/>
81 <target name="runc" description="makes runc utility">
82 <cc subsystem="console"
91 <compilerarg value="-Wall"/>
92 <compilerarg value="-std=gnu99"/>
93 <compilerarg value="-g"/>
94 <compilerarg value="-ggdb"/>
95 <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
97 <include name="main_runc.c"/>
99 <libset dir="." libs="nxt,usb"/>
101 <pathelement location="."/>
103 <versioninfo refid="runc"/>
107 <!-- make nxjflash -->
108 <target name="nxjflash" description="makes nxjflash utility">
109 <cc subsystem="console"
118 <compilerarg value="-Wall"/>
119 <compilerarg value="-std=gnu99"/>
120 <compilerarg value="-g"/>
121 <compilerarg value="-ggdb"/>
122 <compilerarg value="-D_NXT_LITTLE_ENDIAN"/>
124 <include name="main_nxjflash.c"/>
126 <libset dir="." libs="nxt,usb"/>
128 <pathelement location="."/>
130 <versioninfo refid="nxjflash"/>
134 <!-- make jlibnxt -->
135 <target name="jlibnxt" description="makes jlibnxt">
136 <cc subsystem="console"
145 <compilerarg value="-Wall"/>
146 <compilerarg value="-std=gnu99"/>
147 <compilerarg value="-g"/>
148 <compilerarg value="-ggdb"/>
149 <compilerarg value="-D${endian}"/>
151 <include name="main_jlibnxt.c"/>
153 <libset dir="." libs="nxt,usb"/>
155 <pathelement location="."/>
157 <versioninfo refid="libnxt"/>