<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <PropertyPageSchema
      Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
    <AvailableItemName
      Include="asn1c.cmd">
      <Targets>_asn1c.cmd</Targets>
    </AvailableItemName>
  </ItemGroup>
  <UsingTask
    TaskName="asn1c.cmd"
    TaskFactory="XamlTaskFactory"
    AssemblyName="Microsoft.Build.Tasks.v4.0">
    <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
  </UsingTask>
  <Target
    Name="_asn1c.cmd"
    BeforeTargets="$(asn1c.cmdBeforeTargets)"
    AfterTargets="$(asn1c.cmdAfterTargets)"
    Condition="'@(asn1c.cmd)' != ''"
    DependsOnTargets="$(asn1c.cmdDependsOn);Computeasn1c.cmdOutput"
    Outputs="%(asn1c.cmd.Outputs)"
    Inputs="%(asn1c.cmd.Identity);%(asn1c.cmd.AdditionalDependencies);$(MSBuildProjectFile)">
    <ItemGroup
      Condition="'@(SelectedFiles)' != ''">
      <asn1c.cmd
        Remove="@(asn1c.cmd)"
        Condition="'%(Identity)' != '@(SelectedFiles)'" />
    </ItemGroup>
    <ItemGroup>
      <asn1c.cmd_tlog
        Include="%(asn1c.cmd.Outputs)"
        Condition="'%(asn1c.cmd.Outputs)' != '' and '%(asn1c.cmd.ExcludedFromBuild)' != 'true'">
        <Source>@(asn1c.cmd, '|')</Source>
      </asn1c.cmd_tlog>
    </ItemGroup>
    <Message
      Importance="High"
      Text="%(asn1c.cmd.ExecutionDescription)" />
    <WriteLinesToFile
      Condition="'@(asn1c.cmd_tlog)' != '' and '%(asn1c.cmd_tlog.ExcludedFromBuild)' != 'true'"
      File="$(IntDir)$(ProjectName).write.1.tlog"
      Lines="^%(asn1c.cmd_tlog.Source);@(asn1c.cmd_tlog-&gt;'%(Fullpath)')" />
    <asn1c.cmd
      Condition="'@(asn1c.cmd)' != '' and '%(asn1c.cmd.ExcludedFromBuild)' != 'true'"
      CommandLineTemplate="%(asn1c.cmd.CommandLineTemplate)"
      AdditionalOptions="%(asn1c.cmd.AdditionalOptions)"
      Inputs="%(asn1c.cmd.Identity)" />
  </Target>
  <PropertyGroup>
    <ComputeLinkInputsTargets>
            $(ComputeLinkInputsTargets);
            Computeasn1c.cmdOutput;
          </ComputeLinkInputsTargets>
    <ComputeLibInputsTargets>
            $(ComputeLibInputsTargets);
            Computeasn1c.cmdOutput;
          </ComputeLibInputsTargets>
  </PropertyGroup>
  <Target
    Name="Computeasn1c.cmdOutput"
    Condition="'@(asn1c.cmd)' != ''">
    <ItemGroup>
      <asn1c.cmdDirsToMake
        Condition="'@(asn1c.cmd)' != '' and '%(asn1c.cmd.ExcludedFromBuild)' != 'true'"
        Include="%(asn1c.cmd.Outputs)" />
      <Link
        Include="%(asn1c.cmdDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
      <Lib
        Include="%(asn1c.cmdDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
      <ImpLib
        Include="%(asn1c.cmdDirsToMake.Identity)"
        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
    </ItemGroup>
    <MakeDir
      Directories="@(asn1c.cmdDirsToMake-&gt;'%(RootDir)%(Directory)')" />
  </Target>
</Project>