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 |
kusanagi |
1.1 |
<target depends="compileUtilsLib" description="Deploy the Utils lib" name="deployUtilities"> |
160 |
kusanagi |
1.2 |
<mkdir dir="${deploy}"/> |
161 |
|
|
<mkdir dir="${deploy.lib}"/> |
162 |
|
|
<mkdir dir="${deploy.include}"/> |
163 |
|
|
<copy todir="${deploy.include}/utils"> |
164 |
|
|
<fileset dir="${utils.src}" includes="**/*.h"/> |
165 |
|
|
</copy> |
166 |
|
|
<copy todir="${deploy.lib}"> |
167 |
|
|
<fileset dir="${utils.lib}" includes="*.so"/> |
168 |
|
|
</copy> |
169 |
|
|
<chmod dir="${deploy.bin}" perm="775" includes="**/*"/> |
170 |
|
|
</target> |
171 |
|
|
|
172 |
mocchiut |
1.3 |
<target depends="deployUtilities" description="Deploy the Utils" name="all"> |
173 |
kusanagi |
1.2 |
<mkdir dir="${deploy}"/> |
174 |
|
|
<mkdir dir="${deploy.lib}"/> |
175 |
|
|
<mkdir dir="${deploy.include}"/> |
176 |
|
|
<copy todir="${deploy.bin}"> |
177 |
|
|
<fileset dir="${utils.bin}" includes="*" excludes="*.*"/> |
178 |
kusanagi |
1.1 |
</copy> |
179 |
|
|
<chmod dir="${deploy.bin}" perm="775" includes="**/*"/> |
180 |
|
|
</target> |
181 |
|
|
</project> |
182 |
|
|
|
183 |
|
|
|
184 |
|
|
|