libretro: Fix identing in the Makefile.

This commit is contained in:
orbea 2019-05-03 07:08:54 -07:00 committed by Stephen Anthony
parent 7b098e6185
commit 17c64658ed
1 changed files with 201 additions and 208 deletions

View File

@ -49,10 +49,11 @@ endif
TARGET_NAME = stella TARGET_NAME = stella
LIBS =
ifeq (,$(findstring msvc,$(platform))) ifeq (,$(findstring msvc,$(platform)))
LIBS += -lm LIBS := -lm
else
LIBS :=
endif endif
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)"
@ -72,9 +73,6 @@ ifneq (,$(findstring unix,$(platform)))
else else
SHARED := -shared -Wl,--version-script=link.T -Wl,-z,defs SHARED := -shared -Wl,--version-script=link.T -Wl,-z,defs
endif endif
ifneq ($(findstring Haiku,$(shell uname -a)),)
LIBS :=
endif
# ARM # ARM
ifneq (,$(findstring armv,$(platform))) ifneq (,$(findstring armv,$(platform)))
@ -145,7 +143,6 @@ else ifeq ($(platform), classic_armv7_a7)
LDFLAGS += -static-libgcc -static-libstdc++ LDFLAGS += -static-libgcc -static-libstdc++
endif endif
endif endif
#######################################
# iOS # iOS
else ifneq (,$(findstring ios,$(platform))) else ifneq (,$(findstring ios,$(platform)))
@ -218,12 +215,10 @@ else ifneq (,$(filter $(platform), ps3 sncps3 psl1ght))
TARGET := $(TARGET_NAME)_libretro_ps3.a TARGET := $(TARGET_NAME)_libretro_ps3.a
CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe AR = $(CELL_SDK)/host-win32/sn/bin/ps3snarl.exe
# PS3 # PS3
else ifneq (,$(findstring ps3,$(platform))) else ifneq (,$(findstring ps3,$(platform)))
CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe
# Lightweight PS3 Homebrew SDK # Lightweight PS3 Homebrew SDK
else ifneq (,$(findstring psl1ght,$(platform))) else ifneq (,$(findstring psl1ght,$(platform)))
CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT) CXX = $(PS3DEV)/ppu/bin/ppu-g++$(EXE_EXT)
@ -253,11 +248,9 @@ else ifneq (,$(filter $(platform), ngc wii wiiu))
# Nintendo WiiU # Nintendo WiiU
ifneq (,$(findstring wiiu,$(platform))) ifneq (,$(findstring wiiu,$(platform)))
CXXFLAGS += -mwup CXXFLAGS += -mwup
# Nintendo Wii # Nintendo Wii
else ifneq (,$(findstring wii,$(platform))) else ifneq (,$(findstring wii,$(platform)))
CXXFLAGS += -DGEKKO -mrvl CXXFLAGS += -DGEKKO -mrvl
# Nintendo Game Cube # Nintendo Game Cube
else ifneq (,$(findstring ngc,$(platform))) else ifneq (,$(findstring ngc,$(platform)))
CXXFLAGS += -DGEKKO -mrvl CXXFLAGS += -DGEKKO -mrvl
@ -283,7 +276,6 @@ else ifeq ($(platform), genode)
CXX = $(shell pkg-config genode-base --variable=cxx) CXX = $(shell pkg-config genode-base --variable=cxx)
LD = $(shell pkg-config genode-base --variable=ld) LD = $(shell pkg-config genode-base --variable=ld)
AR = $(shell pkg-config genode-base --variable=ar) -rcs AR = $(shell pkg-config genode-base --variable=ar) -rcs
LIBS =
# Windows MSVC 2003 Xbox 1 # Windows MSVC 2003 Xbox 1
else ifeq ($(platform), xbox1_msvc2003) else ifeq ($(platform), xbox1_msvc2003)
@ -299,6 +291,7 @@ PSS_STYLE :=2
CXXFLAGS += -D_XBOX -D_XBOX1 CXXFLAGS += -D_XBOX -D_XBOX1
STATIC_LINKING=1 STATIC_LINKING=1
HAS_GCC := 0 HAS_GCC := 0
# Windows MSVC 2010 Xbox 360 # Windows MSVC 2010 Xbox 360
else ifeq ($(platform), xbox360_msvc2010) else ifeq ($(platform), xbox360_msvc2010)
CXXFLAGS += -D__WIN32__ CXXFLAGS += -D__WIN32__
@ -334,12 +327,11 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
# Specific to this core # Specific to this core
MSVC2017CompileFlags += -D__WIN32__ /std:c++17 MSVC2017CompileFlags += -D__WIN32__ /std:c++17
CXX = cl.exe
CXXFLAGS += $(MSVC2017CompileFlags) CXXFLAGS += $(MSVC2017CompileFlags)
TargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix)) TargetArchMoniker = $(subst $(WinPartition)_,,$(PlatformSuffix))
CXX = cl.exe
reg_query = $(call filter_out2,$(subst $2,,$(shell reg query "$2" -v "$1" 2>nul))) reg_query = $(call filter_out2,$(subst $2,,$(shell reg query "$2" -v "$1" 2>nul)))
fix_path = $(subst $(SPACE),\ ,$(subst \,/,$1)) fix_path = $(subst $(SPACE),\ ,$(subst \,/,$1))
@ -359,8 +351,8 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
VsInstallEnterprise = $(ProgramFiles86)/Microsoft Visual Studio/2017/Enterprise VsInstallEnterprise = $(ProgramFiles86)/Microsoft Visual Studio/2017/Enterprise
VsInstallProfessional = $(ProgramFiles86)/Microsoft Visual Studio/2017/Professional VsInstallProfessional = $(ProgramFiles86)/Microsoft Visual Studio/2017/Professional
VsInstallCommunity = $(ProgramFiles86)/Microsoft Visual Studio/2017/Community VsInstallCommunity = $(ProgramFiles86)/Microsoft Visual Studio/2017/Community
VsInstallRoot ?= $(shell if [ -d "$(VsInstallBuildTools)" ]; then echo "$(VsInstallBuildTools)"; fi) VsInstallRoot ?= $(shell if [ -d "$(VsInstallBuildTools)" ]; then echo "$(VsInstallBuildTools)"; fi)
ifeq ($(VsInstallRoot), ) ifeq ($(VsInstallRoot), )
VsInstallRoot = $(shell if [ -d "$(VsInstallEnterprise)" ]; then echo "$(VsInstallEnterprise)"; fi) VsInstallRoot = $(shell if [ -d "$(VsInstallEnterprise)" ]; then echo "$(VsInstallEnterprise)"; fi)
endif endif
@ -370,8 +362,8 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
ifeq ($(VsInstallRoot), ) ifeq ($(VsInstallRoot), )
VsInstallRoot = $(shell if [ -d "$(VsInstallCommunity)" ]; then echo "$(VsInstallCommunity)"; fi) VsInstallRoot = $(shell if [ -d "$(VsInstallCommunity)" ]; then echo "$(VsInstallCommunity)"; fi)
endif endif
VsInstallRoot := $(VsInstallRoot)
VsInstallRoot := $(VsInstallRoot)
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)
@ -394,9 +386,10 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
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")
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/include") INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/include")
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/lib/$(TargetArchMoniker)")
ifneq (,$(findstring uwp,$(PlatformSuffix))) ifneq (,$(findstring uwp,$(PlatformSuffix)))
LIB := $(shell IFS=$$'\n'; cygpath -w "$(LIB)/store") LIB := $(shell IFS=$$'\n'; cygpath -w "$(LIB)/store")
else
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VcCompilerToolsDir)/lib/$(TargetArchMoniker)")
endif endif
export INCLUDE := $(INCLUDE);$(WindowsSDKSharedIncludeDir);$(WindowsSDKUCRTIncludeDir);$(WindowsSDKUMIncludeDir) export INCLUDE := $(INCLUDE);$(WindowsSDKSharedIncludeDir);$(WindowsSDKUCRTIncludeDir);$(WindowsSDKUMIncludeDir)
@ -421,7 +414,6 @@ WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windo
WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)" INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
export INCLUDE := $(INCLUDE) export INCLUDE := $(INCLUDE)
export LIB := $(LIB);$(WindowsSdkDir) export LIB := $(LIB);$(WindowsSdkDir)
@ -429,6 +421,7 @@ TARGET := $(TARGET_NAME)_libretro.dll
PSS_STYLE :=2 PSS_STYLE :=2
LDFLAGS += -DLL LDFLAGS += -DLL
LIBS := LIBS :=
# Windows MSVC 2010 x86 # Windows MSVC 2010 x86
else ifeq ($(platform), windows_msvc2010_x86) else ifeq ($(platform), windows_msvc2010_x86)
CXXFLAGS += -D__WIN32__ CXXFLAGS += -D__WIN32__
@ -445,7 +438,6 @@ WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windo
WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include
INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)" INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)"
export INCLUDE := $(INCLUDE) export INCLUDE := $(INCLUDE)
export LIB := $(LIB);$(WindowsSdkDir) export LIB := $(LIB);$(WindowsSdkDir)
@ -493,6 +485,7 @@ TARGET := $(TARGET_NAME)_libretro.dll
PSS_STYLE :=2 PSS_STYLE :=2
LDFLAGS += -DLL LDFLAGS += -DLL
CXXFLAGS += -D_CRT_SECURE_NO_DEPRECATE CXXFLAGS += -D_CRT_SECURE_NO_DEPRECATE
# Windows # Windows
else else
CXXFLAGS += $(LTO) CXXFLAGS += $(LTO)