Questions about Libretro development

I’ve had to build a few Libretro cores in Visual Studio for a project I’m working on and I Would like to know more about the way Libretro builds their source.

First of all, am I correct in assuming that the makefiles are the “canonical” way of building cores and that I can disregard the Visual Studio projects?

Secondly, what is the significance of the split between makefile and makefile.common? Is one including the other? Should there be conflicting directives which one is supposed to override the other?

Finally, what is Griffin exactly? Is it just the c/cpp files that include a bunch of other ones or is there a server component to it that can’t be seen in the source?

Other than that, I’d like to ask what the situation is with regards to OpenGL ES and Vulkan? Is the goal for the project to migrate everything to Vulkan only or support OpenGL ES too going forward?

Finally, what is the best place to ask more specific questions about building a given core? Should I open an issue on the core’s github repo?

Thank you in advance for any knowledge you may be willing to share

We like using static Makefiles because most of us are on Linux primarily, though the Visual Studio projects are necessary for some platforms, so we create them when necessary. If a core doesn’t have one and you create one, we’d love to merge it. More compatibility is always preferred.

The Makefile/Makefile.common split isn’t obligatory, it’s just for cleanliness. Makefile.common includes platform-independent directives and then it gets included into the other Makefile(s) to avoid having one gigantic messy file.

Griffin is a sort of ghetto link-time optimization. We mostly use it for console builds, but I think it might come into play for any statically linked cores (i.e., potentially something you’d want to look into). However, I’m pretty sure it’s a frontend/RetroArch-specific thing, so it may or may not be applicable to your frontend.

I think if we could expect the entire computing industry to move to Vulkan, we would specialize on that, but I’m pretty sure that’s not going to happen, so we’ll continue supporting OpenGL/ES for the foreseeable future. Tbh, even in the case of everyone else dropping OGL, we’d probably still support it because Twinaphex has an irrational love for backward compatibility, lol. Cg is the only thing we’ve been looking to sideline, since Nvidia themselves have killed it off and once they stop providing the framework/toolkit, there will be no way to use it.

You can open issues on the cores, sure, or look at the build recipes in libretro-super (which we use to power our buildbot). You can also come to #retroarch and/or #libretro on Freenode IRC and we can answer questions there.

Thank you very much for your explanation, I really appreciate the help.

@anon24419061 Do you have any system in place to keep Visual Studio projects in sync with the makefiles do you do it manually? I’m guessing manually, but if there’s a better way I’d love to know :slight_smile: