<project name="Apache Axis C Build Tools" default="" basedir="..">

	<!--
	  Compile, package and run the C binding generator
	  -->
	<target name="buildCBindings" depends="compileCBindings" if="buildCBindings"
	  description="Generate the C bindings and compile and link the C bindings client library"/>

	<!--
	  Compile the Axis C Bindings Client Library
	  -->
	  <target name="compileCBindings" if="buildCBindings">
		<mkdir dir="${dir.objects}"/>
		<mkdir dir="${dir.bin}"/>
        <antcall target="buildVersionResource" inheritall="true">
            <param name="internalName" value="${cClientLibraryName}"/>
        </antcall>    
		<if>
			<not>
				<isset property="aix"/>
			</not>
			<then>
				<cc outfile="${dir.bin}/${cClientLibraryName}" objdir="${dir.objects}"
				 exceptions="true" outtype="shared" multithreaded="true">
				  	<!-- Compilers -->
					<compiler refid="SolarisCC"/>
					<compiler refid="Linuxgcc"/>
					<compiler extends="VisualC++">
						<defineset>
							<define name="AXISCLIENTCDLL_EXPORTS"/>
						</defineset>
					</compiler>
                    <compiler refid="HP-UXaC++"/>            
			            <compiler refid="OS400icc"/>
					<!-- Additional compiler flag for Client library on all platforms -->
					<defineset>
						<define name="AXIS_CLIENTC_LIB"/>
					</defineset>
					<includepath path="${dir.include}${path.separator}${dir.obj}/include"/>
					<!-- Linkers -->
					<linker refid="SolarisLinker"/>
					<linker refid="LinuxLinker"/>
					<linker refid="VisualC++Linker"/>
                    <linker refid="HP-UXLinker"/>            
			        <linker extends="OS400Linker">
                        <linkerarg value="-qDUPPROC"/>
                        <linkerarg value="-qDUPVAR"/>
                        <linkerarg location="end" value="${dir.bin}/lib${clientLibraryName}.so"/>
                    </linker>
					<!-- Additional library of the Axis Client Library -->
					<libset dir="${dir.bin}" libs="${clientLibraryName}" unless="os400"/>
					<!-- Files to be compiled -->
					<fileset dir="${dir.src}">
						<include name="cbindings/**"/>
					</fileset>
				</cc>
			</then>
			<else>
				<cc outfile="${dir.bin}/${libraryPrefix}${cClientLibraryName}${librarySuffix}" 
                         objdir="${dir.objects}" exceptions="true" multithreaded="true">
				  	<!-- Compilers -->
					<compiler refid="AIXxlc"/>
					<!-- Additional compiler flag for Client library on all platforms -->
					<defineset>
						<define name="AXIS_CLIENTC_LIB"/>
					</defineset>
					<includepath path="${dir.include}${path.separator}${dir.obj}/include"/>
					<!-- Linkers -->
					<linker refid="AIXLinker"/>
					<!-- Additional library of the Axis Client Library -->
					<libset dir="${dir.bin}" libs="${clientLibraryName}"/>
					<!-- Files to be compiled -->
					<fileset dir="${dir.src}">
						<include name="cbindings/**"/>
					</fileset>
				</cc>
			</else>
		</if>
	</target>
</project>