3 # apt-get install mingw-w64
5 ##########################
6 # Checks the host platform
8 include $(BUILD_DIR)/Makefile.common.hostcheck
11 ####################################
12 # Variable setup for Makefile.common
18 include $(BUILD_DIR)/Makefile.common
26 PATH := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/bin/amd64"):$(PATH)
27 PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../IDE")
28 INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/include")
29 LIB := $(shell IFS=$$'\n'; cygpath "$(VS140COMNTOOLS)../../VC/lib/amd64")
31 reg_query = $(call filter_out2,$(subst $2,,$(shell reg query "$2" -v "$1" 2>nul)))
32 fix_path = $(subst $(SPACE),\ ,$(subst \,/,$1))
33 WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
34 WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0)
35 WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
36 WindowsSdkDir ?= $(call reg_query,InstallationFolder,HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0)
37 WindowsSdkDir := $(WindowsSdkDir)
39 WindowsSDKVersion ?= $(firstword $(foreach folder,$(subst $(subst \,/,$(WindowsSdkDir)Include/),,$(wildcard $(call fix_path,$(WindowsSdkDir)Include\*))),$(if $(wildcard $(call fix_path,$(WindowsSdkDir)Include/$(folder)/um/Windows.h)),$(folder),)))$(BACKSLASH)
40 WindowsSDKVersion := $(WindowsSDKVersion)
42 export INCLUDE := $(INCLUDE);$(VCINSTALLDIR)INCLUDE;$(VCINSTALLDIR)ATLMFC\INCLUDE;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um;
43 export LIB := $(LIB);$(VCINSTALLDIR)LIB\amd64;$(VCINSTALLDIR)ATLMFC\LIB\amd64;$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\x64;$(WindowsSdkDir)lib\$(WindowsSDKVersion)um\x64;
57 PLATCFLAGS = -DWIN32 -DCORRECT_VRAM_READS -D_WINDOWS -D_USRDLL -D_CRT_SECURE_NO_WARNINGS -DMSVC2010_EXPORTS -DFRONTEND_SUPPORTS_RGB565 -DGIT_VERSION=\"$(GIT_VERSION)\"
58 PLATCXXFLAGS = $(PLATCFLAGS)
59 #PLATLDFLAGS = -shared -lm
60 #PLATLDXFLAGS = -shared -lm
65 RETRODEFS = -D__LIBRETRO__
74 DEFINES = $(PLATDEFS) $(COREDEFINES) $(RETRODEFS)
75 CFLAGS = $(PLATCFLAGS) $(RETROCFLAGS) $(DEFINES) $(INCLUDES)
76 CXXFLAGS = $(PLATCXXFLAGS) $(RETROCXXFLAGS) $(DEFINES) $(INCLUDES)
77 LDFLAGS = $(PLATLDFLAGS) $(RETROLDFLAGS)
78 LDXFLAGS = $(PLATLDXFLAGS) $(RETROLDXFLAGS)
84 CFLAGS += -Od -Zi -D_DEBUG
85 CXXFLAGS += -Od -Zi -D_DEBUG
86 LDFLAGS += -DEBUG -DLL
88 CFLAGS += -O2 -DNDEBUG
89 CXXFLAGS += -O2 -DNDEBUG
93 ifneq ($(LOG_PERFORMANCE),)
94 CFLAGS += -DLOG_PERFORMANCE
95 CXXFLAGS += -DLOG_PERFORMANCE
101 include $(BUILD_DIR)/Makefile.rules