From 4ea36c6483215a1242c3e21ccb1795a580b686f5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 14 Sep 2017 21:37:09 +0200 Subject: [PATCH] Add xbox 360 target - not complete/working yet --- Makefile.libretro | 25 +++++++++++++++++++++++++ src/fceu-types.h | 2 -- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index fe98c41..ef3074c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -418,6 +418,27 @@ export LIB := $(LIB);$(WindowsSdkDir) TARGET := $(TARGET_NAME)_libretro.dll PSS_STYLE :=2 LDFLAGS += -DLL +# Windows MSVC 2010 Xbox 360 +else ifeq ($(platform), xbox360_msvc2010) + CC = "$(XEDK)/bin/win32/cl.exe" +CXX = "$(XEXDK)/bin/win32/cl.exe" + +PATH := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin"):$(PATH) +PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE") +INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include") +LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib") +BIN := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/bin") + +WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib +WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib + +export INCLUDE := $(INCLUDE) +export LIB := $(LIB);$(WindowsSdkDir);$(XEDK)/lib/xbox +TARGET := $(TARGET_NAME)_libretro.dll +PSS_STYLE :=2 +LDFLAGS += -D_LIB +CFLAGS += -D_XBOX -D_XBOX360 +CXXFLAGS += -D_XBOX -D_XBOX360 # Windows MSVC 2005 x86 else ifeq ($(platform), windows_msvc2005_x86) CC = cl.exe @@ -508,7 +529,11 @@ endif ifneq (,$(findstring msvc,$(platform))) OBJOUT = -Fo LINKOUT = -out: +ifeq ($(platform), xbox360_msvc2010) + LD = "$(XEDK)/bin/win32/link.exe" +else LD = link.exe +endif else OBJOUT = -o LINKOUT = -o diff --git a/src/fceu-types.h b/src/fceu-types.h index 2548d64..710783e 100644 --- a/src/fceu-types.h +++ b/src/fceu-types.h @@ -38,12 +38,10 @@ typedef uint32_t uint32; #ifdef __GNUC__ typedef unsigned long long uint64; typedef long long int64; - #define INLINE inline #define GINLINE inline #elif MSVC typedef __int64 int64; typedef unsigned __int64 uint64; - #define INLINE __inline #define GINLINE // Can't declare a function INLINE // and global in MSVC. Bummer. #define PSS_STYLE 2 // Does MSVC compile for anything