<?xml version="1.0" encoding="UTF-8"?>
<!--
  	ANT
 
  	Copyright 2015-2021 IS2T. All rights reserved.
	Modification and distribution is permitted under certain conditions.
  	IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->
<project name="kfAnttoolsDefinition">

	<dirname file="${ant.file.kfAnttoolsDefinition}" property="kfAnttoolsDefinitions.basedir"/>
	
	<path id="kfAntTools.classpath.ref">
		<fileset dir="${kfAnttoolsDefinitions.basedir}/../tools" includes="kfAntTools*.jar"/>
		<fileset dir="${microjvm.dir}/../tools" includes="kfAntTools*.jar"/>
		<fileset dir="${kfAnttoolsDefinitions.basedir}/../tools" includes="soarModelReader.jar"/>
	</path>
	<taskdef resource="com/is2t/ant/kf/tools/antlib.xml" classpathref="kfAntTools.classpath.ref" />
	
	<target name="kfAntTools/dyninit" extensionOf="dyninit/context">
		<!-- Compute API / Not API classpath -->
		<condition property="APIClasspathExtractor.verbose" value="true" else="false">
			<isset property="execution.verbose"/> <!-- workbench option -->
		</condition>
				
		<!-- 
			Compute API / not API classpath
			brita platforms backward compatibility: ej.kf.FeatureEntryPoint is not taken account to consider a classpath as an API classpath (class was generated by wadapps workbench)  
		 -->
		<fail unless="arch.endianness"/> <!-- previously loaded by dynamicFeatureLink.xml -->
		<APIClasspathExtractor 
			verbose="${APIClasspathExtractor.verbose}"
			kernelFilename="${kernel.filename}" 
			endianness="${arch.endianness}" 
			classpath="${application.classpath}"
			readerFormat="elf"
			outputAPIClasspathProperty="application.api.classpath"
			outputNotAPIClasspathProperty="application.notapi.classpath"
			excludeTypes="ej.kf.FeatureEntryPoint"
		/>
	</target>
</project>