~ubuntu-branches/ubuntu/wily/opencollada/wily

« back to all changes in this revision

Viewing changes to Externals/LibXML/bakefile/libxml2.bkl

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
2
 
 
3
<!-- Author: Francesco Montorsi <frm@users.sourceforge.net>         -->
 
4
<!-- Date: 30/8/2004                                                -->
 
5
<!-- Last revision: 26/1/2005                                       -->
 
6
 
 
7
 
 
8
<!--                    LIBXML2 BAKEFILE                            -->
 
9
<!--                                                                -->
 
10
<!--    The bakefile used to build the library and the test         -->
 
11
<!--    programs. The makefiles output is put:                      -->
 
12
<!--                                                                -->
 
13
<!--    - in the ..\LIB folder                                      -->
 
14
<!--    - in the ..\BIN folder                                      -->
 
15
<!--                                                                -->
 
16
 
 
17
<makefile>
 
18
 
 
19
    <using module="datafiles"/>
 
20
    <requires version="0.1.5"/>
 
21
    
 
22
 
 
23
    <!-- This is a bakefile, that is, a generic template used to    -->
 
24
    <!-- generate makefiles ALL supported compilers.                -->
 
25
    <!-- To use this project file you need Bakefile installed.      -->
 
26
    <!-- With the command "bakefile_gen" you can regen all the      -->
 
27
    <!-- makefiles and project files.                               -->
 
28
    <!-- See http://bakefile.sourceforge.net for more info.         -->
 
29
 
 
30
 
 
31
        <!--
 
32
         This file is divided in:
 
33
                - generic options
 
34
                - generic variables
 
35
                - libxml2 options
 
36
                - libxml2 variables
 
37
                - about config.h creation
 
38
                - templates
 
39
                - libxml2 library target
 
40
                - libxml2 test program targets
 
41
        -->
 
42
 
 
43
 
 
44
 
 
45
    <!--                                                            -->
 
46
    <!--                      GENERIC OPTIONS                       -->
 
47
    <!--                                                            -->
 
48
 
 
49
     
 
50
    <!--    This is a standard option that determines               -->
 
51
    <!--    whether the user wants to build this library as         -->
 
52
    <!--    a dll or as a static library.                           -->
 
53
    <option name="SHARED">
 
54
        <values>0,1</values>
 
55
        <values-description>,DLL</values-description>
 
56
        <default-value>0</default-value>
 
57
        <description>If set to zero a STATIC libxml library will be built</description>
 
58
    </option>
 
59
 
 
60
    <!-- Configuration for building the bakefile with               -->
 
61
    <!-- unicode strings or not (unicode or ansi).                  -->
 
62
    <option name="UNICODE">
 
63
        <values>0,1</values>
 
64
        <values-description>,Unicode</values-description>
 
65
        <default-value>0</default-value>        
 
66
        <description>Compile Unicode build?</description>
 
67
    </option>
 
68
 
 
69
 
 
70
    <!-- There are several options that deal with build             -->
 
71
    <!-- types. First, there's this one, BUILD.                     -->
 
72
    <!--                                                            -->
 
73
    <!-- BUILD determines whether or not we want to build           -->
 
74
    <!-- in release or debug mode.  Note that in practice           -->
 
75
    <!-- this means modifying the optimize tag, which by            -->
 
76
    <!-- default is set to off.  In this case debug means           -->
 
77
    <!-- off (no optimizations), and release means speed            -->
 
78
    <!-- (fast with inlining).  There is also a size option         -->
 
79
    <!-- that is not addressed in this example bakefile.            -->
 
80
    <option name="BUILD">
 
81
        <values>debug,release</values>
 
82
        <values-description>Debug,Release</values-description>
 
83
        <default-value>release</default-value>
 
84
        <description>
 
85
            Type of compiled binaries
 
86
        </description>
 
87
    </option>
 
88
 
 
89
 
 
90
 
 
91
    <!--                                                            -->
 
92
    <!--                    GENERIC VARIABLES                       -->
 
93
    <!--                                                            -->
 
94
 
 
95
    <!--    Set the ISDLL variable, so that we can use it           -->
 
96
    <!--    inside an if statement later on (options not            -->
 
97
    <!--    allowed in if statements).                              -->
 
98
    <set var="ISDLL" cond="SHARED=='1'">1</set>
 
99
    <set var="ISDLL" cond="SHARED=='0'">0</set>
 
100
 
 
101
    <!--    The unicode define we want.  By default bakefile        -->
 
102
    <!--    makes variables an empty string, so if unicode          -->
 
103
    <!--    is not defined $(UNICODE_DEFINE) would expand           -->
 
104
    <!--    to nothing (literally).                                 -->
 
105
    <set var="UNICODE_DEFINE">
 
106
        <if cond="FORMAT!='autoconf' and UNICODE=='1'">_UNICODE</if>
 
107
    </set>    
 
108
    
 
109
    <!--    The debug define we need with win32 compilers           -->    
 
110
    <!--    (on Linux, the wx-config program is used).              -->    
 
111
    <set var="DEBUG_DEFINE">        
 
112
        <if cond="FORMAT!='autoconf' and BUILD=='debug'">
 
113
            __WXDEBUG__
 
114
        </if>    
 
115
    </set>
 
116
 
 
117
    <!--    Value we will use later on for the debug-info           -->
 
118
    <!--    tag inside our templates.                               -->
 
119
    <set var="DEBUGINFO">
 
120
        <if cond="BUILD=='debug'">on</if>
 
121
        <if cond="BUILD=='release'">off</if>
 
122
    </set>
 
123
 
 
124
    <!--    Value we will use later on for the debug-runtime        -->
 
125
    <!--    tag inside our templates.                               -->
 
126
    <set var="DEBUGRUNTIME">
 
127
        <if cond="BUILD=='debug'">on</if>
 
128
        <if cond="BUILD=='release'">off</if>
 
129
    </set>
 
130
 
 
131
    <!--    Value for optimize tag.                                 -->
 
132
    <set var="OPTIMIZEFLAG">
 
133
        <if cond="BUILD=='debug'">off</if>
 
134
        <if cond="BUILD=='release'">speed</if>
 
135
    </set>
 
136
 
 
137
    <!-- Level of warnings.  Here we max it out in debug            -->
 
138
    <!-- mode, and turn them off in release mode.                   -->
 
139
    <set var="WARNINGS">
 
140
        <if cond="BUILD=='debug'">max</if>
 
141
        <if cond="BUILD=='release'">no</if>
 
142
    </set>
 
143
 
 
144
    <!-- Set MYCPPFLAGS as empty; maybe it will be filled later...  -->
 
145
    <set var="MYCPPFLAGS"></set>
 
146
    <if cond="FORMAT=='mingw' or FORMAT=='autoconf'">
 
147
 
 
148
        <!-- With GCC, settings warnings to MAX would force         -->
 
149
        <!-- Bakefile to call GCC with "-W -Wall" which generates   -->
 
150
        <!-- a *lot* of warnings about wxWidgets headers...         -->
 
151
        <!-- this is why "-W -Wall" is here replaced by "-Wall".    -->
 
152
        <set var="WARNINGS">default</set>
 
153
        <set var="MYCPPFLAGS">-Wall</set>
 
154
    </if>
 
155
    
 
156
    
 
157
    
 
158
  
 
159
 
 
160
 
 
161
    <!--                                                            -->
 
162
    <!--                      LIBXML2 OPTIONS                       -->
 
163
    <!--                                                            -->
 
164
    <!-- Note #1: not all of them are used by win32 makefiles       -->
 
165
        <!--                                                            -->
 
166
        <!-- Note #2: since all combinations of non-path options are    -->
 
167
        <!--          translated into different 'configurations' by     -->
 
168
        <!--          Bakefile when using the MSVC6PRJ output, we must  -->
 
169
        <!--          avoid to create a 10 MB libxml2.dsp file forcing  -->
 
170
        <!--          some options to their default values... this      -->
 
171
        <!--          behaviour can be overridden by the                -->
 
172
        <!--                        FULL_OPTIONS_SUPPORT                -->
 
173
        <!--          variable defined below...                         -->
 
174
    
 
175
        <set var="FULL_OPTIONS_SUPPORT">
 
176
                <if cond="FORMAT=='msvc6prj'">0</if>
 
177
                <if cond="FORMAT!='msvc6prj'">1</if>
 
178
        </set>
 
179
 
 
180
    <option name="ICONV_DIR" category="path">
 
181
        <default-value>c:\iconv</default-value>
 
182
        <description>The iconv library main folder</description>
 
183
    </option>
 
184
 
 
185
    <option name="WITH_TRIO">
 
186
        <values>0,1</values>
 
187
        <default-value>0</default-value>
 
188
        <description>Enable TRIO string manipulator</description>
 
189
    </option>
 
190
 
 
191
        <!-- see the note #2 -->
 
192
        <if cond="FULL_OPTIONS_SUPPORT=='0'">
 
193
                <set var="WITH_THREADS">native</set>
 
194
        </if>
 
195
        <if cond="FULL_OPTIONS_SUPPORT=='1'">
 
196
                <option name="WITH_THREADS">
 
197
                <values>no,ctls,native,posix</values>
 
198
                        <default-value>native</default-value>
 
199
                        <description>Enable thread safety</description>
 
200
                </option>
 
201
    </if>
 
202
 
 
203
    <option name="WITH_FTP">
 
204
        <values>0,1</values>
 
205
        <default-value>1</default-value>
 
206
        <description>Enable FTP client</description>
 
207
    </option>
 
208
 
 
209
    <option name="WITH_HTTP">
 
210
        <values>0,1</values>
 
211
        <default-value>1</default-value>
 
212
        <description>Enable HTTP client</description>
 
213
    </option>
 
214
 
 
215
    <option name="WITH_C14N">
 
216
        <values>0,1</values>
 
217
        <default-value>1</default-value>
 
218
        <description>Enable C14N support</description>
 
219
    </option>
 
220
 
 
221
    <option name="WITH_CATALOG">
 
222
        <values>0,1</values>
 
223
        <default-value>1</default-value>
 
224
        <description>Enable catalog support</description>
 
225
    </option>
 
226
 
 
227
    <option name="WITH_DOCB">
 
228
        <values>0,1</values>
 
229
        <default-value>1</default-value>
 
230
        <description>Enable DocBook support</description>
 
231
    </option>
 
232
        
 
233
    <option name="WITH_XPATH">
 
234
        <values>0,1</values>
 
235
        <default-value>1</default-value>
 
236
        <description>Enable XPath support</description>
 
237
    </option>
 
238
        
 
239
    <option name="WITH_XPTR">
 
240
        <values>0,1</values>
 
241
        <default-value>1</default-value>
 
242
        <description>Enable XPointer support</description>
 
243
    </option>
 
244
        
 
245
    <option name="WITH_XINCLUDE">
 
246
        <values>0,1</values>
 
247
        <default-value>1</default-value>
 
248
        <description>Enable XInclude support</description>
 
249
    </option>
 
250
        
 
251
        <!-- see the note #2 -->
 
252
        <if cond="FULL_OPTIONS_SUPPORT=='0'">
 
253
                <set var="WITH_ICONV">1</set>
 
254
        </if>
 
255
        <if cond="FULL_OPTIONS_SUPPORT=='1'">
 
256
                <option name="WITH_ICONV">
 
257
                <values>0,1</values>
 
258
                        <default-value>1</default-value>
 
259
                        <description>Enable iconv support</description>
 
260
                </option>
 
261
        </if>
 
262
        
 
263
    <option name="WITH_ISO8859X">
 
264
        <values>0,1</values>
 
265
        <default-value>0</default-value>
 
266
        <description>Enable iso8859x support</description>
 
267
    </option>
 
268
        
 
269
        <!-- see the note #2 -->
 
270
        <if cond="FULL_OPTIONS_SUPPORT=='0'">
 
271
                <set var="WITH_ZLIB">0</set>
 
272
        </if>
 
273
        <if cond="FULL_OPTIONS_SUPPORT=='1'">
 
274
                <option name="WITH_ZLIB">
 
275
                <values>0,1</values>
 
276
                        <default-value>0</default-value>
 
277
                        <description>Enable ZLIB support</description>
 
278
                </option>
 
279
        </if>
 
280
        
 
281
    <option name="WITH_REGEXPS">
 
282
        <values>0,1</values>
 
283
        <default-value>1</default-value>
 
284
        <description>Enable regular expressions</description>
 
285
    </option>
 
286
        
 
287
    <option name="WITH_TREE">
 
288
        <values>0,1</values>
 
289
        <default-value>1</default-value>
 
290
        <description>Enable tree api</description>
 
291
    </option>
 
292
        
 
293
    <option name="WITH_READER">
 
294
        <values>0,1</values>
 
295
        <default-value>1</default-value>
 
296
        <description>Enable xmlReader api</description>
 
297
    </option>
 
298
        
 
299
    <option name="WITH_WRITER">
 
300
        <values>0,1</values>
 
301
        <default-value>1</default-value>
 
302
        <description>Enable xmlWriter api</description>
 
303
    </option>
 
304
        
 
305
    <option name="WITH_WALKER">
 
306
        <values>0,1</values>
 
307
        <default-value>1</default-value>
 
308
        <description>Enable xmlDocWalker api</description>
 
309
    </option>    
 
310
        
 
311
    <option name="WITH_PATTERN">
 
312
        <values>0,1</values>
 
313
        <default-value>1</default-value>
 
314
        <description>Enable xmlPattern api</description>
 
315
    </option>
 
316
        
 
317
    <option name="WITH_PUSH">
 
318
        <values>0,1</values>
 
319
        <default-value>1</default-value>
 
320
        <description>Enable push api</description>
 
321
    </option>
 
322
        
 
323
    <option name="WITH_VALID">
 
324
        <values>0,1</values>
 
325
        <default-value>1</default-value>
 
326
        <description>Enable DTD validation support</description>
 
327
    </option>
 
328
        
 
329
    <option name="WITH_SAX1">
 
330
        <values>0,1</values>
 
331
        <default-value>1</default-value>
 
332
        <description>Enable SAX1 api</description>
 
333
    </option>    
 
334
                        
 
335
    <option name="WITH_SCHEMAS">
 
336
        <values>0,1</values>
 
337
        <default-value>1</default-value>
 
338
        <description>Enable XML Schema support</description>
 
339
    </option>
 
340
        
 
341
    <option name="WITH_LEGACY">
 
342
        <values>0,1</values>
 
343
        <default-value>1</default-value>
 
344
        <description>Enable deprecated APIs</description>
 
345
    </option>    
 
346
                        
 
347
    <option name="WITH_OUTPUT">
 
348
        <values>0,1</values>
 
349
        <default-value>1</default-value>
 
350
        <description>Enable serialization support</description>
 
351
    </option>                                   
 
352
                        
 
353
    <option name="WITH_PYTHON">
 
354
        <values>0,1</values>
 
355
        <default-value>0</default-value>
 
356
        <description>Build Python bindings</description>
 
357
    </option>
 
358
 
 
359
 
 
360
 
 
361
 
 
362
    <!--                                                            -->
 
363
    <!--                    LIBXML2 VARIABLES                       -->
 
364
    <!--                                                            -->   
 
365
 
 
366
    <!-- Put all the objects files generated by         -->
 
367
    <!-- the compilation in a subfolder of BUILD        -->
 
368
    <set var="BUILDDIR">$(FORMAT)</set>
 
369
    
 
370
    <!-- This variable is set to 1 when the current output writer supports -->
 
371
        <!-- the __DEFINE_ARG variable. Otherwise it's set to zero. -->
 
372
        <set var="HAS_DEFINE_ARG">
 
373
                <if cond="FORMAT!='msvc6prj'">1</if>
 
374
                <if cond="FORMAT=='msvc6prj'">0</if>            
 
375
        </set>
 
376
 
 
377
        <!-- The root directory of libxml2 -->
 
378
        <set var="XMLBASEDIR">..</set>
 
379
        
 
380
        <!-- The directory where libxml2' tests will be put -->
 
381
        <set var="XMLTESTDIR">$(XMLBASEDIR)$(DIRSEP)bin</set>
 
382
        
 
383
        <set var="LIBXML_MAJOR_VERSION">2</set>
 
384
        <set var="LIBXML_MINOR_VERSION">6</set>
 
385
        <set var="LIBXML_MICRO_VERSION">16</set>
 
386
        
 
387
        <!-- some defines related to threads -->
 
388
        <set var="THREADS_DEF">
 
389
                <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='native'">
 
390
                        $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS
 
391
                </if>
 
392
                <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='ctls'">
 
393
                        $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_WIN32_THREADS $(__DEFINE_ARG)HAVE_COMPILER_TLS
 
394
                </if>
 
395
                <if cond="HAS_DEFINE_ARG=='1' and WITH_THREADS=='posix'">
 
396
                        $(__DEFINE_ARG)_REENTRANT $(__DEFINE_ARG)HAVE_PTHREAD_H
 
397
                </if>
 
398
        </set>
 
399
        <if cond="FORMAT=='borland'">
 
400
                <set var="THREADS_DEF">
 
401
                        <if cond="WITH_THREADS=='native'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
 
402
                        <if cond="WITH_THREADS=='ctls'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
 
403
                        <if cond="WITH_THREADS=='posix'">$(THREADS_DEF) $(__DEFINE_ARG)__MT__</if>
 
404
                </set>
 
405
        </if>   
 
406
        
 
407
        
 
408
        <!-- some other conditional defines -->
 
409
        <set var="ZLIB_DEF"><if cond="WITH_ZLIB=='1'">HAVE_ZLIB_H</if></set>
 
410
        <set var="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
 
411
        <set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
 
412
        
 
413
        <!-- this is very very important when compiling with MINGW: without this line,
 
414
        the test programs (and all the programs built with libxml2 which use xmlFree)
 
415
        won't build because of "undefined references to __xmlFree" -->
 
416
        <set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
 
417
        
 
418
        <!-- some conditional libraries dependencies -->
 
419
        <set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
 
420
        <set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
 
421
        <set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
 
422
        <set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
 
423
        
 
424
        <set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
 
425
 
 
426
  
 
427
 
 
428
 
 
429
    <!--                                                            -->
 
430
    <!--               ABOUT CONFIG.H HEADER CREATION               -->
 
431
    <!--                                                            -->   
 
432
    
 
433
    <set var="CONFIG_SRCNAME">win32config.h</set>
 
434
    <set var="CONFIG_DSTNAME">config.h</set>
 
435
    
 
436
        <if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
 
437
                <copy-file-to-file id="setup">
 
438
                        <!-- On win32 we need to manually copy a default config.h file -->
 
439
                        <!-- from the include/mc/msw folder to include/mc                          -->
 
440
                        <src>../include/$(CONFIG_SRCNAME)</src>
 
441
                        <dst>../$(CONFIG_DSTNAME)</dst>
 
442
                        <dependency-of>all</dependency-of>
 
443
 
 
444
                        <!-- With autoconf, we will use the configure script to translate -->
 
445
                        <!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
 
446
                        <!-- not need to do anything here...                                                      -->
 
447
                </copy-file-to-file>
 
448
        </if>
 
449
    
 
450
        <if cond="FORMAT!='msvc6prj'">
 
451
            
 
452
                <mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
 
453
                <mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
 
454
                        
 
455
            <!-- Creates all output folders --> 
 
456
            <phony id="setupdirs">
 
457
                        <dependency-of>all</dependency-of>          
 
458
                <depends>setuplibdir</depends>
 
459
                <depends>setupbindir</depends>
 
460
            </phony>
 
461
        </if>
 
462
 
 
463
    <!-- This defines a tag which includes headers on MSVC          -->
 
464
    <!-- Note that $(value) is stuck in there by bakefile,          -->
 
465
    <!-- and is the value between the beginning and end tag.        -->
 
466
    <define-tag name="headers" rules="dll,lib,exe">
 
467
        <if cond="FORMAT=='msvc6prj'">
 
468
            <msvc-project-files>
 
469
                $(value)
 
470
            </msvc-project-files>
 
471
        </if>
 
472
    </define-tag>
 
473
                
 
474
        <!-- Creates the following custom build rule for MSVC6PRJ file:
 
475
             copies ..\include\win32config.h into ..\config.h
 
476
             NOTE: this tag must be used before the <sources> tag if you want that the configuration
 
477
                   file will be created before any other source file is compiled... -->
 
478
    <define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
 
479
        <if cond="FORMAT=='msvc6prj'">
 
480
                <headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
 
481
                <set var="__subdir">$(value)</set>
 
482
            <set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
 
483
            <set var="_custom_build____include_win32config_h">
 
484
Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\win32\$(CONFIG_SRCNAME)
 
485
InputPath=..\include\$(CONFIG_SRCNAME)
 
486
 
 
487
"..\include\$(CONFIG_SRCNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
 
488
$(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
 
489
            </set>
 
490
        </if>
 
491
    </define-tag>
 
492
 
 
493
 
 
494
 
 
495
 
 
496
 
 
497
    <!--                                                            -->
 
498
    <!--                          TEMPLATES                         -->
 
499
    <!--                                                            -->   
 
500
 
 
501
        <!-- The basic template: used by all the targets -->
 
502
    <template id="base">
 
503
        <if cond="FORMAT=='mingw'">                    
 
504
            <define>HAVE_W32API_H</define>
 
505
            <ldflags>-mthreads</ldflags>
 
506
        </if>
 
507
 
 
508
        <cxxflags>$(MYCPPFLAGS)</cxxflags>
 
509
        <warnings>$(WARNINGS)</warnings>
 
510
        <define>$(UNICODE_DEFINE)</define>
 
511
        <optimize>$(OPTIMIZEFLAG)</optimize>
 
512
        <debug-info>$(DEBUGINFO)</debug-info>
 
513
        <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
 
514
        </template>
 
515
        
 
516
        <!-- The template used both by the library and by the test programs -->
 
517
    <template id="xml2" template="base">
 
518
    
 
519
        <!-- -I & -L equivalents -->
 
520
        <include>$(XMLBASEDIR)$(DIRSEP)include</include>
 
521
        <include>$(ICONV_DIR)$(DIRSEP)include</include>
 
522
        <lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>    
 
523
        
 
524
                <!-- some conditional define flags -->
 
525
        <cflags>$(THREADS_DEF)</cflags>
 
526
                <define>$(ZLIB_DEF)</define>
 
527
                <define>$(DEBUG_DEF)</define>
 
528
                <define>$(STATIC_DEF)</define>
 
529
        
 
530
                <if cond="HAS_DEFINE_ARG=='0'">
 
531
                
 
532
                        <!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
 
533
                        <define>_REENTRANT</define>
 
534
                        <define>HAVE_WIN32_THREADS</define>
 
535
                </if>
 
536
 
 
537
                
 
538
                <!-- these must always be defined on win32 -->
 
539
                <define>WIN32</define>          
 
540
                <define>_WINDOWS</define>
 
541
                <define>_MBCS</define>
 
542
 
 
543
                <if cond="FORMAT=='borland'">
 
544
                        <define>_NO_VCL</define>
 
545
                        <define>EILSEQ=2</define>
 
546
                </if>
 
547
    </template>
 
548
    
 
549
        <!-- The template used by libxml2 test programs -->
 
550
        <template id="xml2test" template="xml2">
 
551
        <dirname>$(XMLTESTDIR)</dirname>
 
552
        <app-type>console</app-type>        
 
553
 
 
554
        <library>libxml2</library>
 
555
                
 
556
        <sys-lib>$(ICONV_LIB)</sys-lib>
 
557
        <sys-lib>$(WSOCK32_LIB)</sys-lib>
 
558
                <sys-lib>$(ZLIB_LIB)</sys-lib> 
 
559
        <sys-lib>$(POSIX_LIB)</sys-lib>
 
560
        </template>
 
561
 
 
562
 
 
563
 
 
564
 
 
565
 
 
566
 
 
567
    <!--                                                            -->
 
568
    <!--                  LIBXML2 LIBRARY TARGET                    -->
 
569
    <!--                                                            -->  
 
570
    
 
571
    <lib id="libxml2" template="xml2">
 
572
        
 
573
        <!-- this is useful only when using MSVC6PRJ -->
 
574
        <if cond="FORMAT=='msvc6prj'">
 
575
                <msvc-copy-setup-h/>
 
576
                <msvc-file-group>Config headers:*config.h</msvc-file-group>
 
577
        </if>
 
578
        <if cond="FORMAT!='msvc6prj'">
 
579
                <depends>setup</depends>
 
580
                <depends>setuplibdir</depends>
 
581
        </if>
 
582
            
 
583
        <!-- output folder -->
 
584
        <dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
 
585
                
 
586
                <!-- The output name must be "libxml2.lib" with all compilers.
 
587
                     Since mingw format autoadds the "lib" prefix to the library
 
588
                         name, we must intercept that case to avoid to get "liblibxml2.a" -->
 
589
                <if cond="FORMAT!='mingw'">
 
590
                <libname>libxml2</libname>
 
591
                </if>
 
592
                <if cond="FORMAT=='mingw'">
 
593
                <libname>xml2</libname>
 
594
                </if>
 
595
                        
 
596
        <!-- the list of source files to compile -->            
 
597
        <sources>
 
598
                        $(XMLBASEDIR)$(DIRSEP)c14n.c
 
599
                        $(XMLBASEDIR)$(DIRSEP)catalog.c
 
600
                        $(XMLBASEDIR)$(DIRSEP)chvalid.c
 
601
                        $(XMLBASEDIR)$(DIRSEP)debugXML.c
 
602
                        $(XMLBASEDIR)$(DIRSEP)dict.c
 
603
                        $(XMLBASEDIR)$(DIRSEP)DOCBparser.c
 
604
                        $(XMLBASEDIR)$(DIRSEP)encoding.c
 
605
                        $(XMLBASEDIR)$(DIRSEP)entities.c
 
606
                        $(XMLBASEDIR)$(DIRSEP)error.c
 
607
                        $(XMLBASEDIR)$(DIRSEP)globals.c
 
608
                        $(XMLBASEDIR)$(DIRSEP)hash.c
 
609
                        $(XMLBASEDIR)$(DIRSEP)HTMLparser.c
 
610
                        $(XMLBASEDIR)$(DIRSEP)HTMLtree.c
 
611
                        $(XMLBASEDIR)$(DIRSEP)legacy.c
 
612
                        $(XMLBASEDIR)$(DIRSEP)list.c
 
613
                        $(XMLBASEDIR)$(DIRSEP)nanoftp.c
 
614
                        $(XMLBASEDIR)$(DIRSEP)nanohttp.c
 
615
                        $(XMLBASEDIR)$(DIRSEP)parser.c
 
616
                        $(XMLBASEDIR)$(DIRSEP)parserInternals.c
 
617
                        $(XMLBASEDIR)$(DIRSEP)pattern.c
 
618
                        $(XMLBASEDIR)$(DIRSEP)relaxng.c
 
619
                        $(XMLBASEDIR)$(DIRSEP)SAX2.c
 
620
                        $(XMLBASEDIR)$(DIRSEP)SAX.c
 
621
                        $(XMLBASEDIR)$(DIRSEP)threads.c
 
622
                        $(XMLBASEDIR)$(DIRSEP)tree.c
 
623
                        $(XMLBASEDIR)$(DIRSEP)uri.c
 
624
                        $(XMLBASEDIR)$(DIRSEP)valid.c
 
625
                        $(XMLBASEDIR)$(DIRSEP)xinclude.c
 
626
                        $(XMLBASEDIR)$(DIRSEP)xlink.c
 
627
                        $(XMLBASEDIR)$(DIRSEP)xmlIO.c
 
628
                        $(XMLBASEDIR)$(DIRSEP)xmlmemory.c
 
629
                        $(XMLBASEDIR)$(DIRSEP)xmlreader.c
 
630
                        $(XMLBASEDIR)$(DIRSEP)xmlregexp.c
 
631
                        $(XMLBASEDIR)$(DIRSEP)xmlsave.c
 
632
                        $(XMLBASEDIR)$(DIRSEP)xmlschemas.c
 
633
                        $(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
 
634
                        $(XMLBASEDIR)$(DIRSEP)xmlunicode.c
 
635
                        $(XMLBASEDIR)$(DIRSEP)xmlwriter.c
 
636
                        $(XMLBASEDIR)$(DIRSEP)xpath.c
 
637
                        $(XMLBASEDIR)$(DIRSEP)xpointer.c
 
638
                        $(XMLBASEDIR)$(DIRSEP)xmlstring.c
 
639
        </sources>
 
640
        
 
641
        <!-- the list of header files (for IDE projects) -->
 
642
        <headers>
 
643
                        $(XMLINCLUDEDIR)c14n.h
 
644
                        $(XMLINCLUDEDIR)catalog.h
 
645
                        $(XMLINCLUDEDIR)chvalid.h
 
646
                        $(XMLINCLUDEDIR)debugXML.h
 
647
                        $(XMLINCLUDEDIR)dict.h
 
648
                        $(XMLINCLUDEDIR)DOCBparser.h
 
649
                        $(XMLINCLUDEDIR)encoding.h
 
650
                        $(XMLINCLUDEDIR)entities.h
 
651
                        $(XMLINCLUDEDIR)globals.h
 
652
                        $(XMLINCLUDEDIR)hash.h
 
653
                        $(XMLINCLUDEDIR)HTMLparser.h
 
654
                        $(XMLINCLUDEDIR)HTMLtree.h
 
655
                        $(XMLINCLUDEDIR)list.h
 
656
                        $(XMLINCLUDEDIR)nanoftp.h
 
657
                        $(XMLINCLUDEDIR)nanohttp.h
 
658
                        $(XMLINCLUDEDIR)parser.h
 
659
                        $(XMLINCLUDEDIR)parserInternals.h
 
660
                        $(XMLINCLUDEDIR)pattern.h
 
661
                        $(XMLINCLUDEDIR)relaxng.h
 
662
                        $(XMLINCLUDEDIR)SAX.h
 
663
                        $(XMLINCLUDEDIR)SAX2.h
 
664
                        $(XMLINCLUDEDIR)schemasInternals.h
 
665
                        $(XMLINCLUDEDIR)threads.h
 
666
                        $(XMLINCLUDEDIR)tree.h
 
667
                        $(XMLINCLUDEDIR)uri.h
 
668
                        $(XMLINCLUDEDIR)valid.h
 
669
                        $(XMLINCLUDEDIR)xinclude.h
 
670
                        $(XMLINCLUDEDIR)xlink.h
 
671
                        $(XMLINCLUDEDIR)xmlautomata.h
 
672
                        $(XMLINCLUDEDIR)xmlerror.h
 
673
                        $(XMLINCLUDEDIR)xmlexports.h
 
674
                        $(XMLINCLUDEDIR)xmlIO.h
 
675
                        $(XMLINCLUDEDIR)xmlmemory.h
 
676
                        $(XMLINCLUDEDIR)xmlmodule.h
 
677
                        $(XMLINCLUDEDIR)xmlreader.h
 
678
                        $(XMLINCLUDEDIR)xmlregexp.h
 
679
                        $(XMLINCLUDEDIR)xmlsave.h
 
680
                        $(XMLINCLUDEDIR)xmlschemas.h
 
681
                        $(XMLINCLUDEDIR)xmlschemastypes.h
 
682
                        $(XMLINCLUDEDIR)xmlstring.h
 
683
                        $(XMLINCLUDEDIR)xmlunicode.h
 
684
                        $(XMLINCLUDEDIR)xmlversion.h                    
 
685
                        $(XMLINCLUDEDIR)xmlwriter.h
 
686
                        $(XMLINCLUDEDIR)xpath.h
 
687
                        $(XMLINCLUDEDIR)xpathInternals.h
 
688
                        $(XMLINCLUDEDIR)xpointer.h
 
689
                </headers>
 
690
 
 
691
                <!-- these ones are not inside the include/libxml folder -->
 
692
                <headers>
 
693
                        $(XMLBASEDIR)$(DIRSEP)libxml.h
 
694
                        $(XMLBASEDIR)$(DIRSEP)triodef.h
 
695
                        $(XMLBASEDIR)$(DIRSEP)trionan.h
 
696
                        $(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h                     
 
697
       </headers>
 
698
    </lib>
 
699
 
 
700
 
 
701
 
 
702
    <!--                                                -->
 
703
    <!--               LIBXML2 test programs            -->
 
704
    <!--                                                -->
 
705
        
 
706
        <set var="BUILD_ALL_TESTS">
 
707
 
 
708
                <!-- when using full options support with MSVC6PRJ we should
 
709
                     avoid to create all the DSP files required for the test
 
710
                         programs: they would take a _lot_ of space !! -->
 
711
                <if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
 
712
 
 
713
                <!-- when creating a makefile or using MSVC6PRJ with limited
 
714
                     options support, then we can build all the tests safely -->
 
715
                <if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
 
716
 
 
717
        </set>
 
718
 
 
719
    <if cond="BUILD_ALL_TESTS=='1'">
 
720
 
 
721
                <exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
 
722
                <exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
 
723
                <exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
 
724
                <exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
 
725
                <exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
 
726
                <exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
 
727
                <exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
 
728
                <exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
 
729
                <exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
 
730
                <exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
 
731
                <exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
 
732
 
 
733
                <if cond="FORMAT=='autoconf'">
 
734
                        <exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
 
735
                </if>
 
736
 
 
737
        <!-- FIXME:
 
738
                <exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
 
739
 
 
740
                <if cond="WITH_THREADS=='posix'">
 
741
                        <exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
 
742
                </if>
 
743
                <if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
 
744
                        <exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
 
745
                </if>
 
746
        -->
 
747
        </if>
 
748
 
 
749
</makefile>