Reconcile the standalone and libretro build systems

This commit is contained in:
刘皓 2025-04-09 23:52:12 -04:00
parent ecd8e50e9e
commit ae19c0e42e
No known key found for this signature in database
GPG key ID: 7901753DB465B711
8 changed files with 927 additions and 1007 deletions

View file

@ -25,3 +25,17 @@ foreach file : embedded_assets_f
) )
count += 1 count += 1
endforeach endforeach
if is_libretro
global_sources += custom_target(
'GMGSx',
input: 'GMGSx.sf2',
output: 'GMGSx.sf2.cpp',
command: [
embedtool,
'@INPUT@',
'@OUTPUT@',
'mkxp_gmgsx_sf2',
],
)
endif

View file

@ -0,0 +1,8 @@
global_sources += files([
'binding-base.cpp',
'binding-util.cpp',
'module_rpg.cpp',
'sandbox.cpp',
'wasi.cpp',
'wasm-rt.cpp',
])

View file

@ -0,0 +1,3 @@
#include "../binding/module_rpg1.rb.xxd"
#include "../binding/module_rpg2.rb.xxd"
#include "../binding/module_rpg3.rb.xxd"

File diff suppressed because it is too large Load diff

View file

@ -1,182 +1,443 @@
physfs = dependency('physfs', version: '>=2.1', static: build_static) if is_libretro
openal = dependency('openal', static: build_static, method: 'pkg-config') cmake = import('cmake')
theora = dependency('theora', static: build_static)
vorbisfile = dependency('vorbisfile', static: build_static) global_args += '-DMPG123_NO_LARGENAME'
vorbis = dependency('vorbis', static: build_static) global_args += '-DGL_GLES_PROTOTYPES=0'
ogg = dependency('ogg', static: build_static)
sdl2 = dependency('SDL2', static: build_static) if host_system == 'darwin'
sdl_sound = compilers['cpp'].find_library('SDL2_sound') global_dependencies += compilers['cpp'].find_library('iconv')
sdl2_ttf = dependency('SDL2_ttf', static: build_static) endif
freetype = dependency('freetype2', static: build_static)
pixman = dependency('pixman-1', static: build_static) global_dependencies += subproject('libretro-common').get_variable('libretro_common')
png = dependency('libpng', static: build_static)
zlib = dependency('zlib', static: build_static) boost_options = cmake.subproject_options()
uchardet = dependency('uchardet', static: build_static) boost_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
# As no pkg-config file is generated for static sdl2_image, and pkg-config is 'CMAKE_C_FLAGS': ' '.join(global_args),
# the default option for meson detecting dependencies, pkg-config will fail to 'CMAKE_CXX_FLAGS': ' '.join(global_args),
# find sdl2_image.pc in the build's lib/pkgconfig folder and instead pull it 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
# from the locally installed packages if it exists. 'BUILD_TESTING': false,
# To work around this, we first check to see if cmake can find our sdl2_image })
# sub project and use that, then check using pkg-config as normal if we are not global_dependencies += [
# building the sub project. cmake.subproject('boost_asio', options: boost_options).dependency('boost_asio'),
# It looks like upstream SDL_image fixed this for SDL3, so we can hopefully cmake.subproject('boost_mp11', options: boost_options).dependency('boost_mp11'),
# remove this workaround after eventually upgrading to SDL3. cmake.subproject('boost_describe', options: boost_options).dependency('boost_describe'),
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static, method: 'cmake', required: false) cmake.subproject('boost_config', options: boost_options).dependency('boost_config'),
if sdl2_image.found() == false cmake.subproject('boost_assert', options: boost_options).dependency('boost_assert'),
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static) cmake.subproject('boost_static_assert', options: boost_options).dependency('boost_static_assert'),
endif cmake.subproject('boost_throw_exception', options: boost_options).dependency('boost_throw_exception'),
cmake.subproject('boost_core', options: boost_options).dependency('boost_core'),
if host_system == 'windows' cmake.subproject('boost_container_hash', options: boost_options).dependency('boost_container_hash'),
bz2 = dependency('bzip2', static: build_static) cmake.subproject('boost_type_index', options: boost_options).dependency('boost_type_index'),
iconv = compilers['cpp'].find_library('iconv', static: build_static) cmake.subproject('boost_type_traits', options: boost_options).dependency('boost_type_traits'),
else cmake.subproject('boost_optional', options: boost_options).dependency('boost_optional'),
bz2 = compilers['cpp'].find_library('bz2') ]
# FIXME: Specifically asking for static doesn't work if iconv isn't
# installed in the system prefix somewhere zlib_options = cmake.subproject_options()
iconv = compilers['cpp'].find_library('iconv') zlib_options.add_cmake_defines({
global_dependencies += compilers['cpp'].find_library('charset') 'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
endif 'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
# If OpenSSL is present, you get HTTPS support 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
if get_option('enable-https') == true 'BUILD_SHARED_LIBS': false,
openssl = dependency('openssl', required: false, static: build_static) 'ZLIB_BUILD_EXAMPLES': false,
if openssl.found() == true })
global_dependencies += openssl global_dependencies += cmake.subproject(host_system == 'darwin' ? 'zlib-darwin' : 'zlib', options: zlib_options).dependency('zlibstatic')
global_args += '-DMKXPZ_SSL'
if host_system == 'windows' physfs_options = cmake.subproject_options()
global_link_args += '-lcrypt32' physfs_options.add_cmake_defines({
endif 'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
else 'CMAKE_C_FLAGS': ' '.join(global_args),
warning('Could not locate OpenSSL. HTTPS will be disabled.') 'CMAKE_CXX_FLAGS': ' '.join(global_args),
endif 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
endif 'PHYSFS_BUILD_STATIC': true,
'PHYSFS_BUILD_SHARED': false,
# Windows needs to be treated like a special needs child here 'PHYSFS_BUILD_TEST': false,
explicit_libs = '' 'PHYSFS_BUILD_DOCS': false,
if host_system == 'windows' })
# Newer versions of Ruby will refuse to link without these global_dependencies += cmake.subproject('physfs', options: physfs_options).dependency('physfs-static')
explicit_libs += 'libmsvcrt;libgcc;libmingwex;libgmp;'
endif openal_options = cmake.subproject_options()
if build_static == true openal_options.add_cmake_defines({
if host_system == 'windows' 'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
# '-static-libgcc', '-static-libstdc++' are here to avoid needing to ship a separate libgcc_s_seh-1.dll on Windows; it still works without those flags if you have the dll. 'CMAKE_C_FLAGS': ' '.join(global_args),
global_link_args += ['-static-libgcc', '-static-libstdc++', '-Wl,-Bstatic', '-lgcc', '-lstdc++', '-lpthread', '-Wl,-Bdynamic'] 'CMAKE_CXX_FLAGS': ' '.join(global_args),
else 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
global_link_args += ['-static-libgcc', '-static-libstdc++'] 'LIBTYPE': 'STATIC',
endif 'ALSOFT_DLOPEN': false,
global_args += '-DAL_LIBTYPE_STATIC' 'ALSOFT_UTILS': false,
endif 'ALSOFT_NO_CONFIG_UTIL': true,
'ALSOFT_EXAMPLES': false,
foreach l : explicit_libs.split(';') 'ALSOFT_UPDATE_BUILD_VERSION': false,
if l != '' 'ALSOFT_EMBED_HRTF_DATA': false,
global_link_args += '-l:' + l + '.a' 'ALSOFT_RTKIT': false,
endif 'ALSOFT_BACKEND_PIPEWIRE': false,
endforeach 'ALSOFT_BACKEND_PULSEAUDIO': false,
'ALSOFT_BACKEND_ALSA': false,
alcdev_struct = 'ALCdevice_struct' 'ALSOFT_BACKEND_OSS': false,
if openal.type_name() == 'pkgconfig' 'ALSOFT_BACKEND_SOLARIS': false,
if openal.version().version_compare('>=1.20.1') 'ALSOFT_BACKEND_SNDIO': false,
alcdev_struct = 'ALCdevice' 'ALSOFT_BACKEND_WINMM': false,
endif 'ALSOFT_BACKEND_DSOUND': false,
endif 'ALSOFT_BACKEND_WASAPI': false,
'ALSOFT_BACKEND_OTHERIO': false,
global_args += '-DMKXPZ_ALCDEVICE=' + alcdev_struct 'ALSOFT_BACKEND_JACK': false,
'ALSOFT_BACKEND_COREAUDIO': false,
'ALSOFT_BACKEND_OBOE': false,
global_include_dirs += include_directories('.', 'ALSOFT_BACKEND_OPENSL': false,
'audio', 'ALSOFT_BACKEND_PORTAUDIO': false,
'crypto', 'ALSOFT_BACKEND_SDL3': false,
'display', 'display/gl', 'display/libnsgif', 'display/libnsgif/utils', 'ALSOFT_BACKEND_SDL2': false,
'etc', 'ALSOFT_BACKEND_WAVE': false,
'filesystem', 'filesystem/ghc', })
'input', global_dependencies += cmake.subproject('openal-soft', options: openal_options).dependency('OpenAL')
'net', global_dependencies += cmake.subproject('openal-soft', options: openal_options).dependency('alsoft.fmt')
'system',
'util', 'util/sigslot', 'util/sigslot/adapter' fluidsynth_options = cmake.subproject_options()
) fluidsynth_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, iconv, uchardet] 'CMAKE_C_FLAGS': ' '.join(global_args),
if host_system == 'windows' 'CMAKE_CXX_FLAGS': ' '.join(global_args),
global_dependencies += compilers['cpp'].find_library('wsock32') 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
endif 'BUILD_SHARED_LIBS': false,
'enable-aufile': false,
if get_option('shared_fluid') == true 'enable-dbus': false,
fluidsynth = dependency('fluidsynth', static: build_static) 'enable-ipv6 ': false,
add_project_arguments('-DSHARED_FLUID', language: 'cpp') 'enable-jack': false,
global_dependencies += fluidsynth 'enable-ladspa': false,
if host_system == 'windows' 'enable-libinstpatch': false,
global_dependencies += compilers['cpp'].find_library('dsound') 'enable-libsndfile': false,
endif 'enable-midishare': false,
endif 'enable-opensles': false,
'enable-oboe': false,
if get_option('cjk_fallback_font') == true 'enable-network': false,
add_project_arguments('-DMKXPZ_CJK_FONT', language: 'cpp') 'enable-oss': false,
endif 'enable-dsound': false,
'enable-waveout': false,
main_source = files( 'enable-winmidi': false,
'main.cpp', 'enable-sdl2': false,
'config.cpp', 'enable-pkgconfig': false,
'eventthread.cpp', 'enable-pulseaudio': false,
'settingsmenu.cpp', 'enable-readline': false,
'sharedstate.cpp', 'enable-threads': false,
'enable-lash': false,
'audio/alstream.cpp', 'enable-alsa': false,
'audio/audio.cpp', 'enable-systemd': false,
'audio/audiostream.cpp', 'enable-coreaudio': false,
'audio/fluid-fun.cpp', 'enable-coremidi': false,
'audio/midisource.cpp', 'enable-framework': false,
'audio/sdlsoundsource.cpp', 'enable-dart': false,
'audio/soundemitter.cpp', })
'audio/vorbissource.cpp', global_dependencies += cmake.subproject('fluidsynth', options: fluidsynth_options).dependency('libfluidsynth')
'theoraplay/theoraplay.c',
ogg_options = cmake.subproject_options()
'crypto/rgssad.cpp', ogg_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'display/autotiles.cpp', 'CMAKE_C_FLAGS': ' '.join(global_args),
'display/autotilesvx.cpp', 'CMAKE_CXX_FLAGS': ' '.join(global_args),
'display/bitmap.cpp', 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'display/font.cpp', 'BUILD_SHARED_LIBS': false,
'display/graphics.cpp', 'BUILD_TESTING': false,
'display/plane.cpp', 'BUILD_FRAMEWORK': false,
'display/sprite.cpp', })
'display/tilemap.cpp', global_dependencies += cmake.subproject('ogg', options: ogg_options).dependency('ogg')
'display/tilemapvx.cpp',
'display/viewport.cpp', vorbis_options = cmake.subproject_options()
'display/window.cpp', vorbis_options.add_cmake_defines({
'display/windowvx.cpp', 'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'display/libnsgif/libnsgif.c', 'CMAKE_CXX_FLAGS': ' '.join(global_args),
'display/libnsgif/lzw.c', 'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'display/gl/gl-debug.cpp', 'BUILD_TESTING': false,
'display/gl/gl-fun.cpp', 'BUILD_FRAMEWORK': false,
'display/gl/gl-meta.cpp', })
'display/gl/glstate.cpp', global_dependencies += cmake.subproject('vorbis', options: vorbis_options).dependency('vorbis')
'display/gl/scene.cpp', global_dependencies += cmake.subproject('vorbis', options: vorbis_options).dependency('vorbisfile')
'display/gl/shader.cpp',
'display/gl/texpool.cpp', flac_options = cmake.subproject_options()
'display/gl/tileatlas.cpp', flac_options.add_cmake_defines({
'display/gl/tileatlasvx.cpp', 'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'display/gl/tilequad.cpp', 'CMAKE_C_FLAGS': ' '.join(global_args),
'display/gl/vertex.cpp', 'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'util/iniconfig.cpp', 'BUILD_SHARED_LIBS': false,
'util/win-consoleutils.cpp', 'BUILD_CXXLIBS': false,
'BUILD_PROGRAMS': false,
'etc/etc.cpp', 'BUILD_EXAMPLES': false,
'etc/table.cpp', 'BUILD_TESTING': false,
'BUILD_DOCS': false,
'filesystem/filesystem.cpp', 'BUILD_UTILS': false,
'filesystem/filesystemImpl.cpp', 'ENABLE_MULTITHREADING': false,
'INSTALL_MANPAGES': false,
'input/input.cpp', 'WITH_OGG': false,
'input/keybindings.cpp', 'WITH_FORTIFY_SOURCE': false,
'WITH_STACK_PROTECTOR': false,
'net/LUrlParser.cpp', })
'net/net.cpp', global_dependencies += cmake.subproject('flac', options: flac_options).dependency('FLAC')
'system/systemImpl.cpp' opus_options = cmake.subproject_options()
) opus_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
global_sources += main_source 'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'OPUS_BUILD_SHARED_LIBRARY': false,
'OPUS_BUILD_TESTING': false,
'OPUS_CUSTOM_MODES': false,
'OPUS_BUILD_PROGRAMS': false,
'OPUS_DISABLE_INTRINSICS': true,
'OPUS_FLOAT_APPROX': false,
'OPUS_BUILD_FRAMEWORK': false,
'OPUS_STATIC_RUNTIME': false,
'OPUS_FORTIFY_SOURCE': false,
'OPUS_STACK_PROTECTOR': false,
})
global_dependencies += cmake.subproject('opus', options: opus_options).dependency('opus')
mpg123_options = cmake.subproject_options()
mpg123_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_PROGRAMS': false,
'BUILD_LIBOUT123': false,
'CHECK_MODULES': false,
'FIFO': false,
})
global_dependencies += cmake.subproject('mpg123', options: mpg123_options).dependency('libmpg123')
global_dependencies += cmake.subproject('mpg123', options: mpg123_options).dependency('compat')
libsndfile_options = cmake.subproject_options()
libsndfile_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'BUILD_SHARED_LIBS': false,
'BUILD_PROGRAMS': false,
'BUILD_EXAMPLES': false,
'BUILD_REGTEST': false,
'BUILD_TESTING': false,
'ENABLE_CPACK': false,
'ENABLE_PACKAGE_CONFIG': false,
'INSTALL_PKGCONFIG_MODULE': false,
'ENABLE_EXTERNAL_LIBS': true,
'ENABLE_MPEG': true,
'ENABLE_EXPERIMENTAL': false,
})
global_dependencies += cmake.subproject('libsndfile', options: libsndfile_options).dependency('sndfile')
pixman_region_options = cmake.subproject_options()
pixman_region_options.add_cmake_defines({
'CMAKE_POLICY_VERSION_MINIMUM': '3.10',
'CMAKE_C_FLAGS': ' '.join(global_args),
'CMAKE_CXX_FLAGS': ' '.join(global_args),
'CMAKE_POSITION_INDEPENDENT_CODE': use_pic,
'CMAKE_BUILD_TYPE': 'None',
})
global_dependencies += cmake.subproject('pixman-region', options: pixman_region_options).dependency('pixman-region')
global_dependencies += subproject('stb').get_variable('stb')
global_sources += files('stb_image.c', 'stb_sprintf.c')
global_dependencies += subproject('opengl-registry').get_variable('opengl_registry')
freetype_options = [
'cflags=@0@'.format(','.join(global_args)),
'cppflags=@0@'.format(','.join(global_args)),
'default_library=static',
'b_staticpic=@0@'.format(use_pic),
'brotli=disabled',
'bzip2=disabled',
'harfbuzz=disabled',
'mmap=disabled',
'png=disabled',
'tests=disabled',
'zlib=disabled',
]
global_dependencies += subproject('freetype', default_options: freetype_options).get_variable('freetype_dep')
else
physfs = dependency('physfs', version: '>=2.1', static: build_static)
openal = dependency('openal', static: build_static, method: 'pkg-config')
theora = dependency('theora', static: build_static)
vorbisfile = dependency('vorbisfile', static: build_static)
vorbis = dependency('vorbis', static: build_static)
ogg = dependency('ogg', static: build_static)
sdl2 = dependency('SDL2', static: build_static)
sdl_sound = compilers['cpp'].find_library('SDL2_sound')
sdl2_ttf = dependency('SDL2_ttf', static: build_static)
freetype = dependency('freetype2', static: build_static)
pixman = dependency('pixman-1', static: build_static)
png = dependency('libpng', static: build_static)
zlib = dependency('zlib', static: build_static)
uchardet = dependency('uchardet', static: build_static)
# As no pkg-config file is generated for static sdl2_image, and pkg-config is
# the default option for meson detecting dependencies, pkg-config will fail to
# find sdl2_image.pc in the build's lib/pkgconfig folder and instead pull it
# from the locally installed packages if it exists.
# To work around this, we first check to see if cmake can find our sdl2_image
# sub project and use that, then check using pkg-config as normal if we are not
# building the sub project.
# It looks like upstream SDL_image fixed this for SDL3, so we can hopefully
# remove this workaround after eventually upgrading to SDL3.
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static, method: 'cmake', required: false)
if sdl2_image.found() == false
sdl2_image = dependency('SDL2_image', modules: ['SDL2_image::SDL2_image-static', 'SDL2_image::brotlidec-static', 'SDL2_image::brotlicommon-static', 'SDL2_image::hwy', 'SDL2_image::jxl_dec-static'], static: build_static)
endif
if host_system == 'windows'
bz2 = dependency('bzip2', static: build_static)
iconv = compilers['cpp'].find_library('iconv', static: build_static)
else
bz2 = compilers['cpp'].find_library('bz2')
# FIXME: Specifically asking for static doesn't work if iconv isn't
# installed in the system prefix somewhere
iconv = compilers['cpp'].find_library('iconv')
global_dependencies += compilers['cpp'].find_library('charset')
endif
# If OpenSSL is present, you get HTTPS support
if get_option('enable-https') == true
openssl = dependency('openssl', required: false, static: build_static)
if openssl.found() == true
global_dependencies += openssl
global_args += '-DMKXPZ_SSL'
if host_system == 'windows'
global_link_args += '-lcrypt32'
endif
else
warning('Could not locate OpenSSL. HTTPS will be disabled.')
endif
endif
# Windows needs to be treated like a special needs child here
explicit_libs = ''
if host_system == 'windows'
# Newer versions of Ruby will refuse to link without these
explicit_libs += 'libmsvcrt;libgcc;libmingwex;libgmp;'
endif
foreach l : explicit_libs.split(';')
if l != ''
global_link_args += '-l:' + l + '.a'
endif
endforeach
alcdev_struct = 'ALCdevice_struct'
if openal.type_name() == 'pkgconfig'
if openal.version().version_compare('>=1.20.1')
alcdev_struct = 'ALCdevice'
endif
endif
global_args += '-DMKXPZ_ALCDEVICE=' + alcdev_struct
global_dependencies += [openal, zlib, bz2, sdl2, sdl_sound, pixman, physfs, theora, vorbisfile, vorbis, ogg, sdl2_ttf, freetype, sdl2_image, png, iconv, uchardet]
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('wsock32')
endif
if get_option('shared_fluid') == true
fluidsynth = dependency('fluidsynth', static: build_static)
global_args += '-DSHARED_FLUID'
global_dependencies += fluidsynth
if host_system == 'windows'
global_dependencies += compilers['cpp'].find_library('dsound')
endif
endif
endif
if get_option('cjk_fallback_font') == true
global_args += '-DMKXPZ_CJK_FONT'
endif
global_include_dirs += include_directories('.',
'audio',
'crypto',
'display', 'display/gl', 'display/libnsgif', 'display/libnsgif/utils',
'etc',
'filesystem', 'filesystem/ghc',
'input',
'net',
'system',
'util', 'util/sigslot', 'util/sigslot/adapter'
)
main_source = files(
is_libretro ? 'core.cpp' : 'main.cpp',
is_libretro ? [] : 'config.cpp',
is_libretro ? [] : 'eventthread.cpp',
is_libretro ? [] : 'settingsmenu.cpp',
'sharedstate.cpp',
is_libretro ? 'mkxp-polyfill.cpp' : [],
'audio/alstream.cpp',
'audio/audio.cpp',
'audio/audiostream.cpp',
'audio/fluid-fun.cpp',
'audio/midisource.cpp',
is_libretro ? 'audio/sndfilesource.cpp' : 'audio/sdlsoundsource.cpp',
'audio/soundemitter.cpp',
'audio/vorbissource.cpp',
is_libretro ? [] : 'theoraplay/theoraplay.c',
'crypto/rgssad.cpp',
'display/autotiles.cpp',
is_libretro ? [] : 'display/autotilesvx.cpp',
'display/bitmap.cpp',
'display/font.cpp',
'display/graphics.cpp',
'display/plane.cpp',
'display/sprite.cpp',
'display/tilemap.cpp',
is_libretro ? [] : 'display/tilemapvx.cpp',
'display/viewport.cpp',
'display/window.cpp',
is_libretro ? [] : 'display/windowvx.cpp',
is_libretro ? [] : 'display/libnsgif/libnsgif.c',
is_libretro ? [] : 'display/libnsgif/lzw.c',
'display/gl/gl-debug.cpp',
'display/gl/gl-fun.cpp',
'display/gl/gl-meta.cpp',
'display/gl/glstate.cpp',
'display/gl/scene.cpp',
'display/gl/shader.cpp',
'display/gl/texpool.cpp',
'display/gl/tileatlas.cpp',
is_libretro ? [] : 'display/gl/tileatlasvx.cpp',
'display/gl/tilequad.cpp',
'display/gl/vertex.cpp',
is_libretro ? [] : 'util/iniconfig.cpp',
is_libretro ? [] : 'util/win-consoleutils.cpp',
'etc/etc.cpp',
'etc/table.cpp',
'filesystem/filesystem.cpp',
is_libretro ? [] : 'filesystem/filesystemImpl.cpp',
is_libretro ? [
'input/input-retro.cpp',
] : [
'input/input.cpp',
'input/keybindings.cpp',
],
is_libretro ? [] : [
'net/LUrlParser.cpp',
'net/net.cpp',
],
is_libretro ? [] : 'system/systemImpl.cpp',
)
global_sources += main_source

View file

@ -1,10 +1,10 @@
#ifndef MKXPZ_STB_IMAGE_MALLOC_H #ifndef MKXPZ_STB_IMAGE_MALLOC_H
#define MKXPZ_STB_IMAGE_MALLOC_H #define MKXPZ_STB_IMAGE_MALLOC_H
#include <cstdlib> #include <stdlib.h>
#define STBI_MALLOC std::malloc #define STBI_MALLOC malloc
#define STBI_REALLOC std::realloc #define STBI_REALLOC realloc
#define STBI_FREE std::free #define STBI_FREE free
#endif // MKXPZ_STB_IMAGE_MALLOC_H #endif // MKXPZ_STB_IMAGE_MALLOC_H