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
# Build Output
/Release
/Debug
/x64/Release
/x64/Debug
/x86/Release
/x86/Debug
/amd64/Release
/amd64/Debug
# Static Driver Verifier Output
/sdv

View File

@ -8,14 +8,19 @@
CFG=Release
!ENDIF
!IFNDEF PLAT
PLAT=x64
PLAT=amd64
!ENDIF
!IF "$(PLAT)" == "Win32"
OUTPUT_DIR=$(CFG)
!IF "$(PLAT)" == "x86" || "$(PLAT)" == "X86"
PLAT=x86
PLAT_MSBUILD=Win32
!ELSEIF "$(PLAT)" == "amd64" || "$(PLAT)" == "AMD64"
PLAT=amd64
PLAT_MSBUILD=x64
!ELSE
OUTPUT_DIR=$(PLAT)\$(CFG)
!ERROR Invalid platform "$(PLAT)". PLAT must be "x86" or "amd64".
!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 ::
msbuild.exe "wintun.vcxproj" /t:Build $(MSBUILD_FLAGS)

View File

@ -51,10 +51,10 @@ The driver output folder is:
Platform and Configuration | Folder
-------------------------- | --------------------
x86 Debug | `Debug\wintun`
x86 Release | `Release\wintun`
AMD64 Debug | `x64\Debug\wintun`
AMD64 Release | `x64\Release\wintun`
x86 Debug | `x86\Debug\wintun`
x86 Release | `x86\Release\wintun`
AMD64 Debug | `amd64\Debug\wintun`
AMD64 Release | `amd64\Release\wintun`
### 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).
- `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

View File

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