2019-04-13 19:15:23 +02:00
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
#
|
|
|
|
# Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
|
|
|
|
#
|
|
|
|
|
|
|
|
!IFNDEF CFG
|
|
|
|
CFG=Release
|
|
|
|
!ENDIF
|
|
|
|
!IFNDEF PLAT
|
2019-04-15 13:14:42 +02:00
|
|
|
PLAT=amd64
|
2019-04-13 19:15:23 +02:00
|
|
|
!ENDIF
|
2019-04-15 13:14:42 +02:00
|
|
|
!IF "$(PLAT)" == "x86" || "$(PLAT)" == "X86"
|
|
|
|
PLAT=x86
|
|
|
|
PLAT_MSBUILD=Win32
|
|
|
|
!ELSEIF "$(PLAT)" == "amd64" || "$(PLAT)" == "AMD64"
|
|
|
|
PLAT=amd64
|
|
|
|
PLAT_MSBUILD=x64
|
2019-04-15 13:25:31 +02:00
|
|
|
!ELSEIF "$(PLAT)" == "arm64" || "$(PLAT)" == "ARM64"
|
|
|
|
PLAT=arm64
|
|
|
|
PLAT_MSBUILD=ARM64
|
2019-04-13 19:15:23 +02:00
|
|
|
!ELSE
|
2019-04-15 13:25:31 +02:00
|
|
|
!ERROR Invalid platform "$(PLAT)". PLAT must be "x86", "amd64", or "arm64".
|
2019-04-13 19:15:23 +02:00
|
|
|
!ENDIF
|
2019-04-15 13:14:42 +02:00
|
|
|
OUTPUT_DIR=$(PLAT)\$(CFG)
|
|
|
|
MSBUILD_FLAGS=/p:Configuration="$(CFG)" /p:Platform="$(PLAT_MSBUILD)" /m /v:minimal /nologo
|
2019-04-13 19:15:23 +02:00
|
|
|
|
|
|
|
build ::
|
|
|
|
msbuild.exe "wintun.vcxproj" /t:Build $(MSBUILD_FLAGS)
|
|
|
|
|
|
|
|
clean ::
|
|
|
|
msbuild.exe "wintun.vcxproj" /t:Clean $(MSBUILD_FLAGS)
|
|
|
|
|
2019-04-15 13:25:31 +02:00
|
|
|
!IF "$(CFG)" == "Release" && "$(PLAT)" != "arm64"
|
2019-04-13 19:15:23 +02:00
|
|
|
|
|
|
|
dvl :: "wintun.DVL.XML"
|
|
|
|
|
|
|
|
clean ::
|
|
|
|
msbuild.exe "wintun.vcxproj" /t:sdv /p:Inputs="/clean" $(MSBUILD_FLAGS)
|
|
|
|
-if exist "wintun.DVL.XML" del /f /q "wintun.DVL.XML"
|
|
|
|
-if exist "smvstats.txt" del /f /q "smvstats.txt"
|
|
|
|
|
|
|
|
"sdv\SDV.DVL.xml" "$(OUTPUT_DIR)\vc.nativecodeanalysis.all.xml" :
|
|
|
|
msbuild.exe "wintun.vcxproj" /t:sdv /p:Inputs="/check:*" $(MSBUILD_FLAGS)
|
|
|
|
|
|
|
|
"wintun.DVL.XML" : "sdv\SDV.DVL.xml" "$(OUTPUT_DIR)\vc.nativecodeanalysis.all.xml"
|
|
|
|
msbuild.exe "wintun.vcxproj" /t:dvl $(MSBUILD_FLAGS)
|
|
|
|
|
|
|
|
!ENDIF
|