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

Annotation of /yodaUtility/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Sun Apr 30 11:08:14 2006 UTC (18 years, 7 months ago) by kusanagi
Branch: MAIN
File MIME type: text/xml
Initial revision

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

  ViewVC Help
Powered by ViewVC 1.1.23