/[PAMELA software]/yodaUtility/build.xml
ViewVC logotype

Annotation of /yodaUtility/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download) (as text)
Mon Jun 12 05:33:39 2006 UTC (18 years, 5 months ago) by kusanagi
Branch: MAIN
CVS Tags: yodaUtility2_0/00, yodaUtility2_1/00
Changes since 1.1: +66 -11 lines
File MIME type: text/xml
*** empty log message ***

1 kusanagi 1.1 <?xml version="1.0" encoding="UTF-8"?>
2     <project basedir="." default="all" name="utils">
3     <property environment="env"/>
4    
5 kusanagi 1.2 <!-- CONFIGURATION FILE. The properties in this file overwrite the previous properties -->
6     <property file="../KYoda.properties"/>
7     <!-- CONFIGURATION FILE. The properties in this file overwrite the previous properties -->
8 kusanagi 1.1 <!--
9     CONFIGURATION PARAMETERS
10     Modify here the parameters according to your own system
11     -->
12     <!-- PAMELA Software(s) root directory -->
13     <property name="pamSoftware"
14     value="${env.HOME}/pamela"/>
15     <!-- CERN's ROOT base directory -->
16     <property name="root"
17     value="/opt/root"/>
18     <!-- LOG4CXX base directory -->
19     <property name="log4cxx"
20     value="/opt/log4cxx"/>
21     <!-- ant-contrib base directory -->
22     <property name="ant-contrib.lib"
23     value="/opt/ant-contrib/lib"/>
24     <!-- temporary base directory for compilation -->
25 kusanagi 1.2 <!--<property name="compilationFolder"
26     value="${env.HOME}/tmp/compiler"/>-->
27 kusanagi 1.1 <!-- yoda source base directory -->
28     <property name="utils.src"
29     value="${basedir}"/>
30    
31 kusanagi 1.2
32 kusanagi 1.1
33     <!--
34     CONFIGURATION PARAMETERS (optional)
35     If your system have custom installation, uncomment and modify
36     the parameters according to your own system
37     -->
38     <!-- fortToC library directory -->
39     <!--<property name="g2c"
40     value="xxx/libf2c/.libs"/>-->
41    
42    
43    
44    
45    
46    
47    
48     <!--
49     PARAMETRIZED PARAMETERS
50     From here to the end there is NO NEED to modify anything
51     -->
52    
53     <tstamp>
54     <format property="compilationFolder" pattern="hmsS" unit="millisecond"/>
55     </tstamp>
56    
57     <!-- Linux -->
58     <property name="local" value="/usr/local"/>
59     <property name="local.include" value="${local}/include"/>
60     <property name="local.lib" value="${local}/lib"/>
61    
62     <!-- CERN's ROOT -->
63     <property name="root.include" value="${root}/include"/>
64     <property name="root.lib" value="${root}/lib"/>
65    
66     <!-- log4cxx -->
67     <property name="log4cxx.include" value="${log4cxx}/include"/>
68     <property name="log4cxx.lib" value="${log4cxx}/lib"/>
69    
70     <!-- ant-contrib library -->
71     <path id="classpath">
72     <pathelement location="${ant-contrib.lib}/cpptasks.jar"/>
73     </path>
74    
75     <!--
76     Load definition of C/C++ Tasks and Types
77     To allow the compilation and linking of C/C++ code
78     -->
79     <taskdef classpathref="classpath" loaderref="classpath.loaderRef" resource="cpptasks.tasks"/>
80     <typedef classpathref="classpath" loaderref="classpath.loaderRef" resource="cpptasks.types"/>
81    
82     <!--
83     Load definition of Additional Tasks and Types
84     -->
85     <taskdef resource="net/sf/antcontrib/antcontrib.properties">
86     <classpath>
87     <pathelement location="${ant-contrib.lib}/ant-contrib.jar"/>
88     </classpath>
89     </taskdef>
90    
91    
92     <target name="initUtils">
93     <!-- Compiler parameters -->
94     <property name="compilationFolder.lib" value="${compilationFolder}/lib"/>
95     <property name="compilationFolder.include" value="${compilationFolder}/include"/>
96    
97     <!-- Utils parameters -->
98     <property name="utils.compilationFolder" value="${env.HOME}/tmp/${compilationFolder}"/>
99     <property name="utils.obj" value="${utils.compilationFolder}/obj"/>
100     <property name="utils.lib" value="${utils.compilationFolder}/lib"/>
101 kusanagi 1.2 <property name="utils.bin" value="${utils.compilationFolder}/bin"/>
102 kusanagi 1.1
103     <!-- Deploy parameters -->
104     <property name="deploy" value="${pamSoftware}"/>
105     <property name="deploy.lib" value="${pamSoftware}/lib"/>
106     <property name="deploy.include" value="${pamSoftware}/include"/>
107     <property name="deploy.bin" value="${deploy}/bin"/>
108    
109     </target>
110    
111     <compiler id="utils-gcc" name="gcc">
112     <includepath location="${local.include}"/>
113     <includepath location="${log4cxx.include}"/>
114     <includepath location="${root.include}"/>
115     <compilerarg value="-O"/>
116     <compilerarg value="-g"/>
117     </compiler>
118    
119 kusanagi 1.2 <compiler id="util-fort" name="g77">
120     <compilerarg value="-c"/>
121     <compilerarg value="-O0"/>
122     </compiler>
123    
124 kusanagi 1.1 <linker id="utils-link">
125 kusanagi 1.2 <libset dir="${root.lib}" libs="Cint, Core, Tree, Graf, Hist, Matrix"/>
126 kusanagi 1.1 <libset dir="${log4cxx.lib}" libs="log4cxx"/>
127     <libset libs="stdc++"/>
128     </linker>
129    
130     <target description="Clean all build products." name="cleanUtils">
131     <delete dir="${utils.compilationFolder}"/>
132     </target>
133    
134     <target depends="cleanUtils, initUtils" description="Create Utils library" name="compileUtilsLib">
135     <mkdir dir="${utils.compilationFolder}"/>
136     <mkdir dir="${utils.obj}"/>
137     <mkdir dir="${utils.lib}"/>
138 kusanagi 1.2 <exec dir="${utils.src}" executable="rootcint">
139     <arg line="-f UtilDict.cpp -c -I..
140     YMagnGeo.h
141     RegistryEvent.h
142     LinkDef.h"/>
143     </exec>
144 kusanagi 1.1 <cc objdir="${utils.obj}" outfile="${utils.lib}/utils" outtype="shared">
145     <compiler extends="utils-gcc">
146 kusanagi 1.2 <fileset dir="${utils.src}" includes="*.cpp, sgp4/*.cpp"/>
147     <includepath location="${utils.src}/sgp4"/>
148 kusanagi 1.1 <includepath location="${pamSoftware}/yoda"/>
149     <includepath location="${utils.src}"/>
150     </compiler>
151 kusanagi 1.2 <compiler extends="util-fort">
152     <fileset dir="${utils.src}/igrf" includes="igrf_sub.for, bilcal.for"/>
153     </compiler>
154 kusanagi 1.1 <linker extends="utils-link"/>
155     </cc>
156     </target>
157 kusanagi 1.2
158    
159     <target depends="cleanUtils, initUtils" description="Create Yoda flight library" name="compileProfiler">
160     <mkdir dir="${utils.bin}"/>
161     <mkdir dir="${utils.obj}"/>
162     <cc objdir="${utils.obj}" outfile="${utils.bin}/YodaProfiler" outtype="executable">
163     <compiler extends="utils-gcc">
164     <fileset dir="${utils.src}/YodaProfiler" includes="*.cpp"/>
165     <includepath location="${utils.src}"/>
166     <includepath location="${utils.src}/YodaProfiler"/>
167     <includepath location="${utils.src}/sgp4"/>
168     <includepath location="${pamSoftware}/include/yoda"/>
169     </compiler>
170     <linker extends="utils-link">
171     <libset dir="${pamSoftware}/lib" libs="yoda, utils"/>
172     </linker>
173     </cc>
174     </target>
175 kusanagi 1.1
176     <target depends="compileUtilsLib" description="Deploy the Utils lib" name="deployUtilities">
177 kusanagi 1.2 <mkdir dir="${deploy}"/>
178     <mkdir dir="${deploy.lib}"/>
179     <mkdir dir="${deploy.include}"/>
180     <copy todir="${deploy.include}/utils">
181     <fileset dir="${utils.src}" includes="**/*.h"/>
182     </copy>
183     <copy todir="${deploy.lib}">
184     <fileset dir="${utils.lib}" includes="*.so"/>
185     </copy>
186     <chmod dir="${deploy.bin}" perm="775" includes="**/*"/>
187     </target>
188    
189     <target depends="compileProfiler" description="Deploy the YodaProfiler" name="deployProfiler">
190 kusanagi 1.1 <mkdir dir="${deploy}"/>
191     <mkdir dir="${deploy.lib}"/>
192     <mkdir dir="${deploy.include}"/>
193 kusanagi 1.2 <copy todir="${deploy.bin}">
194     <fileset dir="${utils.bin}" includes="*" excludes="*.*"/>
195 kusanagi 1.1 </copy>
196 kusanagi 1.2 <chmod dir="${deploy.bin}" perm="775" includes="**/*"/>
197     </target>
198    
199     <target depends="deployUtilities, deployProfiler" description="Deploy the Utils + YodaProfiler" name="all">
200     <mkdir dir="${deploy}"/>
201     <mkdir dir="${deploy.lib}"/>
202     <mkdir dir="${deploy.include}"/>
203     <copy todir="${deploy.bin}">
204     <fileset dir="${utils.bin}" includes="*" excludes="*.*"/>
205 kusanagi 1.1 </copy>
206     <chmod dir="${deploy.bin}" perm="775" includes="**/*"/>
207     </target>
208     </project>
209    
210    
211    

  ViewVC Help
Powered by ViewVC 1.1.23