msvc2017: UWP buildfixes
This commit is contained in:
@@ -50,6 +50,7 @@ ifneq ($(GIT_VERSION)," unknown")
|
|||||||
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
|
||||||
endif
|
endif
|
||||||
LIBM := -lm
|
LIBM := -lm
|
||||||
|
LIBS :=
|
||||||
|
|
||||||
# Unix
|
# Unix
|
||||||
ifeq ($(platform), unix)
|
ifeq ($(platform), unix)
|
||||||
@@ -302,7 +303,9 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
|||||||
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP
|
||||||
else ifneq (,$(findstring uwp,$(PlatformSuffix)))
|
else ifneq (,$(findstring uwp,$(PlatformSuffix)))
|
||||||
WinPartition = uwp
|
WinPartition = uwp
|
||||||
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP
|
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DWINDLL -D_UNICODE -DUNICODE -DWRL_NO_DEFAULT_LIB
|
||||||
|
LDFLAGS += -APPCONTAINER -NXCOMPAT -DYNAMICBASE
|
||||||
|
LIBS += WindowsApp.lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix))
|
TargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix))
|
||||||
@@ -351,8 +354,15 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
|
|||||||
WindowsSDKUCRTLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\ucrt\$(TargetArchMoniker)")
|
WindowsSDKUCRTLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\ucrt\$(TargetArchMoniker)")
|
||||||
WindowsSDKUMLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\um\$(TargetArchMoniker)")
|
WindowsSDKUMLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\$(WindowsSDKVersion)\um\$(TargetArchMoniker)")
|
||||||
|
|
||||||
#Turns out only the x86 cl.exe can compile for everything, the x64 one only compiles x64
|
# For some reason the HostX86 compiler doesn't like compiling for x64
|
||||||
|
# ("no such file" opening a shared library), and vice-versa.
|
||||||
|
# Work around it for now by using the strictly x86 compiler for x86, and x64 for x64.
|
||||||
|
# NOTE: What about ARM?
|
||||||
|
ifneq (,$(findstring x64,$(TargetArchMoniker)))
|
||||||
|
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\HostX64
|
||||||
|
else
|
||||||
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\HostX86
|
VCCompilerToolsBinDir := $(VcCompilerToolsDir)\bin\HostX86
|
||||||
|
endif
|
||||||
|
|
||||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VCCompilerToolsBinDir)/$(TargetArchMoniker)"):$(PATH)
|
PATH := $(shell IFS=$$'\n'; cygpath "$(VCCompilerToolsBinDir)/$(TargetArchMoniker)"):$(PATH)
|
||||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VsInstallRoot)/Common7/IDE")
|
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VsInstallRoot)/Common7/IDE")
|
||||||
@@ -466,8 +476,6 @@ endif
|
|||||||
CFLAGS += $(COREDEFINES) $(fpic) $(WARNING_DEFINES) $(DEFINES) $(ENDIANNESS_DEFINES)
|
CFLAGS += $(COREDEFINES) $(fpic) $(WARNING_DEFINES) $(DEFINES) $(ENDIANNESS_DEFINES)
|
||||||
LDFLAGS += $(LIBM)
|
LDFLAGS += $(LIBM)
|
||||||
|
|
||||||
LIBS :=
|
|
||||||
|
|
||||||
ifeq ($(platform), psp1)
|
ifeq ($(platform), psp1)
|
||||||
INCFLAGS += -I$(shell psp-config --pspsdk-path)/include
|
INCFLAGS += -I$(shell psp-config --pspsdk-path)/include
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user