<?xml version="1.0" encoding="UTF-8"?>
<!--
  ANT Buildfile
 
  Copyright 2021-2023 IS2T. All rights reserved.
  IS2T PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
-->
<project name="kdatgen.definition">

	<!-- 
		Kernel Metadata Extractor
	-->
	
	<property name="microjvm.dir" location="${platform.dir}/MICROJVM"/>
	<property name="scripts.dir" location="${platform.dir}/scripts"/>
	<property name="tools.dir" location="${platform.dir}/tools"/>
	<loadproperties srcfile="${scripts.dir}/core.properties"/>

	<loadproperties srcfile="${scripts.dir}/soar2.properties" prefix="soar2"/>
	<import file="dynSOAR2PathDefinition.xml"/>
		
	<property name="kdatgen.classname" value="com.microej.soar.KernelMetadataExtractorTask"/>
	
	<path id="soar2-kdatgen.classpath.path">
		<path refid="soar2-r.dyn.classpath.path"/>
	</path>
	
	<!-- Silently skip if soar is unavailable (e.g virtual device strip - execSOAR will be set to false later) -->
	<taskdef name="soar2KDatGenTask" classname="${kdatgen.classname}" classpathref="soar2-kdatgen.classpath.path" onerror="ignore"/>

	<presetdef name="kdatGen">
		<!-- By default, print where is generated the '.kdat' file (verbose enabled) --> 
		<soar2KDatGenTask
			verboseLevel="1"
			endianness="${arch.endianness}"
		/>
	</presetdef>

</project>