Revise architecture naming convention

Adopt PROCESSOR_ARCHITECTURE environment variable platform designation,
make it lowercase, and unify output folder naming.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2019-04-15 13:14:42 +02:00
parent 82655e6e0e
commit afef39616c
4 changed files with 27 additions and 22 deletions

8
.gitignore vendored
View File

@ -3,10 +3,10 @@
*.user *.user
# Build Output # Build Output
/Release /x86/Release
/Debug /x86/Debug
/x64/Release /amd64/Release
/x64/Debug /amd64/Debug
# Static Driver Verifier Output # Static Driver Verifier Output
/sdv /sdv

View File

@ -8,14 +8,19 @@
CFG=Release CFG=Release
!ENDIF !ENDIF
!IFNDEF PLAT !IFNDEF PLAT
PLAT=x64 PLAT=amd64
!ENDIF !ENDIF
!IF "$(PLAT)" == "Win32" !IF "$(PLAT)" == "x86" || "$(PLAT)" == "X86"
OUTPUT_DIR=$(CFG) PLAT=x86
PLAT_MSBUILD=Win32
!ELSEIF "$(PLAT)" == "amd64" || "$(PLAT)" == "AMD64"
PLAT=amd64
PLAT_MSBUILD=x64
!ELSE !ELSE
OUTPUT_DIR=$(PLAT)\$(CFG) !ERROR Invalid platform "$(PLAT)". PLAT must be "x86" or "amd64".
!ENDIF !ENDIF
MSBUILD_FLAGS=/p:Configuration="$(CFG)" /p:Platform="$(PLAT)" /m /v:minimal /nologo OUTPUT_DIR=$(PLAT)\$(CFG)
MSBUILD_FLAGS=/p:Configuration="$(CFG)" /p:Platform="$(PLAT_MSBUILD)" /m /v:minimal /nologo
build :: build ::
msbuild.exe "wintun.vcxproj" /t:Build $(MSBUILD_FLAGS) msbuild.exe "wintun.vcxproj" /t:Build $(MSBUILD_FLAGS)

View File

@ -51,10 +51,10 @@ The driver output folder is:
Platform and Configuration | Folder Platform and Configuration | Folder
-------------------------- | -------------------- -------------------------- | --------------------
x86 Debug | `Debug\wintun` x86 Debug | `x86\Debug\wintun`
x86 Release | `Release\wintun` x86 Release | `x86\Release\wintun`
AMD64 Debug | `x64\Debug\wintun` AMD64 Debug | `amd64\Debug\wintun`
AMD64 Release | `x64\Release\wintun` AMD64 Release | `amd64\Release\wintun`
### Properties ### Properties
@ -62,7 +62,7 @@ Properties may be defined as environment variables, or specified on the `nmake`
- `CFG`: Specifies configuration to build or clean. May be `Debug` or `Release` (default). - `CFG`: Specifies configuration to build or clean. May be `Debug` or `Release` (default).
- `PLAT`: Specifies driver platform to build. May be `Win32` or `x64` (default). - `PLAT`: Specifies driver platform to build. May be `x86` or `amd64` (default).
## Usage ## Usage

View File

@ -85,26 +85,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>$(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>$(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset</CodeAnalysisRuleSet>
<IntDir>$(ConfigurationName)\</IntDir> <IntDir>x86\$(ConfigurationName)\</IntDir>
<OutDir>$(ConfigurationName)\</OutDir> <OutDir>x86\$(ConfigurationName)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<IntDir>$(ConfigurationName)\</IntDir> <IntDir>x86\$(ConfigurationName)\</IntDir>
<OutDir>$(ConfigurationName)\</OutDir> <OutDir>x86\$(ConfigurationName)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>$(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>$(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset</CodeAnalysisRuleSet>
<IntDir>$(Platform)\$(ConfigurationName)\</IntDir> <IntDir>amd64\$(ConfigurationName)\</IntDir>
<OutDir>$(Platform)\$(ConfigurationName)\</OutDir> <OutDir>amd64\$(ConfigurationName)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis> <RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<IntDir>$(Platform)\$(ConfigurationName)\</IntDir> <IntDir>amd64\$(ConfigurationName)\</IntDir>
<OutDir>$(Platform)\$(ConfigurationName)\</OutDir> <OutDir>amd64\$(ConfigurationName)\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup> <ItemDefinitionGroup>
<ClCompile> <ClCompile>