makefile
This commit is contained in:
@@ -291,31 +291,32 @@ else ifeq ($(platform), windows_msvc2017_x64)
|
|||||||
CC = cl.exe
|
CC = cl.exe
|
||||||
CXX = cl.exe
|
CXX = cl.exe
|
||||||
|
|
||||||
VSINSTALLROOT := $(shell "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath)
|
VsInstallRoot := $(shell "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath)
|
||||||
VCCOMPILERTOOLSVER := $(shell cat "$(VSINSTALLROOT)\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" | grep -o '[0-9\.]*')
|
VcCompilerToolsVer := $(shell cat "$(VsInstallRoot)\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt" | grep -o '[0-9\.]*')
|
||||||
VCCOMPILERTOOLSDIR := $(VSINSTALLROOT)\VC\Tools\MSVC\$(VCCOMPILERTOOLSVER)
|
VcCompilerToolsDir := $(VsInstallRoot)\VC\Tools\MSVC\$(VcCompilerToolsVer)
|
||||||
|
|
||||||
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
|
||||||
HOSTCPUARCHDIR := HostX64
|
HostCPUArchDir := HostX64
|
||||||
|
WindowsSDKRegKey := HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||||
else
|
else
|
||||||
HOSTCPUARCHDIR := HostX86
|
HostCPUArchDir := HostX86
|
||||||
|
WindowsSDKRegKey := HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
VCCOMPILERTOOLSBINDIR := $(VCCOMPILERTOOLSDIR)\bin\$(HOSTCPUARCHDIR)
|
WindowsSDKRootDir := $(shell reg query "$(WindowsSDKRegKey)" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')
|
||||||
|
WindowsSDKVer = $(shell reg query "$(WindowsSDKRegKey)" -v "ProductVersion" | grep -o '10\.[0-9]\.[0-9]*')
|
||||||
|
WindowsSDKUCRTIncludeDir := $(shell cygpath "$(WindowsSDKRootDir)\Include\$(WindowsSDKVer)\ucrt")
|
||||||
|
WindowsSDKUCRTLibDir := $(shell cygpath "$(WindowsSDKRootDir)\Lib\$(WindowsSDKVer)\ucrt\x64")
|
||||||
|
|
||||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCCOMPILERTOOLSBINDIR)/x64"):$(PATH)
|
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\$(HostCPUArchDir)
|
||||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VSINSTALLROOT)/Common7/IDE")
|
|
||||||
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VCCOMPILERTOOLSDIR)/include")
|
|
||||||
LIB := $(shell IFS=$$'\n'; cygpath "$(VCCOMPILERTOOLSDIR)/lib/x64")
|
|
||||||
BIN := $(shell IFS=$$'\n'; cygpath "$(VCCOMPILERTOOLSBINDIR)")
|
|
||||||
|
|
||||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VCCompilerToolsBinDir)/x64"):$(PATH)
|
||||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VsInstallRoot)/Common7/IDE")
|
||||||
|
INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VcCompilerToolsDir)/include")
|
||||||
|
LIB := $(shell IFS=$$'\n'; cygpath "$(VcCompilerToolsDir)/lib/x64")
|
||||||
|
|
||||||
$(info sdkdir: $(WindowsSdkDir))
|
export INCLUDE := $(INCLUDE);$(WindowsSDKUCRTIncludeDir)
|
||||||
|
export LIB := $(LIB);$(WindowsSDKUCRTLibDir)
|
||||||
export INCLUDE := $(INCLUDE)
|
|
||||||
export LIB := $(LIB);$(WindowsSdkDir)
|
|
||||||
TARGET := $(TARGET_NAME)_libretro.dll
|
TARGET := $(TARGET_NAME)_libretro.dll
|
||||||
PSS_STYLE :=2
|
PSS_STYLE :=2
|
||||||
LDFLAGS += -DLL
|
LDFLAGS += -DLL
|
||||||
|
|||||||
Reference in New Issue
Block a user