add mingw cross compile (#827)

* add mingw cross compile

* forgot these checky monsters

Co-authored-by: grant2258 <grant2258@users.noreply.github.com>
This commit is contained in:
grant2258 2021-07-25 14:10:25 +01:00 committed by GitHub
parent 9ec27813b8
commit 1070b3656b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 18 additions and 14 deletions

View File

@ -86,6 +86,9 @@ mingw471: FORCE
mingw510: FORCE mingw510: FORCE
@$(MAKE) -s -f makefile.mingw GCC510=1 @$(MAKE) -s -f makefile.mingw GCC510=1
#cross compile in linux only 32 bit for now
mingwcc: FORCE
@$(MAKE) -s -f makefile.mingw GCC510=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++-win32 WINDRES=i686-w64-mingw32-windres
mamemingw: FORCE mamemingw: FORCE
@$(MAKE) -s -f makefile.mamemingw @$(MAKE) -s -f makefile.mamemingw

View File

@ -21,6 +21,7 @@ endif
# #
# Specify the name of the executable file, without ".exe" # Specify the name of the executable file, without ".exe"
WINDRES=windres
NAME = fbneo NAME = fbneo
COMPILENAME = 3 COMPILENAME = 3
@ -594,7 +595,7 @@ $(objdir)cpu/m68k/m68kops.o: $(objdir)cpu/m68k/m68kmake.exe $(objdir)dep/generat
@$(CC) $(CFLAGS) -c $(objdir)dep/generated/m68kops.c -o $(objdir)cpu/m68k/m68kops.o @$(CC) $(CFLAGS) -c $(objdir)dep/generated/m68kops.c -o $(objdir)cpu/m68k/m68kops.o
$(objdir)dep/generated/m68kops.h $(objdir)dep/generated/m68kops.c: $(objdir)cpu/m68k/m68kmake.exe $(srcdir)cpu/m68k/m68k_in.c $(objdir)dep/generated/m68kops.h $(objdir)dep/generated/m68kops.c: $(objdir)cpu/m68k/m68kmake.exe $(srcdir)cpu/m68k/m68k_in.c
$(objdir)/cpu/m68k/m68kmake $(objdir)dep/generated/ $(srcdir)cpu/m68k/m68k_in.c $(objdir)/cpu/m68k/m68kmake.exe $(objdir)dep/generated/ $(srcdir)cpu/m68k/m68k_in.c
$(objdir)cpu/m68k/m68kmake.exe: $(srcdir)cpu/m68k/m68kmake.c $(objdir)cpu/m68k/m68kmake.exe: $(srcdir)cpu/m68k/m68kmake.c
@echo Compiling Musashi MC680x0 core \(m68kmake.c\)... @echo Compiling Musashi MC680x0 core \(m68kmake.c\)...
@ -686,23 +687,23 @@ endif
%.o: %.rc %.o: %.rc
@echo Compiling resource file $(<F)... @echo Compiling resource file $(<F)...
ifdef GCC345 ifdef GCC345
@windres $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir)) @$(WINDRES) $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
endif endif
ifdef GCC452 ifdef GCC452
@windres $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir)) @windres $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
endif endif
ifdef GCC471 ifdef GCC471
ifdef BUILD_X64_EXE ifdef BUILD_X64_EXE
@windres -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir)) @$(WINDRES) -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
else 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 GCC510
ifdef BUILD_X64_EXE ifdef BUILD_X64_EXE
@windres -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir)) @$(WINDRES) -F pe-x86-64 $(DEF) $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F) $(foreach dir,$(alldir),--include-dir $(srcdir)$(dir))
else 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

View File

@ -3,7 +3,7 @@
#include "aud_dsp.h" #include "aud_dsp.h"
#include <math.h> #include <math.h>
#include <InitGuid.h> #include <initguid.h>
#define DIRECTSOUND_VERSION 0x0300 // Only need version from DirectX 3 #define DIRECTSOUND_VERSION 0x0300 // Only need version from DirectX 3
#include <dsound.h> #include <dsound.h>

View File

@ -2,7 +2,7 @@
#include "aud_dsp.h" #include "aud_dsp.h"
//#ifdef _MSC_VER //#ifdef _MSC_VER
#include <InitGuid.h> #include <initguid.h>
#include <xaudio2.h> #include <xaudio2.h>
#include <xaudio2fx.h> #include <xaudio2fx.h>

View File

@ -4,7 +4,7 @@
#include "burner.h" #include "burner.h"
#include "inp_keys.h" #include "inp_keys.h"
#include <InitGuid.h> #include <initguid.h>
#define DIRECTINPUT_VERSION 0x0800 #define DIRECTINPUT_VERSION 0x0800
#include <dinput.h> #include <dinput.h>

View File

@ -7,7 +7,7 @@
#if !defined BUILD_X64_EXE #if !defined BUILD_X64_EXE
// #include "vid_directx_support.h" // #include "vid_directx_support.h"
#include <InitGuid.h> #include <initguid.h>
#include "vid_softfx.h" #include "vid_softfx.h"
// #define ENABLE_PROFILING FBNEO_DEBUG // #define ENABLE_PROFILING FBNEO_DEBUG

View File

@ -6,7 +6,7 @@
#include "vid_directx_support.h" #include "vid_directx_support.h"
#endif #endif
#include <InitGuid.h> #include <initguid.h>
#define DIRECT3D_VERSION 0x0700 // Use this Direct3D version #define DIRECT3D_VERSION 0x0700 // Use this Direct3D version
#if defined BUILD_X64_EXE #if defined BUILD_X64_EXE

View File

@ -6,7 +6,7 @@
#include "vid_softfx.h" #include "vid_softfx.h"
#endif #endif
#include <InitGuid.h> #include <initguid.h>
#define DIRECT3D_VERSION 0x0700 // Use this Direct3D version #define DIRECT3D_VERSION 0x0700 // Use this Direct3D version
#if defined BUILD_X64_EXE #if defined BUILD_X64_EXE

View File

@ -10,7 +10,7 @@
// #define ENABLE_PROFILING FBNEO_DEBUG // #define ENABLE_PROFILING FBNEO_DEBUG
// #define LOAD_EFFECT_FROM_FILE // #define LOAD_EFFECT_FROM_FILE
#include <InitGuid.h> #include <initguid.h>
#define DIRECT3D_VERSION 0x0900 // Use this Direct3D version #define DIRECT3D_VERSION 0x0900 // Use this Direct3D version
#define D3D_OVERLOADS #define D3D_OVERLOADS
#include <d3d9.h> #include <d3d9.h>

View File

@ -5,7 +5,7 @@
#include "vid_directx_support.h" #include "vid_directx_support.h"
#endif #endif
#include <InitGuid.h> #include <initguid.h>
#define DIRECT3D_VERSION 0x0700 // Use this Direct3D version #define DIRECT3D_VERSION 0x0700 // Use this Direct3D version
#if defined BUILD_X64_EXE #if defined BUILD_X64_EXE