From afef39616c0ee6ad678f3da293570f1f23e208b4 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 15 Apr 2019 13:14:42 +0200 Subject: [PATCH] Revise architecture naming convention Adopt PROCESSOR_ARCHITECTURE environment variable platform designation, make it lowercase, and unify output folder naming. Signed-off-by: Simon Rozman --- .gitignore | 8 ++++---- Makefile | 15 ++++++++++----- README.md | 10 +++++----- wintun.vcxproj | 16 ++++++++-------- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 8e86698..88cd760 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile b/Makefile index 66b04e2..428da6f 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index c1a40d1..a569eb5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/wintun.vcxproj b/wintun.vcxproj index 448d30d..e5cec0c 100644 --- a/wintun.vcxproj +++ b/wintun.vcxproj @@ -85,26 +85,26 @@ true $(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset - $(ConfigurationName)\ - $(ConfigurationName)\ + x86\$(ConfigurationName)\ + x86\$(ConfigurationName)\ true AllRules.ruleset - $(ConfigurationName)\ - $(ConfigurationName)\ + x86\$(ConfigurationName)\ + x86\$(ConfigurationName)\ true $(WDKContentRoot)CodeAnalysis\DriverMustFixRules.ruleset - $(Platform)\$(ConfigurationName)\ - $(Platform)\$(ConfigurationName)\ + amd64\$(ConfigurationName)\ + amd64\$(ConfigurationName)\ true AllRules.ruleset - $(Platform)\$(ConfigurationName)\ - $(Platform)\$(ConfigurationName)\ + amd64\$(ConfigurationName)\ + amd64\$(ConfigurationName)\