A quick introduction for people who arrived here directly: Premake is a build configuration tool. It reads a description of a software project and generates the files for one of several different toolsets. By using Premake, software developers can save time and support more tools and users. Learn More.
If you don't have Premake already, you can download it now.
Premake is a small (around 200K) command line executable, delivered as a single file. Just unpack the download and place the executable on your system search path or anywhere else convenient.
The simplest Premake command is:
Usually you would like Premake to generate project files for a particular toolset, in which case action is one of these toolset identifiers:
|vs2010||Visual Studio 2010 (or Express)|
|vs2008||Visual Studio 2008 (or Express)|
|vs2005||Visual Studio 2005 (or Express), SharpDevelop, or MonoDevelop|
|vs2003||Visual Studio 2003|
|vs2002||Visual Studio 2002|
|gmake||GNU Make (including Cygwin and MinGW)|
|xcode3||Apple Xcode 3|
You can see a complete list of actions and other options by typing:
Once the files have been generated you can load the solution or workspace into your IDE and build as you normally would.
Using the Generated Makefiles
Running make with no options will build all targets using the default configuration. To build a different configuration supply the config argument:
Most projects provide debug and release configurations; to see the available targets and configurations, type:
Remove all generated binaries and intermediate files with:
Premake generated makefiles do not support a make install step. Instead, project owners are encouraged to add an install action to their Premake scripts, which has the advantage of working with any toolset on any platform. You can check for the existence of an install action by viewing the help (run premake4 --help in the project directory).
If you are having trouble building your project, start by contacting the project manager. If you are having trouble building or using Premake, visit our Support page and I'll try to help you out.
To learn how to use Premake for your own software projects see Scripting With Premake.