Welcome to mirror list, hosted at ThFree Co, Russian Federation.

premake_main.c « host « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 86bc971e03df5732bb550230e7ecb4f2bb234e90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * \file   premake_main.c
 * \brief  Program entry point.
 * \author Copyright (c) 2002-2012 Jason Perkins and the Premake project
 */

#include "premake.h"

int main(int argc, const char** argv)
{
	lua_State* L;
	int z = OKAY;

	L = lua_open();
	luaL_openlibs(L);
	z = premake_init(L);

	/* push the location of the Premake executable */
	premake_locate(L, argv[0]);
	lua_setglobal(L, "_PREMAKE_COMMAND");

	if (z == OKAY)
	{
		z = premake_execute(L, argc, argv);
	}
	
	lua_close(L);
	return z;
}