Download this file
204 lines (193 with data), 7.7 kB
<?xml version="1.0"?>
<project name="aprutil" default="build" basedir="..\apr-util">
<!-- ====================================================================== -->
<!-- Configuration targets -->
<!-- ====================================================================== -->
<target name="debug">
<description>
Sets the environment up to build the debug versions.
</description>
<property name="configuration" value="debug" />
</target>
<!-- ====================================================================== -->
<!-- Project targets -->
<!-- ====================================================================== -->
<target name="rebuild" depends="clean,build" />
<target name="clean">
<description>
Cleans previous built files.
</description>
<delete>
<fileset>
<include name="${configuration}_${platform}\**" />
<include name="xml\expat\lib\${configuration}_${platform}\**" />
</fileset>
</delete>
</target>
<target name="gen_uri_delims">
<mkdir dir="uri\obj_${platform}" />
<cl outputdir="uri\obj_${platform}">
<sources>
<include name="uri\gen_uri_delims.c" />
</sources>
<defines>
<define name="APU_DECLARE_STATIC" />
<define name="WIN32" />
<define name="WIN64" if="${platform == 'x64'}" />
<define name="_WINDOWS" />
<define name="_WIN32" />
<define name="NDEBUG" />
</defines>
</cl>
<link output="uri\gen_uri_delims.exe">
<sources>
<include name="uri\obj_${platform}\*.obj" />
</sources>
</link>
</target>
<target name="xml">
<mkdir dir="xml\expat\lib\${configuration}_${platform}" />
<copy file="xml\expat\lib\winconfig.h" tofile="xml\expat\lib\config.h" overwrite="true" />
<loadfile file="xml\expat\lib\expat.h.in" property="expatheader">
<filterchain>
<replacetokens begintoken="@" endtoken="@">
<token key="EXPAT_MAJOR_VERSION" value="1" />
<token key="EXPAT_MINOR_VERSION" value="95" />
<token key="EXPAT_EDIT" value="2" />
</replacetokens>
</filterchain>
</loadfile>
<echo file="xml\expat\lib\expat.h" message="${expatheader}" />
<cl outputdir="xml\expat\lib\${configuration}_${platform}">
<arg value="/O2" if="${configuration == 'release'}" />
<arg value="/Ob1" if="${configuration == 'release'}" />
<arg value="/Od" if="${configuration != 'release'}" />
<arg value="/GF" if="${configuration == 'release'}" />
<arg value="/FD" />
<arg value="/EHsc" />
<arg value="/MT" if="${configuration == 'release'}" />
<arg value="/MTd" if="${configuration != 'release'}" />
<arg value="/Gy" />
<arg value="/W3" />
<arg value="/nologo" />
<arg value="/c" />
<arg value="/Zi" />
<arg value="/errorReport:prompt" />
<sources>
<include name="xml\expat\lib\xmlparse.c" />
<include name="xml\expat\lib\xmlrole.c" />
<include name="xml\expat\lib\xmltok.c" />
</sources>
<includedirs>
<include name="include" />
<include name="include\private" />
<include name="xml\expat\lib" />
</includedirs>
<defines>
<define name="APU_DECLARE_STATIC" />
<define name="APR_DECLARE_STATIC" />
<define name="WIN32" />
<define name="_WINDOWS" />
<define name="_WIN32" />
<define name="WIN64" if="${platform == 'x64'}" />
<define name='VERSION=\"expat_1.95.2\"' />
<define name="NDEBUG" if="${configuration == 'release'}"/>
<define name="_DEBUG" if="${configuration != 'release'}"/>
</defines>
</cl>
<property name="machineoption" value="/MACHINE:X86" if="${platform == 'win32'}" />
<property name="machineoption" value="/MACHINE:x64" if="${platform == 'x64'}" />
<lib
output="xml\expat\lib\${configuration}_${platform}\xml.lib"
options='/NOLOGO /SUBSYSTEM:WINDOWS ${machineoption}'>
<sources>
<include name="xml\expat\lib\${configuration}_${platform}\*.obj" />
</sources>
</lib>
</target>
<target name="build" depends="gen_uri_delims,xml">
<mkdir dir="${configuration}_${platform}" />
<copy file="..\build\apu.hw" tofile="include\apu.h" overwrite="true" />
<copy file="include\apu_want.hw" tofile="include\apu_want.h" overwrite="true" />
<copy file="include\apr_ldap.hw" tofile="include\apr_ldap.h" overwrite="true" />
<copy file="include\private\apu_select_dbm.hw" tofile="include\private\apu_select_dbm.h" overwrite="true" />
<copy file="include\private\apu_config.hw" tofile="include\private\apu_config.h" overwrite="true" />
<loadfile file="include\apu_version.h" property="versionfile" />
<regex pattern="#define APU_MAJOR_VERSION( )+(?'APU_MAJOR_VERSION'\d+)" input="${versionfile}" />
<echo message="${APU_MAJOR_VERSION}" />
<regex pattern="#define APU_MINOR_VERSION[ ]+(?'APU_MINOR_VERSION'\d+)" input="${versionfile}" />
<echo message="${APU_MINOR_VERSION}" />
<regex pattern="#define APU_PATCH_VERSION[ ]+(?'APU_PATCH_VERSION'\d+)" input="${versionfile}" />
<echo message="${APU_PATCH_VERSION}" />
<loadfile file="libaprutil.rc" property="rcfile">
<filterchain>
<replacestring from="0,0,0" to="${APU_MAJOR_VERSION},${APU_MINOR_VERSION},${APU_PATCH_VERSION}" />
<replacestring from="0.0.0" to="${APU_MAJOR_VERSION},${APU_MINOR_VERSION},${APU_PATCH_VERSION}" />
</filterchain>
</loadfile>
<echo file="libaprutilver.rc" message="${rcfile}" />
<rc rcfile="libaprutilver.rc" output="${configuration}_${platform}\libaprutil.res">
<includedirs>
<include name="..\apr\include" />
<include name="include" />
</includedirs>
</rc>
<exec program="uri\gen_uri_delims.exe" output="uri\uri_delims.h" unless="${file::exists('uri\uri_delims.h')}" />
<cl outputdir="${configuration}_${platform}">
<arg value="/O2" if="${configuration == 'release'}" />
<arg value="/Ob1" if="${configuration == 'release'}" />
<arg value="/Od" if="${configuration != 'release'}" />
<arg value="/GF" if="${configuration == 'release'}" />
<arg value="/FD" />
<arg value="/EHsc" />
<arg value="/MT" if="${configuration == 'release'}" />
<arg value="/MTd" if="${configuration != 'release'}" />
<arg value="/Gy" />
<arg value="/W3" />
<arg value="/nologo" />
<arg value="/c" />
<arg value="/Zi" />
<arg value="/errorReport:prompt" />
<sources>
<include name="buckets\*.c" />
<include name="crypto\*.c" />
<include name="dbm\*.c" />
<include name="dbm\sdbm\*.c" />
<include name="encoding\*.c" />
<include name="hooks\*.c" />
<include name="ldap\*.c" />
<include name="misc\*.c" />
<include name="strmatch\*.c" />
<include name="uri\apr_uri.c" />
<include name="xml\apr_xml.c" />
</sources>
<includedirs>
<include name="include" />
<include name="include\private" />
<include name="xml\expat\lib" />
<include name="..\apr\include" />
</includedirs>
<defines>
<define name="APU_DECLARE_STATIC" />
<define name="APR_DECLARE_STATIC" />
<define name="WIN32" />
<define name="_WINDOWS" />
<define name="_WIN32" />
<define name="WIN64" if="${platform == 'x64'}" />
<define name="_WINDLL" />
<define name="NDEBUG" if="${configuration == 'release'}"/>
<define name="_DEBUG" if="${configuration != 'release'}"/>
</defines>
</cl>
<property name="machineoption" value="/MACHINE:X86" />
<property name="machineoption" value="/MACHINE:x64" if="${platform == 'x64'}" />
<lib
output="${configuration}_${platform}\libaprutil.lib"
options='/NOLOGO /DEBUG /PDB:".\${configuration}_${platform}/libaprutil.pdb" /SUBSYSTEM:WINDOWS'>
<sources>
<include name="${configuration}_${platform}\*.obj" />
<include name="xml\expat\lib\${configuration}_${platform}\*.obj" />
</sources>
</lib>
</target>
</project>
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.