Home | History | Annotate | Download | only in bakefile
      1 <?xml version="1.0" ?>
      2 
      3 <!-- Author: Francesco Montorsi <frm (a] 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="DEBUG_DEF"><if cond="BUILD=='debug'">_DEBUG</if></set>
    410 	<set var="DEBUG_DEF"><if cond="BUILD=='release'">NDEBUG</if></set>
    411 	
    412 	<!-- this is very very important when compiling with MINGW: without this line,
    413 	the test programs (and all the programs built with libxml2 which use xmlFree)
    414 	won't build because of "undefined references to __xmlFree" -->
    415 	<set var="STATIC_DEF"><if cond="SHARED=='0'">LIBXML_STATIC</if></set>
    416 	
    417 	<!-- some conditional libraries dependencies -->
    418 	<set var="ICONV_LIB"><if cond="WITH_ICONV=='1'">iconv</if></set>
    419 	<set var="WSOCK32_LIB"><if cond="WITH_THREADS=='native'">wsock32</if></set>
    420 	<set var="ZLIB_LIB"><if cond="WITH_ZLIB=='1'">zdll</if></set>
    421 	<set var="POSIX_LIB"><if cond="WITH_THREADS=='posix'">pthreadVC</if></set>
    422 	
    423 	<set var="XMLINCLUDEDIR">$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)libxml$(DIRSEP)</set>
    424 
    425   
    426 
    427  
    428     <!--                                                            -->
    429     <!--               ABOUT CONFIG.H HEADER CREATION               -->
    430     <!--                                                            -->   
    431     
    432     <set var="CONFIG_SRCNAME">win32config.h</set>
    433     <set var="CONFIG_DSTNAME">config.h</set>
    434     
    435 	<if cond="FORMAT!='msvc6prj' and FORMAT!='autoconf' and FORMAT!='gnu'">
    436 		<copy-file-to-file id="setup">
    437 			<!-- On win32 we need to manually copy a default config.h file -->
    438 			<!-- from the include/mc/msw folder to include/mc			   -->
    439 			<src>../include/$(CONFIG_SRCNAME)</src>
    440 			<dst>../$(CONFIG_DSTNAME)</dst>
    441 			<dependency-of>all</dependency-of>
    442 
    443 			<!-- With autoconf, we will use the configure script to translate -->
    444 			<!-- include/mc/config.h.in to include/mc/config.h and thus we do -->
    445 			<!-- not need to do anything here...							  -->
    446 		</copy-file-to-file>
    447 	</if>
    448     
    449 	<if cond="FORMAT!='msvc6prj'">
    450 	    
    451 		<mkdir id="setuplibdir"><dir>$(XMLBASEDIR)$(DIRSEP)lib</dir></mkdir>
    452 		<mkdir id="setupbindir"><dir>$(XMLBASEDIR)$(DIRSEP)bin</dir></mkdir>
    453 			
    454 	    <!-- Creates all output folders -->	
    455 	    <phony id="setupdirs">
    456 			<dependency-of>all</dependency-of>	    
    457 	    	<depends>setuplibdir</depends>
    458 	    	<depends>setupbindir</depends>
    459 	    </phony>
    460 	</if>
    461 
    462     <!-- This defines a tag which includes headers on MSVC          -->
    463     <!-- Note that $(value) is stuck in there by bakefile,          -->
    464     <!-- and is the value between the beginning and end tag.        -->
    465     <define-tag name="headers" rules="dll,lib,exe">
    466         <if cond="FORMAT=='msvc6prj'">
    467             <msvc-project-files>
    468                 $(value)
    469             </msvc-project-files>
    470         </if>
    471     </define-tag>
    472     		
    473 	<!-- Creates the following custom build rule for MSVC6PRJ file:
    474 	     copies ..\include\win32config.h into ..\config.h
    475 	     NOTE: this tag must be used before the <sources> tag if you want that the configuration
    476 	           file will be created before any other source file is compiled... -->
    477     <define-tag name="msvc-copy-setup-h" rules="dll,lib,action">
    478         <if cond="FORMAT=='msvc6prj'">
    479 	        <headers>$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</headers>
    480 	        <set var="__subdir">$(value)</set>
    481             <set var="_custom_build_files" append="1">$(XMLBASEDIR)\include\$(CONFIG_SRCNAME)</set>
    482             <set var="_custom_build____include_win32config_h">
    483 Creating the configuration file ..\$(CONFIG_DSTNAME) from ..\include\$(CONFIG_SRCNAME)
    484 InputPath=..\include\$(CONFIG_SRCNAME)
    485 
    486 "..\$(CONFIG_DSTNAME)" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
    487 $(TAB)copy "$(DOLLAR)(InputPath)" ..\$(CONFIG_DSTNAME)
    488             </set>
    489         </if>
    490     </define-tag>
    491 
    492  
    493 
    494 
    495 
    496     <!--                                                            -->
    497     <!--                          TEMPLATES                         -->
    498     <!--                                                            -->   
    499 
    500 	<!-- The basic template: used by all the targets -->
    501     <template id="base">
    502         <if cond="FORMAT=='mingw'">                    
    503             <define>HAVE_W32API_H</define>
    504             <ldflags>-mthreads</ldflags>
    505         </if>
    506 
    507         <cxxflags>$(MYCPPFLAGS)</cxxflags>
    508         <warnings>$(WARNINGS)</warnings>
    509         <define>$(UNICODE_DEFINE)</define>
    510         <optimize>$(OPTIMIZEFLAG)</optimize>
    511         <debug-info>$(DEBUGINFO)</debug-info>
    512         <debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
    513 	</template>
    514 	
    515 	<!-- The template used both by the library and by the test programs -->
    516     <template id="xml2" template="base">
    517     
    518         <!-- -I & -L equivalents -->
    519         <include>$(XMLBASEDIR)$(DIRSEP)include</include>
    520         <include>$(ICONV_DIR)$(DIRSEP)include</include>
    521         <lib-path>$(ICONV_DIR)$(DIRSEP)lib</lib-path>    
    522         
    523 		<!-- some conditional define flags -->
    524         <cflags>$(THREADS_DEF)</cflags>
    525 		<define>$(ZLIB_DEF)</define>
    526 		<define>$(DEBUG_DEF)</define>
    527 		<define>$(STATIC_DEF)</define>
    528 	
    529 		<if cond="HAS_DEFINE_ARG=='0'">
    530 		
    531 			<!-- we are probably using an IDE output: defaults to WITH_THREADS=='native' -->
    532 			<define>_REENTRANT</define>
    533 			<define>HAVE_WIN32_THREADS</define>
    534 		</if>
    535 
    536 		
    537 		<!-- these must always be defined on win32 -->
    538 		<define>WIN32</define>		
    539 		<define>_WINDOWS</define>
    540 		<define>_MBCS</define>
    541 
    542 		<if cond="FORMAT=='borland'">
    543 			<define>_NO_VCL</define>
    544 			<define>EILSEQ=2</define>
    545 		</if>
    546     </template>
    547     
    548 	<!-- The template used by libxml2 test programs -->
    549 	<template id="xml2test" template="xml2">
    550         <dirname>$(XMLTESTDIR)</dirname>
    551         <app-type>console</app-type>        
    552 
    553         <library>libxml2</library>
    554 		
    555         <sys-lib>$(ICONV_LIB)</sys-lib>
    556         <sys-lib>$(WSOCK32_LIB)</sys-lib>
    557 		<sys-lib>$(ZLIB_LIB)</sys-lib> 
    558         <sys-lib>$(POSIX_LIB)</sys-lib>
    559 	</template>
    560 
    561 
    562 
    563 
    564  
    565 
    566     <!--                                                            -->
    567     <!--                  LIBXML2 LIBRARY TARGET                    -->
    568     <!--                                                            -->  
    569     
    570     <lib id="libxml2" template="xml2">
    571     	
    572     	<!-- this is useful only when using MSVC6PRJ -->
    573     	<if cond="FORMAT=='msvc6prj'">
    574     		<msvc-copy-setup-h/>
    575     		<msvc-file-group>Config headers:*config.h</msvc-file-group>
    576     	</if>
    577     	<if cond="FORMAT!='msvc6prj'">
    578 	    	<depends>setup</depends>
    579     		<depends>setuplibdir</depends>
    580     	</if>
    581     	    
    582     	<!-- output folder -->
    583         <dirname>$(XMLBASEDIR)$(DIRSEP)lib</dirname>
    584 		
    585 		<!-- The output name must be "libxml2.lib" with all compilers.
    586 		     Since mingw format autoadds the "lib" prefix to the library
    587 			 name, we must intercept that case to avoid to get "liblibxml2.a" -->
    588 		<if cond="FORMAT!='mingw'">
    589 	        <libname>libxml2</libname>
    590 		</if>
    591 		<if cond="FORMAT=='mingw'">
    592 	        <libname>xml2</libname>
    593 		</if>
    594 		        
    595         <!-- the list of source files to compile -->            
    596         <sources>
    597 			$(XMLBASEDIR)$(DIRSEP)c14n.c
    598 			$(XMLBASEDIR)$(DIRSEP)catalog.c
    599 			$(XMLBASEDIR)$(DIRSEP)chvalid.c
    600 			$(XMLBASEDIR)$(DIRSEP)debugXML.c
    601 			$(XMLBASEDIR)$(DIRSEP)dict.c
    602 			$(XMLBASEDIR)$(DIRSEP)DOCBparser.c
    603 			$(XMLBASEDIR)$(DIRSEP)encoding.c
    604 			$(XMLBASEDIR)$(DIRSEP)entities.c
    605 			$(XMLBASEDIR)$(DIRSEP)error.c
    606 			$(XMLBASEDIR)$(DIRSEP)globals.c
    607 			$(XMLBASEDIR)$(DIRSEP)hash.c
    608 			$(XMLBASEDIR)$(DIRSEP)HTMLparser.c
    609 			$(XMLBASEDIR)$(DIRSEP)HTMLtree.c
    610 			$(XMLBASEDIR)$(DIRSEP)legacy.c
    611 			$(XMLBASEDIR)$(DIRSEP)list.c
    612 			$(XMLBASEDIR)$(DIRSEP)nanoftp.c
    613 			$(XMLBASEDIR)$(DIRSEP)nanohttp.c
    614 			$(XMLBASEDIR)$(DIRSEP)parser.c
    615 			$(XMLBASEDIR)$(DIRSEP)parserInternals.c
    616 			$(XMLBASEDIR)$(DIRSEP)pattern.c
    617 			$(XMLBASEDIR)$(DIRSEP)relaxng.c
    618 			$(XMLBASEDIR)$(DIRSEP)SAX2.c
    619 			$(XMLBASEDIR)$(DIRSEP)SAX.c
    620 			$(XMLBASEDIR)$(DIRSEP)threads.c
    621 			$(XMLBASEDIR)$(DIRSEP)tree.c
    622 			$(XMLBASEDIR)$(DIRSEP)uri.c
    623 			$(XMLBASEDIR)$(DIRSEP)valid.c
    624 			$(XMLBASEDIR)$(DIRSEP)xinclude.c
    625 			$(XMLBASEDIR)$(DIRSEP)xlink.c
    626 			$(XMLBASEDIR)$(DIRSEP)xmlIO.c
    627 			$(XMLBASEDIR)$(DIRSEP)xmlmemory.c
    628 			$(XMLBASEDIR)$(DIRSEP)xmlreader.c
    629 			$(XMLBASEDIR)$(DIRSEP)xmlregexp.c
    630 			$(XMLBASEDIR)$(DIRSEP)xmlsave.c
    631 			$(XMLBASEDIR)$(DIRSEP)xmlschemas.c
    632 			$(XMLBASEDIR)$(DIRSEP)xmlschemastypes.c
    633 			$(XMLBASEDIR)$(DIRSEP)xmlunicode.c
    634 			$(XMLBASEDIR)$(DIRSEP)xmlwriter.c
    635 			$(XMLBASEDIR)$(DIRSEP)xpath.c
    636 			$(XMLBASEDIR)$(DIRSEP)xpointer.c
    637 			$(XMLBASEDIR)$(DIRSEP)xmlstring.c
    638         </sources>
    639         
    640         <!-- the list of header files (for IDE projects) -->
    641         <headers>
    642 			$(XMLINCLUDEDIR)c14n.h
    643 			$(XMLINCLUDEDIR)catalog.h
    644 			$(XMLINCLUDEDIR)chvalid.h
    645 			$(XMLINCLUDEDIR)debugXML.h
    646 			$(XMLINCLUDEDIR)dict.h
    647 			$(XMLINCLUDEDIR)DOCBparser.h
    648 			$(XMLINCLUDEDIR)encoding.h
    649 			$(XMLINCLUDEDIR)entities.h
    650 			$(XMLINCLUDEDIR)globals.h
    651 			$(XMLINCLUDEDIR)hash.h
    652 			$(XMLINCLUDEDIR)HTMLparser.h
    653 			$(XMLINCLUDEDIR)HTMLtree.h
    654 			$(XMLINCLUDEDIR)list.h
    655 			$(XMLINCLUDEDIR)nanoftp.h
    656 			$(XMLINCLUDEDIR)nanohttp.h
    657 			$(XMLINCLUDEDIR)parser.h
    658 			$(XMLINCLUDEDIR)parserInternals.h
    659 			$(XMLINCLUDEDIR)pattern.h
    660 			$(XMLINCLUDEDIR)relaxng.h
    661 			$(XMLINCLUDEDIR)SAX.h
    662 			$(XMLINCLUDEDIR)SAX2.h
    663 			$(XMLINCLUDEDIR)schemasInternals.h
    664 			$(XMLINCLUDEDIR)threads.h
    665 			$(XMLINCLUDEDIR)tree.h
    666 			$(XMLINCLUDEDIR)uri.h
    667 			$(XMLINCLUDEDIR)valid.h
    668 			$(XMLINCLUDEDIR)xinclude.h
    669 			$(XMLINCLUDEDIR)xlink.h
    670 			$(XMLINCLUDEDIR)xmlautomata.h
    671 			$(XMLINCLUDEDIR)xmlerror.h
    672 			$(XMLINCLUDEDIR)xmlexports.h
    673 			$(XMLINCLUDEDIR)xmlIO.h
    674 			$(XMLINCLUDEDIR)xmlmemory.h
    675 			$(XMLINCLUDEDIR)xmlmodule.h
    676 			$(XMLINCLUDEDIR)xmlreader.h
    677 			$(XMLINCLUDEDIR)xmlregexp.h
    678 			$(XMLINCLUDEDIR)xmlsave.h
    679 			$(XMLINCLUDEDIR)xmlschemas.h
    680 			$(XMLINCLUDEDIR)xmlschemastypes.h
    681 			$(XMLINCLUDEDIR)xmlstring.h
    682 			$(XMLINCLUDEDIR)xmlunicode.h
    683 			$(XMLINCLUDEDIR)xmlversion.h			
    684 			$(XMLINCLUDEDIR)xmlwriter.h
    685 			$(XMLINCLUDEDIR)xpath.h
    686 			$(XMLINCLUDEDIR)xpathInternals.h
    687 			$(XMLINCLUDEDIR)xpointer.h
    688 		</headers>
    689 
    690 		<!-- these ones are not inside the include/libxml folder -->
    691 		<headers>
    692 			$(XMLBASEDIR)$(DIRSEP)libxml.h
    693 			$(XMLBASEDIR)$(DIRSEP)triodef.h
    694 			$(XMLBASEDIR)$(DIRSEP)trionan.h
    695 			$(XMLBASEDIR)$(DIRSEP)include$(DIRSEP)wsockcompat.h			
    696        </headers>
    697     </lib>
    698 
    699 
    700 
    701     <!--                                                -->
    702     <!--               LIBXML2 test programs            -->
    703     <!--                                                -->
    704 	
    705 	<set var="BUILD_ALL_TESTS">
    706 
    707 		<!-- when using full options support with MSVC6PRJ we should
    708 		     avoid to create all the DSP files required for the test
    709 			 programs: they would take a _lot_ of space !! -->
    710 		<if cond="FORMAT=='msvc6prj' and FULL_OPTIONS_SUPPORT=='1'">0</if>
    711 
    712 		<!-- when creating a makefile or using MSVC6PRJ with limited
    713 		     options support, then we can build all the tests safely -->
    714 		<if cond="FORMAT!='msvc6prj' or FULL_OPTIONS_SUPPORT=='0'">1</if>
    715 
    716 	</set>
    717 
    718     <if cond="BUILD_ALL_TESTS=='1'">
    719 
    720 		<exe id="testAutomata" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testAutomata.c</sources></exe>
    721 		<exe id="testC14N" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testC14N.c</sources></exe>
    722 		<exe id="testHTML" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testHTML.c</sources></exe>
    723 		<exe id="testReader" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testReader.c</sources></exe>
    724 		<exe id="testRegexp" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRegexp.c</sources></exe>
    725 		<exe id="testRelax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testRelax.c</sources></exe>
    726 		<exe id="testSax" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSax.c</sources></exe>
    727 		<exe id="testSchemas" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testSchemas.c</sources></exe>
    728 		<exe id="testURI" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testURI.c</sources></exe>
    729 		<exe id="testXPath" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testXPath.c</sources></exe>
    730 		<exe id="xmllint" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)xmllint.c</sources></exe>
    731 
    732 		<if cond="FORMAT=='autoconf'">
    733 			<exe id="testdso" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testdso.c</sources></exe>
    734 		</if>
    735 
    736 	<!-- FIXME:
    737 		<exe id="testModule" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testModule.c</sources></exe>
    738 
    739 		<if cond="WITH_THREADS=='posix'">
    740 			<exe id="testThreads" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreads.c</sources></exe>
    741 		</if>
    742 		<if cond="WITH_THREADS=='ctls' or WITH_THREADS=='native'">
    743 			<exe id="testThreadsWin32" template="xml2test"><sources>$(XMLBASEDIR)$(DIRSEP)testThreadsWin32.c</sources></exe>
    744 		</if>
    745 	-->
    746 	</if>
    747 
    748 </makefile>
    749