TsundereStation/link.T
Lib b37eec04cc libretro: add static Makefile.libretro build
Add a self-contained static Makefile (Makefile.libretro) that builds
the libretro core without CMake, modeled on the Beetle PSX libretro
Makefile.

The CMake build is unaffected and continues to work; the new file is
strictly additive.

Usage:
  make -f Makefile.libretro                 # native build
  make -f Makefile.libretro platform=unix
  make -f Makefile.libretro platform=osx
  make -f Makefile.libretro platform=win
  make -f Makefile.libretro DEBUG=1
  make -f Makefile.libretro SILENT=1

Supports Linux, macOS, and Windows (MinGW / MSYS2). CPU_ARCH is
detected automatically; recompiler back-ends are gated per arch
(x64 -> xbyak, aarch64/aarch32 -> vixl).

Always assumes libretro defines (LIBRETRO=1, __LIBRETRO__) are on.
Source list and include paths are transcribed from the corresponding
CMakeLists.txt files in src/ and dep/.

Generates two headers at build time that CMake normally produces via
configure_file():

 - src/config.h           (HAVE_MKSTEMP / HAVE_ALLOCA_H / HAVE_MALLOC_H)
 - src/libretro/version.h (GIT_VERSION / GIT_HASH / BUILD_DATE)

Both are .gitignore'd by the existing rules.

Symbol exports are filtered to retro_* via:
 - link.T              (Linux / MinGW version script)
 - libretro.osx.def    (Mach-O exported_symbols_list)

Verified: clean Linux/x64 build produces an 8 MB
swanstation_libretro.so with exactly 25 exported retro_* symbols and
no other dynamic dependencies beyond libc/libm.
2026-05-07 21:32:02 +02:00

4 lines
38 B
Raku

{
global: retro_*;
local: *;
};