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