-
Notifications
You must be signed in to change notification settings - Fork 21
Premake Quick Start
Home > Premake Quick Start
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 it now. Currently, this repository does not host any downloads. There is a an open issue. In the meantime, Premake can be obtained from the old SourceForge page, the Internet Archive, or from a a WinDirStat fork.
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:
premake4 [action]
Premake defines the following list of actions out of the box which generate project files for a particular toolset. It is also possible to define custom actions.
Action | Description |
---|---|
vs2013 | Generate Visual Studio 2013 project files (coming in Premake 4.4) |
vs2012 | Generate Visual Studio 2012 project files (coming in Premake 4.4) |
vs2010 | Generate Visual Studio 2010 project files |
vs2008 | Generate Visual Studio 2008 project files |
vs2005 | Generate Visual Studio 2005 project files |
vs2003 | Generate Visual Studio 2003 project files |
vs2002 | Generate Visual Studio 2002 project files |
gmake | Generate GNU Makefiles (including Cygwin and MinGW) |
xcode3 | Generate Apple Xcode 3 project files |
codeblocks | Generate Code::Blocks project files |
codelite | Generate CodeLite project files |
You can see a complete list of the actions and other options supported by a project with the command:
premake4 --help
Once the project files have been generated you can load the solution or workspace into your IDE and build as you normally would.
Running make with no options will build all targets using the default configuration. To build a different configuration supply the config argument:
make config=release
Most projects provide debug and release configurations; to see the available targets and configurations, type:
make help
Remove all generated binaries and intermediate files with:
make clean
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.