| 1 |
campana |
1.1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
|
<project basedir="." default="everything" name="deploy"> |
| 3 |
|
|
<property environment="env"/> |
| 4 |
|
|
|
| 5 |
|
|
<!-- |
| 6 |
|
|
CONFIGURATION PARAMETERS |
| 7 |
|
|
Modify here the parameters according to your own system |
| 8 |
|
|
--> |
| 9 |
|
|
<!-- PAMELA Software(s) root directory --> |
| 10 |
|
|
<property name="pamSoftware" |
| 11 |
|
|
value="/home/pamelaprod/yoda"/> |
| 12 |
|
|
<!-- CERN's ROOT base directory --> |
| 13 |
|
|
<property name="root" |
| 14 |
|
|
value="/opt/root"/> |
| 15 |
|
|
<!-- LOG4CXX base directory --> |
| 16 |
|
|
<property name="log4cxx" |
| 17 |
|
|
value="/opt/log4cxx"/> |
| 18 |
|
|
<!-- ant-contrib base directory --> |
| 19 |
|
|
<property name="ant-contrib.lib" |
| 20 |
|
|
value="/opt/ant-contrib/lib"/> |
| 21 |
|
|
|
| 22 |
|
|
<property name="scripts.src" |
| 23 |
|
|
value="${basedir}"/> |
| 24 |
|
|
|
| 25 |
|
|
<property name="destdir" |
| 26 |
|
|
value="${basedir}/.."/> |
| 27 |
|
|
|
| 28 |
|
|
|
| 29 |
|
|
<!-- |
| 30 |
|
|
CONFIGURATION PARAMETERS (optional) |
| 31 |
|
|
If your system have custom installation, uncomment and modify |
| 32 |
|
|
the parameters according to your own system |
| 33 |
|
|
--> |
| 34 |
|
|
<!-- fortToC library directory --> |
| 35 |
|
|
<!--<property name="g2c" |
| 36 |
|
|
value="xxx/libf2c/.libs"/>--> |
| 37 |
|
|
|
| 38 |
|
|
|
| 39 |
|
|
|
| 40 |
|
|
|
| 41 |
|
|
|
| 42 |
|
|
|
| 43 |
|
|
|
| 44 |
|
|
<!-- |
| 45 |
|
|
PARAMETRIZED PARAMETERS |
| 46 |
|
|
From here to the end there is NO NEED to modify anything |
| 47 |
|
|
--> |
| 48 |
|
|
<tstamp> |
| 49 |
|
|
<format property="compilationFolder" pattern="hmsS" unit="millisecond"/> |
| 50 |
|
|
</tstamp> |
| 51 |
|
|
|
| 52 |
|
|
<!-- Linux --> |
| 53 |
|
|
<property name="local" value="/usr/local"/> |
| 54 |
|
|
<property name="local.include" value="${local}/include"/> |
| 55 |
|
|
<property name="local.lib" value="${local}/lib"/> |
| 56 |
|
|
|
| 57 |
|
|
<!-- CERN's ROOT --> |
| 58 |
|
|
<property name="root.include" value="${root}/include"/> |
| 59 |
|
|
<property name="root.lib" value="${root}/lib"/> |
| 60 |
|
|
|
| 61 |
|
|
<!-- log4cxx --> |
| 62 |
|
|
<property name="log4cxx.include" value="${log4cxx}/include"/> |
| 63 |
|
|
<property name="log4cxx.lib" value="${log4cxx}/lib"/> |
| 64 |
|
|
|
| 65 |
|
|
<!-- ant-contrib library --> |
| 66 |
|
|
<path id="classpath"> |
| 67 |
|
|
<pathelement location="${ant-contrib.lib}/cpptasks.jar"/> |
| 68 |
|
|
</path> |
| 69 |
|
|
|
| 70 |
|
|
<!-- |
| 71 |
|
|
Load definition of C/C++ Tasks and Types |
| 72 |
|
|
To allow the compilation and linking of C/C++ code |
| 73 |
|
|
--> |
| 74 |
|
|
<taskdef classpathref="classpath" loaderref="classpath.loaderRef" resource="cpptasks.tasks"/> |
| 75 |
|
|
<typedef classpathref="classpath" loaderref="classpath.loaderRef" resource="cpptasks.types"/> |
| 76 |
|
|
|
| 77 |
|
|
<!-- |
| 78 |
|
|
Load definition of Additional Tasks and Types |
| 79 |
|
|
--> |
| 80 |
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties"> |
| 81 |
|
|
<classpath> |
| 82 |
|
|
<pathelement location="${ant-contrib.lib}/ant-contrib.jar"/> |
| 83 |
|
|
</classpath> |
| 84 |
|
|
</taskdef> |
| 85 |
|
|
|
| 86 |
|
|
<target name="init"> |
| 87 |
|
|
<!-- Compiler parameters --> |
| 88 |
|
|
<property name="compilationFolder.lib" value="${compilationFolder}/lib"/> |
| 89 |
|
|
<property name="compilationFolder.include" value="${compilationFolder}/include"/> |
| 90 |
|
|
|
| 91 |
|
|
<!-- scripts parameters --> |
| 92 |
|
|
<property name="scripts.compilationFolder" value="${env.HOME}/tmp/${compilationFolder}"/> |
| 93 |
|
|
<property name="scripts.obj" value="${scripts.compilationFolder}/obj"/> |
| 94 |
|
|
<property name="scripts.lib" value="${scripts.compilationFolder}/lib"/> |
| 95 |
|
|
<property name="scripts.bin" value="${scripts.compilationFolder}/bin"/> |
| 96 |
|
|
|
| 97 |
|
|
<!-- Deploy parameters --> |
| 98 |
|
|
<property name="deploy" value="${destdir}"/> |
| 99 |
|
|
<property name="deploy.lib" value="${destdir}/lib"/> |
| 100 |
|
|
<property name="deploy.include" value="${destdir}/include"/> |
| 101 |
|
|
<property name="deploy.bin" value="${deploy}/bin"/> |
| 102 |
|
|
|
| 103 |
|
|
<mkdir dir="${compilationFolder}"/> |
| 104 |
|
|
</target> |
| 105 |
|
|
|
| 106 |
|
|
<compiler id="scripts-gcc" name="gcc"> |
| 107 |
|
|
<includepath location="${local.include}"/> |
| 108 |
|
|
<includepath location="${log4cxx.include}"/> |
| 109 |
|
|
<includepath location="${root.include}"/> |
| 110 |
|
|
<compilerarg value="-O"/> |
| 111 |
|
|
<compilerarg value="-g"/> |
| 112 |
|
|
</compiler> |
| 113 |
|
|
|
| 114 |
|
|
<linker id="scripts-link"> |
| 115 |
|
|
<libset dir="${root.lib}" libs="Cint, Core, Tree, Graf, Hist, Matrix, Gpad"/> |
| 116 |
|
|
<libset dir="${log4cxx.lib}" libs="log4cxx"/> |
| 117 |
|
|
<libset libs="stdc++"/> |
| 118 |
|
|
</linker> |
| 119 |
|
|
|
| 120 |
|
|
|
| 121 |
|
|
<!-- |
| 122 |
|
|
Clean the compilation folder |
| 123 |
|
|
--> |
| 124 |
|
|
<target description="Clean all build products." name="clean"> |
| 125 |
|
|
<delete dir="${scripts.compilationFolder}"/> |
| 126 |
|
|
<delete dir="${compilationFolder}"/> |
| 127 |
|
|
</target> |
| 128 |
|
|
|
| 129 |
|
|
<target description="Create executable" name="compileQL"> |
| 130 |
|
|
<mkdir dir="${scripts.bin}"/> |
| 131 |
|
|
<mkdir dir="${scripts.obj}"/> |
| 132 |
|
|
<cc objdir="${scripts.obj}" outfile="${scripts.bin}/TofScan" outtype="executable"> |
| 133 |
|
|
<compiler extends="scripts-gcc"> |
| 134 |
|
|
<fileset dir="${scripts.src}" includes="TofScan.cpp"> |
| 135 |
|
|
</fileset> |
| 136 |
|
|
<includepath location="${scripts.src}"/> |
| 137 |
|
|
<includepath location="${pamSoftware}/include"/> |
| 138 |
|
|
<includepath location="${pamSoftware}/include/yoda"/> |
| 139 |
|
|
</compiler> |
| 140 |
|
|
<linker extends="scripts-link"> |
| 141 |
|
|
<libset dir="${pamSoftware}/lib" libs="yoda"/> |
| 142 |
|
|
</linker> |
| 143 |
|
|
</cc> |
| 144 |
|
|
|
| 145 |
|
|
</target> |
| 146 |
|
|
|
| 147 |
|
|
|
| 148 |
|
|
<target depends="compileQL" description="Create executable" name="all"> |
| 149 |
|
|
|
| 150 |
|
|
</target> |
| 151 |
|
|
|
| 152 |
|
|
<target depends="init" description="Deploy the scripts" name="deploy"> |
| 153 |
|
|
<mkdir dir="${deploy}"/> |
| 154 |
|
|
<mkdir dir="${deploy.lib}"/> |
| 155 |
|
|
<mkdir dir="${deploy.bin}"/> |
| 156 |
|
|
<!--<copy todir="${deploy.lib}"> |
| 157 |
|
|
<fileset dir="${profiler.lib}" includes="*.so"/> |
| 158 |
|
|
</copy>--> |
| 159 |
|
|
<copy todir="${deploy.bin}"> |
| 160 |
|
|
<fileset dir="${scripts.bin}" includes="*" excludes="*.*"/> |
| 161 |
|
|
</copy> |
| 162 |
|
|
<chmod dir="${deploy.bin}" perm="775" includes="**/*"/> |
| 163 |
|
|
</target> |
| 164 |
|
|
|
| 165 |
|
|
<target depends="init,all,deploy,clean" description="Make everything" name="everything"> |
| 166 |
|
|
</target> |
| 167 |
|
|
</project> |