1<?xml version="1.0" encoding="utf-8"?> 2<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <ItemGroup> 4 <PropertyPageSchema Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml"/> 5 <AvailableItemName Include="NASM"> 6 <Targets>_NASM</Targets> 7 </AvailableItemName> 8 </ItemGroup> 9 <PropertyGroup> 10 <ComputeLinkInputsTargets> 11 $(ComputeLinkInputsTargets); 12 ComputeNASMOutput; 13 </ComputeLinkInputsTargets> 14 <ComputeLibInputsTargets> 15 $(ComputeLibInputsTargets); 16 ComputeNASMOutput; 17 </ComputeLibInputsTargets> 18 </PropertyGroup> 19 <UsingTask TaskName="NASM" TaskFactory="XamlTaskFactory" AssemblyName="Microsoft.Build.Tasks.v4.0"> 20 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task> 21 </UsingTask> 22 <Target Name="_NASM" BeforeTargets="$(NASMBeforeTargets)" AfterTargets="$(NASMAfterTargets)" Condition="'@(NASM)' != ''" Outputs="%(NASM.OutputFormat)" Inputs="%(NASM.Identity);%(NASM.AdditionalDependencies);$(MSBuildProjectFile)" DependsOnTargets="_SelectedFiles"> 23 <ItemGroup Condition="'@(SelectedFiles)' != ''"> 24 <NASM Remove="@(NASM)" Condition="'%(Identity)' != '@(SelectedFiles)'"/> 25 </ItemGroup> 26 <ItemGroup> 27 <NASM_tlog Include="%(NASM.OutputFormat)" Condition="'%(NASM.OutputFormat)' != '' and '%(NASM.ExcludedFromBuild)' != 'true'"> 28 <Source>@(NASM, '|')</Source> 29 </NASM_tlog> 30 </ItemGroup> 31 <Message Importance="High" Text="%(NASM.ExecutionDescription)"/> 32 <WriteLinesToFile Condition="'@(NASM_tlog)' != '' and '%(NASM_tlog.ExcludedFromBuild)' != 'true'" File="$(IntDir)$(ProjectName).write.1.tlog" Lines="^%(NASM_tlog.Source);@(NASM_tlog->'%(Fullpath)')"/> 33 <NASM Condition="'@(NASM)' != '' and '%(NASM.ExcludedFromBuild)' != 'true'" Inputs="%(NASM.Inputs)" OutputFormat="%(NASM.OutputFormat)" Outputswitch="%(NASM.Outputswitch)" AssembledCodeListingFile="%(NASM.AssembledCodeListingFile)" GenerateDebugInformation="%(NASM.GenerateDebugInformation)" ErrorReporting="%(NASM.ErrorReporting)" IncludePaths="%(NASM.IncludePaths)" PreprocessorDefinitions="%(NASM.PreprocessorDefinitions)" UndefinePreprocessorDefinitions="%(NASM.UndefinePreprocessorDefinitions)" ErrorReportingFormat="%(NASM.ErrorReportingFormat)" TreatWarningsAsErrors="%(NASM.TreatWarningsAsErrors)" floatunderflow="%(NASM.floatunderflow)" macrodefaults="%(NASM.macrodefaults)" user="%(NASM.user)" floatoverflow="%(NASM.floatoverflow)" floatdenorm="%(NASM.floatdenorm)" numberoverflow="%(NASM.numberoverflow)" macroselfref="%(NASM.macroselfref)" floattoolong="%(NASM.floattoolong)" orphanlabels="%(NASM.orphanlabels)" CommandLineTemplate="%(NASM.CommandLineTemplate)" AdditionalOptions="%(NASM.AdditionalOptions)"/> 34 </Target> 35 <Target Name="ComputeNASMOutput" Condition="'@(NASM)' != ''"> 36 <ItemGroup> 37 <Link Include="@(NASM->Metadata('OutputFormat')->Distinct()->ClearMetadata())" Condition="'%(NASM.ExcludedFromBuild)' != 'true'"/> 38 <Lib Include="@(NASM->Metadata('OutputFormat')->Distinct()->ClearMetadata())" Condition="'%(NASM.ExcludedFromBuild)' != 'true'"/> 39 </ItemGroup> 40 </Target> 41</Project> 42