File: project.h

package info (click to toggle)
premake 3.7-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,148 kB
  • sloc: ansic: 20,490; cs: 15,185; makefile: 332
file content (189 lines) | stat: -rw-r--r-- 5,812 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/**********************************************************************
 * Premake - project.h
 * An interface around the project data.
 *
 * Copyright (c) 2002-2005 Jason Perkins and the Premake project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License in the file LICENSE.txt for details.
 **********************************************************************/

typedef struct tagOption
{
	const char* flag;
	const char* desc;
} Option;


typedef struct tagPrjConfig
{
	const char* name;
	const char* bindir;
	const char* libdir;
} PrjConfig;

typedef struct tagFileConfig
{
	const char* buildaction;
} FileConfig;

typedef struct tagPkgConfig
{
	PrjConfig*   prjConfig;
	const char** buildopts;
	const char** prebuildcmds;
	const char** prelinkcmds;
	const char** postbuildcmds;
	const char** defines;
	const char** resdefines;
	const char*  extension;
	const char** files;
	const char** flags;
	const char** incpaths;
	const char** respaths;
	const char** libpaths;
	const char** linkopts;
	const char** resopts;
	const char** links;
	const char*  bindir;
	const char*  libdir;
	const char*  objdir;
	const char*  prefix;
	const char*  target;
	const char*  kind;
	const char*  pchHeader;
	const char*  pchSource;
	const char*  implibname;
	FileConfig** fileconfigs;
} PkgConfig;

typedef struct tagPackage
{
	int index;
	const char*  name;
	const char*  path;
	const char*  script;
	const char*  lang;
	const char*  objdir;
	const char*  url;
	const char*  guid;
	PkgConfig**  configs;
	void*        data;
} Package;

typedef struct tagProject
{
	const char* name;
	const char* path;
	const char* script;
	Option**    options;
	PrjConfig** configs;
	Package**   packages;
} Project;

extern Project* project;


void         prj_open();
void         prj_close();

const char*  prj_find_filetype(const char* extension);
int          prj_find_package(const char* name);
const char*  prj_get_bindir();
const char*  prj_get_buildaction();
const char** prj_get_buildoptions();
const char** prj_get_prebuildcommands();
const char** prj_get_prelinkcommands();
const char** prj_get_postbuildcommands();
const char*  prj_get_cfgname();
PkgConfig*   prj_get_config_for(int i);
void*        prj_get_data();
void*        prj_get_data_for(int i);
const char** prj_get_defines();
const char*  prj_get_extension();
const char** prj_get_files();
const char*  prj_get_kind();
const char*  prj_get_kind_for(int i);
const char** prj_get_incpaths();
const char*  prj_get_language();
const char*  prj_get_language_for(int i);
const char*  prj_get_libdir();
const char*  prj_get_libdir_for(int i);
const char** prj_get_libpaths();
const char** prj_get_linkoptions();
const char** prj_get_links();
const char*  prj_get_name();
int          prj_get_numbuildoptions();
int          prj_get_numprebuildcommands();
int          prj_get_numprelinkcommands();
int          prj_get_numpostbuildcommands();
int          prj_get_numconfigs();
int          prj_get_numdefines();
int          prj_get_numincpaths();
int          prj_get_numlinkoptions();
int          prj_get_numlinks();
int          prj_get_numoptions();
int          prj_get_numpackages();
int          prj_get_numresdefines();
int          prj_get_numresoptions();
int          prj_get_numrespaths();
const char*  prj_get_objdir();
const char*  prj_get_optdesc();
const char*  prj_get_optname();
const char*  prj_get_outdir();
const char*  prj_get_outdir_for(int i);
Package*     prj_get_package();
Package*     prj_get_package_for(int i);
const char*  prj_get_path();
const char*  prj_get_pch_header();
const char*  prj_get_pch_source();
const char*  prj_get_pkgfilename(const char* extension);
const char*  prj_get_pkgfilename_for(int i, const char* extension);
const char*  prj_get_pkgname();
const char*  prj_get_pkgname_for(int i);
const char*  prj_get_pkgobjdir();
const char*  prj_get_pkgpath();
const char*  prj_get_pkgpath_for(int i);
const char*  prj_get_pkgscript();
const char*  prj_get_prefix();
const char** prj_get_resdefines();
const char** prj_get_resoptions();
const char** prj_get_respaths();
const char*  prj_get_script();
const char*  prj_get_target();
const char*  prj_get_target_for(int i);
const char*  prj_get_relativetarget_for(int i);
const char*  prj_get_target_raw();
const char*  prj_get_targetname_for(int i);
const char*  prj_get_url();
int          prj_has_file(const char* name);
int          prj_has_flag(const char* flag);
int          prj_has_flag_for(int i, const char* flag);
int          prj_has_libpath(const char* path);
int          prj_has_pch();
int          prj_is_buildaction(const char* action);
int          prj_is_kind(const char* kind);
int          prj_is_lang(const char* lang);
void         prj_select_config(int i);
void         prj_select_file(const char* name);
void         prj_select_option(int i);
void         prj_select_package(int i);
void         prj_set_buildaction(const char* action);
void         prj_set_data(void* data);

void**       prj_newlist(int len);
void         prj_freelist(void** list);
int          prj_getlistsize(void** list);

int          prj_has_guid();
const char*  prj_get_guid();

int          prj_has_importlibname();
const char*  prj_get_importlibname();