wintun/wintun.proj
Simon Rozman b79703bba8 vcxproj: swap configuration and platform subfolder hierarchy
This should allow wintun.dll to simplify referencing same configuration
but different platform wintun.dll for WoW64 support.

Signed-off-by: Simon Rozman <simon@rozman.si>
2020-10-30 16:51:00 +01:00

86 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
SPDX-License-Identifier: GPL-2.0
Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<!--
General Properties
-->
<Import Project="wintun.props" />
<Import Project="wintun.vcxproj.user" Condition="exists('wintun.vcxproj.user')" />
<Target Name="Build" DependsOnTargets="Driver-x86;Driver-amd64;Driver-arm64" />
<Target Name="MSM" DependsOnTargets="MSM-x86;MSM-amd64;MSM-arm64" />
<Target Name="Clean">
<RemoveDir Directories="Release\amd64\" />
<RemoveDir Directories="Release\arm\" />
<RemoveDir Directories="Release\arm64\" />
<RemoveDir Directories="Release\x86\" />
<RemoveDir Directories="$(SDVDir)" />
<RemoveDir Directories="$(DistributionDir)" />
<Delete Files="smvbuild.log;smvstats.txt;wintun.DVL.XML" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<!--
Driver Building
Note: Use explicit Inputs/Outputs as WindowsDriver.Common.targets triggers driver re-packaging and signing on every invocation.
-->
<PropertyGroup>
<DriverInputs>atomic.h;undocumented.h;wintun.c;wintun.inf;wintun.props;wintun.rc;wintun.vcxproj;$(DriverInputs)</DriverInputs>
</PropertyGroup>
<Target Name="Driver-x86"
Outputs="Release\x86\wintun\wintun.sys;Release\x86\wintun\wintun.inf;Release\x86\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=Win32" />
</Target>
<Target Name="Driver-amd64"
Outputs="Release\amd64\wintun\wintun.sys;Release\amd64\wintun\wintun.inf;Release\amd64\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=x64" />
</Target>
<Target Name="Driver-arm64"
Outputs="Release\arm64\wintun\wintun.sys;Release\arm64\wintun\wintun.inf;Release\arm64\wintun\wintun.cat"
Inputs="$(DriverInputs)">
<MSBuild Projects="wintun.vcxproj" Targets="Build" Properties="Configuration=Release;Platform=ARM64" />
</Target>
<!--
Static Driver Verifier
-->
<Target Name="SDV" Outputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/check:*;Configuration=Release;Platform=x64" />
</Target>
<Target Name="SDVView">
<MSBuild Projects="wintun.vcxproj" Targets="sdv" Properties="Inputs=/view;Configuration=Release;Platform=x64" />
</Target>
<!--
Driver Verification Log
-->
<Target Name="DVL" DependsOnTargets="SDV"
Outputs="wintun.DVL.XML"
Inputs="$(SDVDir)SDV.DVL.xml;Release\amd64\vc.nativecodeanalysis.all.xml">
<MSBuild Projects="wintun.vcxproj" Targets="dvl" Properties="Configuration=Release;Platform=x64" />
</Target>
<!--
MSM Building
-->
<Target Name="MSM-x86"
Outputs="$(DistributionDir)wintun-x86-$(WintunVersionStr).msm">
<MSBuild Projects="installer\installer.vcxproj" Targets="MSM" Properties="Configuration=Release;Platform=Win32" />
</Target>
<Target Name="MSM-amd64"
Outputs="$(DistributionDir)wintun-amd64-$(WintunVersionStr).msm">
<MSBuild Projects="installer\installer.vcxproj" Targets="MSM" Properties="Configuration=Release;Platform=x64" />
</Target>
<Target Name="MSM-arm64"
Outputs="$(DistributionDir)wintun-arm64-$(WintunVersionStr).msm">
<MSBuild Projects="installer\installer.vcxproj" Targets="MSM" Properties="Configuration=Release;Platform=ARM64" />
</Target>
</Project>