<?xml version="1.0" encoding="UTF-8"?>
<Config>
   <Tool Header="RANLIB" Desc="RANLIB Library Manager" Separator=";" ExitFail="0" SourceFilter="*.rapp" TargetFilter="ARM" ConfigPath="ARM\RANLIB.config" MsgFilter="{SPECFILE}:{SPECLINE}: {SPECERROR}:{SPECMESSAGE}">
      <!-- do some local correction according to target STM3 specificities -->
      <![CDATA[script
         {
         var processor = Tools.GetPropertyValue("Target", "ProcessorARM", "Processor");
         //STM3
         if( (processor.charAt(0) == "S") && (processor.charAt(1) == "T")
             && (processor.charAt(2) == "M") && (processor.charAt(3) == "3") )
            {
            Tools.SetPropertyValue("Target", "ProcessorARM", "Thumb", "-mthumb");
            Tools.SetPropertyValue("Target", "ProcessorARM", "Interwork", " ");
            }
         }
      ]]>
      <!-- make .RANLIB files -->
      <![CDATA[script
         {
         var inputfiles = Tools.GetPropertyValue("RANLIB", "General", "InputFiles");
         inputfiles = inputfiles.replace(/;/g, " ");     // Replace "\" with "\\"
         Tools.SetPropertyValue("RANLIB", "General", "InputFiles", inputfiles);
         }
      ]]>
      <!-- remove previous file -->
      <![CDATA[script
         {
         var  outputfile = Tools.GetPropertyValue("", "Build", "OutputFile");
         outputfile = outputfile.replace(/\\/g, "\\\\");     // Replace "\" with "\\"
         if( objFSO.FileExists( outputfile ) )
            {
            objFSO.DeleteFile ( outputfile , true ) ;
            }
         }
      ]]>
      <!-- make archive -->
      <![CDATA["$(RKitInst)arm-gcc\bin\arm-none-eabi-ar.exe" cq "$(BuiRANLIB.OutputFile)" $(BuiRANLIB.InputFiles) ]]>
   </Tool>
   <Defs>
      <Set Header="RANLIB" Desc="RANLIB Library Manager">
         <Section Header="General" Hidden="1">
            <Property Header="OutExt" Type="PT_STRING" Value=".lib" />
            <Property Header="ListExt" Type="PT_STRING" Value=".map" />
            <Property Header="InputFiles" Type="PT_STRING" Value="" />
            <Property Header="DefaultLibDir" Type="PT_STRING" Value="" />
            <Property Header="HexFile" Type="PT_STRING" Value="" />
         </Section>
      </Set>
   </Defs>
</Config>
