fix GCC 5.1.0 compile (not tested the program - just fixed the compile)

This commit is contained in:
Barry Harris 2015-09-17 13:53:20 +00:00
parent e5ea70398e
commit af34b909fa
4 changed files with 56 additions and 2 deletions

View File

@ -79,6 +79,9 @@ mingw452: FORCE
mingw471: FORCE mingw471: FORCE
@$(MAKE) -s -f makefile.mingw GCC471=1 @$(MAKE) -s -f makefile.mingw GCC471=1
mingw510: FORCE
@$(MAKE) -s -f makefile.mingw GCC510=1
mamemingw: FORCE mamemingw: FORCE
@$(MAKE) -s -f makefile.mamemingw @$(MAKE) -s -f makefile.mamemingw

View File

@ -84,6 +84,9 @@ endif
ifdef GCC471 ifdef GCC471
objdir = obj/47/$(COMPILENAME)/ objdir = obj/47/$(COMPILENAME)/
endif endif
ifdef GCC510
objdir = obj/51/$(COMPILENAME)/
endif
srcdir = src/ srcdir = src/
@ -99,6 +102,9 @@ endif
ifdef GCC471 ifdef GCC471
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2 incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
endif endif
ifdef GCC510
incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)dep/generated -I$(srcdir)dep/mingw/include -I$(srcdir)dep/mingw/include/directx9 -I$(srcdir)dep/mingw/include/xaudio2
endif
ifdef UNICODE ifdef UNICODE
# lib = -lunicows # lib = -lunicows
@ -229,7 +235,39 @@ CXXFLAGS = -pipe \
-Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \ -Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \
-Wno-unused-but-set-variable -Wno-sequence-point -Wno-narrowing -Wno-extra \ -Wno-unused-but-set-variable -Wno-sequence-point -Wno-narrowing -Wno-extra \
$(DEF) $(incdir) $(DEF) $(incdir)
ifdef BUILD_X64_EXE
CFLAGS += -m64
CXXFLAGS += -m64
LDFLAGS += -m64
else
CFLAGS += -m32
CXXFLAGS += -m32
LDFLAGS += -m32
endif
endif
ifdef GCC510
CFLAGS = -pipe \
-std=gnu99 -O1 \
-mwindows \
-fforce-addr -finline-limit=1200 -fthread-jumps \
-fexpensive-optimizations \
-Wall -Wno-long-long -Wno-sign-compare -Wno-uninitialized -Wno-unused \
-Wno-sequence-point -Wno-pedantic \
$(DEF) $(incdir)
CXXFLAGS = -pipe \
-std=gnu++11 -O1 \
-mwindows \
-fforce-addr -finline-limit=1200 -fthread-jumps \
-fexpensive-optimizations -fcheck-new \
-Wall -W -pedantic -Wshadow -Wno-long-long -Wno-write-strings \
-Wunknown-pragmas -Wundef -Wno-conversion -Wno-missing-braces -Wno-multichar \
-Wuninitialized -Wpointer-arith -Wno-inline -Wno-address -Wno-unused-value \
-Wno-unused-but-set-variable -Wno-sequence-point -Wno-narrowing -Wno-extra \
-Wno-pedantic \
$(DEF) $(incdir)
ifdef BUILD_X64_EXE ifdef BUILD_X64_EXE
CFLAGS += -m64 CFLAGS += -m64
CXXFLAGS += -m64 CXXFLAGS += -m64
@ -372,6 +410,9 @@ endif
ifdef GCC471 ifdef GCC471
@$(MAKE) -f makefile.mingw -s GCC471=1 @$(MAKE) -f makefile.mingw -s GCC471=1
endif endif
ifdef GCC510
@$(MAKE) -f makefile.mingw -s GCC510=1
endif
else else
@ -385,6 +426,9 @@ endif
ifdef GCC471 ifdef GCC471
@$(MAKE) -f makefile.mingw -s GCC471=1 @$(MAKE) -f makefile.mingw -s GCC471=1
endif endif
ifdef GCC510
@$(MAKE) -f makefile.mingw -s GCC510=1
endif
endif endif
else else
@ -640,6 +684,13 @@ else
@windres -F pe-i386 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir)) @windres -F pe-i386 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
endif endif
endif endif
ifdef GCC510
ifdef BUILD_X64_EXE
@windres -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
else
@windres -F pe-i386 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
endif
endif
# #
# Generic rules for C/C++ files # Generic rules for C/C++ files

View File

@ -332,7 +332,7 @@ void IpsApplyPatches(UINT8* base, char* rom_name);
#define HARDWARE_PUBLIC_MASK (0xFFFF0000) #define HARDWARE_PUBLIC_MASK (0xFFFF0000)
#define HARDWARE_PREFIX_CARTRIDGE (0x80000000) #define HARDWARE_PREFIX_CARTRIDGE ((INT32)0x80000000)
#define HARDWARE_PREFIX_MISC_PRE90S (0x00000000) #define HARDWARE_PREFIX_MISC_PRE90S (0x00000000)
#define HARDWARE_PREFIX_CAPCOM (0x01000000) #define HARDWARE_PREFIX_CAPCOM (0x01000000)

View File

@ -77,7 +77,7 @@ extern "C" {
} }
#endif #endif
#define FXF_MMX (1 << 31) #define FXF_MMX (unsigned int)(1 << 31)
static struct { TCHAR* pszName; int nZoom; unsigned int nFlags; } SoftFXInfo[] = { static struct { TCHAR* pszName; int nZoom; unsigned int nFlags; } SoftFXInfo[] = {
{ _T("Plain Software Scale"), 2, 0 }, { _T("Plain Software Scale"), 2, 0 },