blob: 5ce67e35b69af078bd10c1988fe4e9d0b3a7a5f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project name="TuscanyScaNative_core" default="all" basedir="../..">
<import file="${basedir}/antscripts/system.xml"/>
<import file="${basedir}/antscripts/compile-targets.xml"/>
<!--
Notice that the basedir for this project is set to the TuscanySCA root dir
This makes path setting in system.xml much simpler, but we'll just have to
set a property here to this directory.
-->
<property name="this.dir" location="${basedir}/runtime/core"/>
<property name="src.dir" location="${basedir}/runtime/core/src"/>
<property name="core.dir" value="tuscany/sca/core"/>
<property name="extension.dir" value="tuscany/sca/extension"/>
<property name="model.dir" value="tuscany/sca/model"/>
<property name="util.dir" value="tuscany/sca/util"/>
<property name="core.abs.dir" location="${src.dir}/${core.dir}"/>
<property name="extension.abs.dir" location="${src.dir}/${extension.dir}"/>
<property name="model.abs.dir" location="${src.dir}/${model.dir}"/>
<property name="util.abs.dir" location="${src.dir}/${util.dir}"/>
<property name="xsd.abs.dir" location="${this.dir}/xsd"/>
<property name="lib.dir" location="${src.dir}/.libs"/>
<property name="tuscany.core.lib" value="tuscany_sca"/>
<!--
All the cpp and header files per subdirectory
New classes should be added to these properties
-->
<property
name="core.cpp.files"
value="Exceptions.cpp
Operation.cpp
SCARuntime.cpp
ServiceProxy.cpp
ServiceWrapper.cpp"/>
<property
name="core.h.files"
value="Exceptions.h
Operation.h
SCARuntime.h
ServiceProxy.h
ServiceWrapper.h"/>
<property
name="extension.cpp.files"
value="ImplementationExtension.cpp
InterfaceExtension.cpp
ReferenceBindingExtension.cpp
ServiceBindingExtension.cpp"/>
<property
name="extension.h.files"
value="ImplementationExtension.h
InterfaceExtension.h
ReferenceBindingExtension.h
ServiceBindingExtension.h"/>
<property
name="model.cpp.files"
value="Binding.cpp
Component.cpp
ComponentType.cpp
Composite.cpp
CompositeReferenceBinding.cpp
CompositeReference.cpp
CompositeService.cpp
Contract.cpp
Interface.cpp
ModelLoader.cpp
ReferenceBinding.cpp
Reference.cpp
ReferenceType.cpp
ServiceBinding.cpp
Service.cpp
ServiceType.cpp
Wire.cpp
WSDLDefinition.cpp
WSDLInterface.cpp
WSDLMessagePart.cpp
WSDLOperation.cpp"/>
<property
name="model.h.files"
value="Binding.h
Component.h
ComponentType.h
Composite.h
CompositeReferenceBinding.h
CompositeReference.h
CompositeService.h
Contract.h
Interface.h
ModelLoader.h
ReferenceBinding.h
Reference.h
ReferenceType.h
ServiceBinding.h
Service.h
ServiceType.h
Wire.h
WSDLDefinition.h
WSDLInterface.h
WSDLMessagePart.h
WSDLOperation.h"/>
<property
name="util.cpp.files"
value="DefaultLogWriter.cpp
File.cpp
FileLogWriter.cpp
Library.cpp
Logger.cpp
LogWriter.cpp
Mutex.cpp
Queue.cpp
SDOUtils.cpp
Thread.cpp
ThreadLocal.cpp
Utils.cpp"/>
<property
name="util.h.files"
value="DefaultLogWriter.h
File.h
FileLogWriter.h
Library.h
Logger.h
Logging.h
LogWriter.h
Mutex.h
Queue.h
SDOUtils.h
Thread.h
ThreadLocal.h
Utils.h"/>
<!--
All the xsd schema files
New schema should be added to this property
-->
<property
name="xsd.files"
value="sca.xsd
sca-core.xsd
sca-implementation-composite.xsd
sca-implementation-java.xsd
sca-interface-java.xsd
sca-interface-wsdl.xsd
tuscany.xsd
wsdl_11_http.xsd
wsdl_11_mime.xsd
wsdl_11_soap12.xsd
wsdl_11_soap.xsd
wsdl_11.xsd"/>
<!--
Public targets
-->
<target name="all" description="compile, link, and install all TuscanyScaNative core source code">
<antcall target="compile"/>
<antcall target="link"/>
<antcall target="install"/>
</target>
<target name="build" description="compile and link all TuscanyScaNative core source code">
<antcall target="compile"/>
<antcall target="link"/>
</target>
<target name="compile" description="Compile all TuscanyScaNative core source code">
<antcall target="compile.core"/>
<antcall target="compile.extension"/>
<antcall target="compile.model"/>
<antcall target="compile.util"/>
</target>
<target name="link" description="Link all TuscanyScaNative core source code">
<cpp-link-core
outfile="${tuscany.core.lib}"
outdir="${lib.dir}"
indir="${lib.dir}"
infiles="*${object.ext}"/>
</target>
<target name="install" description="Install TuscanyScaNative core libraries and headers">
<antcall target="install.core"/>
<antcall target="install.extension"/>
<antcall target="install.model"/>
<antcall target="install.util"/>
<antcall target="install.xsd"/>
<cpp-install-files
srcdir="${src.dir}/tuscany/sca"
files="export.h"
destdir="${tuscanySCA.install.dir}/include/tuscany/sca"/>
<cpp-install-lib
lib="${tuscany.core.lib}"
srcdir="${lib.dir}"
destrootdir="${tuscanySCA.install.dir}"/>
<cpp-symlink
linkdir="${tuscanySCA.install.dir}/lib"
link="${lib.prefix}${tuscany.core.lib}${lib.ext}"
resource="${lib.prefix}${tuscany.core.lib}${lib.ext}${tuscanySCA.library.version}"/>
</target>
<target name="clean" description="Clean all TuscanyScaNative core compiled source code">
<antcall target="clean.core"/>
<antcall target="clean.extension"/>
<antcall target="clean.model"/>
<antcall target="clean.util"/>
<antcall target="clean.xsd"/>
<delete dir="${lib.dir}" quiet="true"/>
<cpp-clean-files
dir="${tuscanySCA.install.dir}/include/tuscany/sca"
files="export.h"
rmdir="true"/>
<cpp-clean-lib
lib="${tuscany.core.lib}"
librootdir="${tuscanySCA.install.dir}"/>
</target>
<!--
Internal targets
They can still be called, they're just not described, so wont show up in "ant -p"
-->
<!-- compile -->
<target name="compile.core">
<cpp-compile
srcdir="${core.abs.dir}"
objdir="${lib.dir}"
infiles="${core.cpp.files}">
<custom-cc-elements>
<defineset if="windows" define="SCA_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
<target name="compile.extension">
<cpp-compile
srcdir="${extension.abs.dir}"
objdir="${lib.dir}"
infiles="${extension.cpp.files}">
<custom-cc-elements>
<defineset if="windows" define="SCA_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
<target name="compile.model">
<cpp-compile
srcdir="${model.abs.dir}"
objdir="${lib.dir}"
infiles="${model.cpp.files}">
<custom-cc-elements>
<defineset if="windows" define="SCA_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
<target name="compile.util">
<cpp-compile
srcdir="${util.abs.dir}"
objdir="${lib.dir}"
infiles="${util.cpp.files}">
<custom-cc-elements>
<defineset if="windows" define="SCA_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
<!-- install -->
<target name="install.core">
<cpp-install-files
srcdir="${core.abs.dir}"
files="${core.h.files}"
destdir="${tuscanySCA.install.dir}/include/${core.dir}"/>
</target>
<target name="install.extension">
<cpp-install-files
srcdir="${extension.abs.dir}"
files="${extension.h.files}"
destdir="${tuscanySCA.install.dir}/include/${extension.dir}"/>
</target>
<target name="install.model">
<cpp-install-files
srcdir="${model.abs.dir}"
files="${model.h.files}"
destdir="${tuscanySCA.install.dir}/include/${model.dir}"/>
</target>
<target name="install.util">
<cpp-install-files
srcdir="${util.abs.dir}"
files="${util.h.files}"
destdir="${tuscanySCA.install.dir}/include/${util.dir}"/>
</target>
<target name="install.xsd">
<cpp-install-files
srcdir="${xsd.abs.dir}"
files="${xsd.files}"
destdir="${tuscanySCA.install.dir}/xsd"/>
</target>
<!-- clean -->
<target name="clean.core">
<cpp-clean-files
dir="${tuscanySCA.install.dir}/include/${core.dir}"
rmdir="true"/>
</target>
<target name="clean.extension">
<cpp-clean-files
dir="${tuscanySCA.install.dir}/include/${extension.dir}"
rmdir="true"/>
</target>
<target name="clean.model">
<cpp-clean-files
dir="${tuscanySCA.install.dir}/include/${model.dir}"
rmdir="true"/>
</target>
<target name="clean.util">
<cpp-clean-files
dir="${tuscanySCA.install.dir}/include/${util.dir}"
rmdir="true"/>
</target>
<target name="clean.xsd">
<cpp-clean-files
dir="${tuscanySCA.install.dir}/xsd"
rmdir="true"/>
</target>
</project>
|