Add Xbox rules

This commit is contained in:
twinaphex 2017-09-16 06:58:41 +02:00
parent 87b7552d64
commit 5eeb328cb1
2 changed files with 71 additions and 4 deletions

View File

@ -135,6 +135,39 @@ else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_$(platform).bc
STATIC_LINKING = 1
# Windows MSVC 2003 Xbox 1
else ifeq ($(platform), xbox1_msvc2003)
TARGET := $(TARGET_NAME)_libretro_xdk1.lib
MSVCBINDIRPREFIX = $(XDK)/xbox/bin/vc71
CC = "$(MSVCBINDIRPREFIX)/CL.exe"
CXX = "$(MSVCBINDIRPREFIX)/CL.exe"
LD = "$(MSVCBINDIRPREFIX)/lib.exe"
export INCLUDE := $(XDK)/xbox/include
export LIB := $(XDK)/xbox/lib
PSS_STYLE :=2
CFLAGS += -D_XBOX -D_XBOX1
CXXFLAGS += -D_XBOX -D_XBOX1
STATIC_LINKING=1
HAS_GCC := 0
HAVE_SYS_PARAM = 0
# Windows MSVC 2010 Xbox 360
else ifeq ($(platform), xbox360_msvc2010)
TARGET := $(TARGET_NAME)_libretro_xdk360.lib
MSVCBINDIRPREFIX = $(XEDK)/bin/win32
CC = "$(MSVCBINDIRPREFIX)/cl.exe"
CXX = "$(MSVCBINDIRPREFIX)/cl.exe"
LD = "$(MSVCBINDIRPREFIX)/lib.exe"
export INCLUDE := $(XEDK)/include/xbox
export LIB := $(XEDK)/lib/xbox
PSS_STYLE :=2
CFLAGS += -D_XBOX -D_XBOX360
CXXFLAGS += -D_XBOX -D_XBOX360
STATIC_LINKING=1
HAS_GCC := 0
HAVE_SYS_PARAM = 0
# Windows MSVC 2010 x64
else ifeq ($(platform), windows_msvc2010_x64)
CC = cl.exe
@ -220,10 +253,38 @@ include Makefile.common
OBJECTS := $(SOURCES_C:.c=.o)
ifeq ($(DEBUG),1)
FLAGS += -O0 -g -DHAVE_DEBUG
ifeq ($(DEBUG), 1)
ifneq (,$(findstring msvc,$(platform)))
ifeq ($(STATIC_LINKING),1)
CFLAGS += -MTd
CXXFLAGS += -MTd
else
FLAGS += -O2 -DNDEBUG
CFLAGS += -MDd
CXXFLAGS += -MDd
endif
CFLAGS += -Od -Zi -DDEBUG -D_DEBUG
CXXFLAGS += -Od -Zi -DDEBUG -D_DEBUG
else
CFLAGS += -O0 -g -DDEBUG
CXXFLAGS += -O0 -g -DDEBUG
endif
else
ifneq (,$(findstring msvc,$(platform)))
ifeq ($(STATIC_LINKING),1)
CFLAGS += -MT
CXXFLAGS += -MT
else
CFLAGS += -MD
CXXFLAGS += -MD
endif
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
else
CFLAGS += -O2 -DNDEBUG
CXXFLAGS += -O2 -DNDEBUG
endif
endif
LDFLAGS += $(fpic) $(SHARED)
@ -257,7 +318,12 @@ LINKOUT = -o
ifneq (,$(findstring msvc,$(platform)))
OBJOUT = -Fo
LINKOUT = -out:
ifeq ($(STATIC_LINKING),1)
LD ?= lib.exe
STATIC_LINKING=0
else
LD = link.exe
endif
else
LD = $(CC)
endif

View File

@ -1,4 +1,5 @@
INCFLAGS += -I$(CORE_DIR) -I$(CORE_DIR)/src -I$(CORE_DIR)/allegrowrapper
LIBRETRO_COMM_DIR = $(CORE_DIR)/libretro-common
INCFLAGS := -I$(CORE_DIR) -I$(CORE_DIR)/src -I$(CORE_DIR)/allegrowrapper
SOURCES_C := $(CORE_DIR)/src/audio.c \
$(CORE_DIR)/src/cpu.c \