pcfx compiles

This commit is contained in:
nattthebear 2020-05-21 20:32:42 -04:00
parent 9fe80952ff
commit 9f358bc8cc
5 changed files with 24 additions and 16 deletions

View File

@ -34,7 +34,7 @@ CXXFLAGS := $(CXXFLAGS) $(COMMONFLAGS) -I$(SYSROOT)/include/c++/v1 -fno-use-cxa-
CXXFLAGS_DEBUG := -O0 -g CXXFLAGS_DEBUG := -O0 -g
CXXFLAGS_RELEASE := -O3 -flto CXXFLAGS_RELEASE := -O3 -flto
EXTRA_LIBS := -L $(SYSROOT)/lib/linux -lclang_rt.builtins-x86_64 EXTRA_LIBS := -L $(SYSROOT)/lib/linux -lclang_rt.builtins-x86_64 $(EXTRA_LIBS)
ifneq ($(filter %.cpp,$(SRCS)),) ifneq ($(filter %.cpp,$(SRCS)),)
EXTRA_LIBS := -lc++ -lc++abi -lunwind $(EXTRA_LIBS) EXTRA_LIBS := -lc++ -lc++abi -lunwind $(EXTRA_LIBS)
endif endif

View File

@ -9,6 +9,7 @@
namespace Mednafen namespace Mednafen
{ {
MDFNGI *MDFNGameInfo = NULL; MDFNGI *MDFNGameInfo = NULL;
NativeVFS NVFS;
std::string MDFN_MakeFName(MakeFName_Type type, int id1, const char *cd1) std::string MDFN_MakeFName(MakeFName_Type type, int id1, const char *cd1)
{ {
@ -73,20 +74,6 @@ namespace Mednafen
void MDFNMP_ApplyPeriodicCheats(void) void MDFNMP_ApplyPeriodicCheats(void)
{} {}
// file.h
bool MDFN_DumpToFile(const std::string& path, const void *data, const uint64 length, bool throw_on_error)
{
return true;
}
bool MDFN_DumpToFile(const std::string& path, const std::vector<PtrLengthPair> &pearpairs, bool throw_on_error)
{
return true;
}
std::unique_ptr<Stream> MDFN_AmbigGZOpenHelper(const std::string& path, std::vector<size_t> good_sizes)
{
return nullptr;
}
// player.h // player.h
void Player_Init(int tsongs, const std::string &album, const std::string &artist, const std::string &copyright, const std::vector<std::string> &snames, bool override_gi) void Player_Init(int tsongs, const std::string &album, const std::string &artist, const std::string &copyright, const std::vector<std::string> &snames, bool override_gi)
{} {}

View File

@ -19,6 +19,7 @@ MEDNAFLAGS := \
CCFLAGS := $(MEDNAFLAGS) -std=gnu99 CCFLAGS := $(MEDNAFLAGS) -std=gnu99
CXXFLAGS := $(MEDNAFLAGS) -std=gnu++11 CXXFLAGS := $(MEDNAFLAGS) -std=gnu++11
EXTRA_LIBS := -lz
cppdir = $(shell find mednafen/src/$(1) -type f -name '*.cpp') cppdir = $(shell find mednafen/src/$(1) -type f -name '*.cpp')
cdir = $(shell find mednafen/src/$(1) -type f -name '*.c') cdir = $(shell find mednafen/src/$(1) -type f -name '*.c')
@ -31,13 +32,20 @@ OUT_DIR := obj/$(MODULENAME)
SRCS := \ SRCS := \
mednafen/src/error.cpp \ mednafen/src/error.cpp \
mednafen/src/VirtualFS.cpp \
mednafen/src/FileStream.cpp \ mednafen/src/FileStream.cpp \
mednafen/src/MemoryStream.cpp \
mednafen/src/Stream.cpp \ mednafen/src/Stream.cpp \
mednafen/src/file.cpp \
mednafen/src/NativeVFS.cpp \
mednafen/src/IPSPatcher.cpp \
mednafen/src/Time.cpp \ mednafen/src/Time.cpp \
mednafen/src/git.cpp \ mednafen/src/git.cpp \
mednafen/src/endian.cpp \
$(call cppdir,string) \ $(call cppdir,string) \
$(call cppdir,hash) \ $(call cppdir,hash) \
$(call cdir,trio) \ $(call cdir,trio) \
$(call cdir,cputest) \ $(call cdir,cputest) \
$(call cppdir,compress) \
$(filter-out %generate.cpp,$(call cppdir,sound)) \ $(filter-out %generate.cpp,$(call cppdir,sound)) \
Interfaces.cpp Interfaces.cpp

View File

@ -296,7 +296,7 @@
#define HAVE_MEMSET 1 #define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */ /* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR #define HAVE_MKDIR 1
/* Define to 1 if you have a working `mmap' system call. */ /* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP #undef HAVE_MMAP

13
waterbox/nyma/pcfx.mak Normal file
View File

@ -0,0 +1,13 @@
include common.mak
SRCS += \
$(filter-out %debug.cpp,$(call cppdir,pcfx)) \
$(call cppdir,hw_cpu/v810) \
$(filter-out %CDAFReader_SF.cpp,$(call cppdir,cdrom)) \
$(call cppdir,hw_video/huc6270) \
$(call cppdir,hw_sound/pce_psg) \
$(call cdir,tremor) \
$(call cdir,mpcdec) \
mednafen/src/mthreading/MThreading_POSIX.cpp
include ../common.mak