Commit | Line | Data |
---|---|---|
d44e3c4f | 1 | /****************************************************************************** |
2 | * Copyright (c) 2000-2016 Ericsson Telecom AB | |
3 | * All rights reserved. This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | * | |
8 | * Contributors: | |
9 | * Baji, Laszlo | |
10 | * Balasko, Jeno | |
11 | * Baranyi, Botond | |
12 | * Beres, Szabolcs | |
13 | * Delic, Adam | |
14 | * Kovacs, Ferenc | |
15 | * Raduly, Csaba | |
16 | * Szabo, Bence Janos | |
17 | * Pandi, Krisztian | |
18 | * | |
19 | ******************************************************************************/ | |
970ed795 EL |
20 | #ifndef XPATHER_H_ |
21 | #define XPATHER_H_ | |
22 | ||
23 | #include <stdio.h> | |
24 | ||
25 | typedef int boolean; | |
26 | #define TRUE 1 | |
27 | #define FALSE 0 | |
28 | ||
29 | enum tpd_result { TPD_FAILED = -1, TPD_SKIPPED = 0, TPD_SUCCESS = 1 }; | |
30 | ||
31 | struct string_list { | |
32 | char* str; | |
33 | struct string_list* next; | |
34 | }; | |
35 | ||
36 | struct string2_list { | |
37 | char* str1; | |
38 | char* str2; | |
39 | struct string2_list* next; | |
40 | }; | |
41 | ||
af710487 | 42 | #ifdef __cplusplus |
43 | extern "C" | |
44 | #endif | |
45 | boolean isTopLevelExecutable(const char* projName); | |
46 | ||
47 | #ifdef __cplusplus | |
48 | extern "C" | |
49 | #endif | |
50 | boolean isDynamicLibrary(const char* key); | |
51 | ||
52 | #ifdef __cplusplus | |
53 | extern "C" | |
54 | #endif | |
55 | const char* findLibraryPath(const char* libraryName, const char* projName); | |
56 | ||
57 | #ifdef __cplusplus | |
58 | extern "C" | |
59 | #endif | |
60 | const char* findLibraryName(const char* libraryName, const char* projName); | |
61 | ||
62 | #ifdef __cplusplus | |
63 | extern "C" | |
64 | #endif | |
65 | void erase_libs(); | |
66 | ||
67 | #ifdef __cplusplus | |
68 | extern "C" | |
69 | #endif | |
70 | const char* getLibFromProject(const char* projName); | |
71 | ||
72 | #ifdef __cplusplus | |
73 | extern "C" | |
74 | #endif | |
75 | struct string_list* getExternalLibs(const char* projName); | |
76 | ||
77 | #ifdef __cplusplus | |
78 | extern "C" | |
79 | #endif | |
3abe9331 | 80 | struct string_list* getExternalLibPaths(const char* projName); |
af710487 | 81 | |
82 | #ifdef __cplusplus | |
83 | extern "C" | |
84 | #endif | |
85 | struct string2_list* getLinkerLibs(const char* projName); | |
86 | ||
87 | #ifdef __cplusplus | |
88 | extern "C" | |
89 | #endif | |
90 | struct string_list* getRefWorkingDirs(const char* projName); | |
91 | ||
92 | #ifdef __cplusplus | |
93 | extern "C" | |
94 | #endif | |
95 | boolean hasExternalLibrary(const char* libName, const char* projName); | |
96 | ||
97 | #ifdef __cplusplus | |
98 | extern "C" | |
99 | #endif | |
100 | boolean hasSubProject(const char* projName); | |
101 | ||
102 | #ifdef __cplusplus | |
103 | extern "C" | |
104 | #endif | |
105 | void print_libs(); | |
106 | ||
107 | #ifdef __cplusplus | |
108 | extern "C" | |
109 | #endif | |
110 | boolean isTtcn3ModuleInLibrary(const char* moduleName); | |
111 | ||
112 | #ifdef __cplusplus | |
113 | extern "C" | |
114 | #endif | |
115 | const char* getTPDFileName(const char* projName); | |
116 | ||
117 | #ifdef __cplusplus | |
118 | extern "C" | |
119 | #endif | |
120 | const char* getPathToRootDir(const char* projName); | |
121 | ||
122 | #ifdef __cplusplus | |
123 | extern "C" | |
124 | #endif | |
125 | boolean isAsn1ModuleInLibrary(const char* moduleName); | |
126 | ||
127 | #ifdef __cplusplus | |
128 | extern "C" | |
129 | #endif | |
130 | boolean isSourceFileInLibrary(const char* fileName); | |
131 | ||
132 | #ifdef __cplusplus | |
133 | extern "C" | |
134 | #endif | |
135 | boolean isHeaderFileInLibrary(const char* fileName); | |
136 | ||
137 | #ifdef __cplusplus | |
138 | extern "C" | |
139 | #endif | |
140 | boolean isTtcnPPFileInLibrary(const char* fileName); | |
141 | ||
142 | #ifdef __cplusplus | |
143 | extern "C" | |
144 | #endif | |
145 | boolean buildObjects(const char* projName, boolean add_referenced); | |
146 | ||
147 | ||
970ed795 EL |
148 | /** |
149 | * | |
150 | * @param p_tpd_name filename | |
151 | * @param actcfg actual configuration name | |
152 | * @param file_list_path the argument of the -P switch | |
153 | * @param argc pointer to argv | |
154 | * @param argv pointer to argc | |
155 | * @param optind pointer to optind | |
156 | * @param ets_name from the -e switch | |
157 | * @param gnu_make from the -g switch | |
158 | * @param single_mode -s switch | |
159 | * @param central_storage -c switch | |
160 | * @param absolute_paths -a switch | |
161 | * @param preprocess -p switch | |
162 | * @param use_runtime_2 -R switch | |
163 | * @param dynamic dynamic linking, -l switch | |
164 | * @param makedepend -m switch | |
165 | * @param filelist -P switch | |
166 | * @param recursive -r switch | |
167 | * @param force_overwrite -F switch | |
168 | * @param output_file from the -o switch | |
169 | * @param abs_work_dir workingDirectory element of TPD will be stored here, must be Free()'d | |
170 | * @param sub_project_dirs directories of sub-projects that need to be built before this one, | |
171 | if set to NULL when calling this function then it won't be set, otherwise it must be deallocated after the call | |
172 | * @param program_name original value of argv[0], which is the executable path used to start this program | |
173 | * @param prj_graph_fp write project graph xml data into this file if not NULL | |
174 | * @create_symlink_list a list of symlinks to be created | |
175 | * @param ttcn3_prep_includes TTCN3preprocessorIncludes | |
176 | * @param ttcn3_prep_defines preprocessorDefines | |
177 | * @param prep_includes preprocessorIncludes | |
178 | * @param prep_defines preprocessorDefines | |
179 | * @param codesplit codeSplitting | |
180 | * @param quietly quietly | |
181 | * @param disablesubtypecheck disableSubtypeChecking | |
182 | * @param cxxcompiler CxxCompiler | |
183 | * @param optlevel optimizationLevel | |
184 | * @param optflags otherOptimizationFlags | |
185 | * @param disableber disableBER -b | |
186 | * @param disableraw disableRAW -r | |
187 | * @param disabletext disableTEXT -x | |
188 | * @param disablexer disableXER -X | |
189 | * @param disablejson disableJSON -j | |
190 | * @param forcexerinasn forceXERinASN.1 -a | |
191 | * @param defaultasomit defaultasOmit -d | |
192 | * @param gccmessageformat gccMessageFormat -g | |
193 | * @param linenumber lineNumbersOnlyInMessages -i | |
194 | * @param includesourceinfo includeSourceInfo -L | |
195 | * @param addsourcelineinfo addSourceLineInfo -l | |
196 | * @param suppresswarnings suppressWarnings -S | |
197 | * @param outparamboundness outParamBoundness -Y | |
3abe9331 | 198 | * @param omit_in_value_list omitInValueList -M |
feade998 | 199 | * @param warnings_for_bad_variants warningsForBadVariants -E |
f08ff9ca | 200 | * @param activate_debugger activateDebugger -n |
feade998 | 201 | * @param disable_predef_exp_folder disablePredefinedExternalFolder |
970ed795 EL |
202 | * @param solspeclibs SolarisSpecificLibraries |
203 | * @param sol8speclibs Solaris8SpecificLibraries | |
204 | * @param linuxspeclibs LinuxSpecificLibraries | |
205 | * @param freebsdspeclibs FreeBSDSpecificLibraries | |
206 | * @param win32speclibs Win32SpecificLibraries | |
207 | * @param ttcn3preprocessor ttcn3preprocessor | |
208 | * @param linkerlibs linkerlibs | |
209 | * @param linkerlibrarysearchpath linkerlibrarysearchpath | |
210 | * @param Vflag -V switch | |
211 | * @param Dflag -D switch | |
212 | * @param generatorCommandOutput the output of the command that generates a Makefile snippet | |
213 | * @param target_placement_list a list of (target,placement) strings pairs from the TPD | |
214 | * @param prefix_workdir prefix working directory with project name | |
215 | * @param run_command_list contains the working directories and the makefilegen commands to be called there | |
feade998 | 216 | * @param search_paths contains the paths that can be tried if a file is not found |
217 | * @param n_search_paths contains the size of relative_prefixes | |
3abe9331 | 218 | * @return TPD_SUCCESS if parsing successful, TPD_SKIPPED if the tpd |
970ed795 EL |
219 | * was seen already, or TPD_FAILED on error. |
220 | */ | |
221 | #ifdef __cplusplus | |
222 | extern "C" | |
223 | #else | |
224 | enum | |
225 | #endif | |
226 | tpd_result process_tpd(const char *p_tpd_name, const char *actcfg, | |
227 | const char *file_list_path, | |
228 | int *argc, char ***argv, | |
af710487 | 229 | int *optind, char **ets_name, char **project_name, |
970ed795 EL |
230 | boolean *gnu_make, boolean *single_mode, |
231 | boolean *central_storage, boolean *absolute_paths, | |
232 | boolean *preprocess, boolean *use_runtime_2, | |
233 | boolean *dynamic, boolean *makedepend, boolean *filelist, | |
234 | boolean *library, boolean recursive, boolean force_overwrite, boolean gen_only_top_level, | |
235 | const char *output_file, char** abs_work_dir, struct string_list* sub_project_dirs, | |
236 | const char* program_name, FILE* prj_graph_fp, struct string2_list* create_symlink_list, struct string_list* ttcn3_prep_includes, | |
af710487 | 237 | struct string_list* ttcn3_prep_defines, struct string_list* ttcn3_prep_undefines, struct string_list* prep_includes, |
238 | struct string_list* prep_defines, struct string_list* prep_undefines, boolean *codesplit, boolean *quietly, boolean *disablesubtypecheck, | |
239 | char** cxxcompiler, char** optlevel, char** optflags, boolean *disableber, boolean *disableraw, boolean *disabletext, boolean *disablexer, | |
970ed795 EL |
240 | boolean *disablejson, boolean *forcexerinasn, boolean *defaultasomit, boolean *gccmessageformat, |
241 | boolean *linenumber, boolean *includesourceinfo, boolean *addsourcelineinfo, boolean *suppresswarnings, | |
f08ff9ca BB |
242 | boolean *outparamboundness, boolean *omit_in_value_list, boolean *warnings_for_bad_variants, boolean *activate_debugger, |
243 | boolean *disable_predef_exp_folder, struct string_list* solspeclibs, struct string_list* sol8speclibs, | |
970ed795 EL |
244 | struct string_list* linuxspeclibs, struct string_list* freebsdspeclibs, struct string_list* win32speclibs, |
245 | char** ttcn3preprocessor, struct string_list* linkerlibs, struct string_list* additionalObjects, struct string_list* linkerlibsearchpath, boolean Vflag, boolean Dflag, | |
af710487 | 246 | boolean *Zflag, boolean *Hflag, char** generatorCommandOutput, struct string2_list* target_placement_list, boolean prefix_workdir, struct string2_list* run_command_list, |
feade998 | 247 | struct string2_list* required_configs, struct string_list** profiled_file_list, const char **search_paths, size_t n_search_paths); |
970ed795 EL |
248 | |
249 | #endif /* XPATHER_H_ */ |