Retroarch with embedded core

Hello all.

I’m trying to figure out how to compile a RetroArch binary for Linux with a single core baked in the same executable (I understand this is possible using --with-libretro).

Is there any documentation on how to build the core and then use this option? I haven’t been able to find any examples.

Any tips are appreciated, thanks.