I'm the author of Node9, a hosted, hybrid OS that combines Inferno and LuaJIT to create an interactive, distributed development environment. See the project here: https://github.com/jvburnes/node9
I created a basic 4.x premake script to compile all of the dependencies and main source code for OSX, but now people are asking for build configurations for Linux, BSD and Windows. I have the code to do this and I want to create premake configurations to build and run Node9 on these OSs. I'll need to set library and include search paths, compiler names, as well as per-platform defines.
- Can anyone point me to a good multi platform premake script?
- Do I use "premake gmake" and sense the native platform somehow or do I need to explicitly place the target platform on the command line and refer to that platform in the premake Configuration and Platform sections?
- I heard that premake 4.x was legacy and that premake 5.x is the solution going forward. Is it stable and available enough to build for all these platforms?
I know that's a lot of questions, but I want to do this right.
Thanks.
I'm not an expert in multiplatform compilation, but here are some things that might help you. First, I strongly advise you to switch to Premake5. It's stable, the community works on it and is quite active, and you have support for modules (Android ? :p) and a lot of cool other features.
As for your questions:
I can't, but basically it should be as simple as something like this:
When you invoke
premake gmake
you just tell premake to build a makefile for gmake. If you have gmake on Windows, MacOS and Linux, you can usepremake gmake
for all platforms. It's when you actually build that you just need to specify your configuration and platform. I don't know gmake well enough, but that might look something like this:gmake config=release platform=linux32
As I said, you probably want to update to Premake 5. I think it's stable enough, and in case of problem you can ask questions here :)