|
1 | 1 | #!gbuild
|
2 | 2 | #primaryTarget=<%primaryTarget("ppc_integrity.tgt")%>
|
3 | 3 | <%if(exename)%>
|
4 |
| - [Program] |
5 |
| - -o <%if(exeout)%><%reltop_exeout%><%else%><%reltop%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%> |
| 4 | +[Program] |
| 5 | + -o <%if(exeout)%><%exeout%><%endif%>/<%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%> |
6 | 6 | <%if(need_staticflags)%>
|
7 | 7 | -non_shared
|
8 | 8 | <%endif%>
|
9 | 9 | <%else%>
|
10 |
| -<%comment("TODO-sonndinh: If we put the sharedname branch before the staticname branch, MPC picks")%> |
11 |
| -<%comment("the sharedname branch even if we have a specific clause with ghs type in .mpc file")%> |
12 |
| -<%comment("and call mpc.pl -type ghs with that .mpc file. As a temporary fix, put staticname first.")%> |
13 |
| -<%if(staticname)%> |
14 |
| - [Library] |
15 |
| - -o <%reltop_libout%>\<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%> |
| 10 | +<%comment("sonndinh: When sharedname is defined and staticname is not set in the mpc file,")%> |
| 11 | +<%comment("the staticname takes the same value as sharedname. The opposite is also true.")%> |
| 12 | +<%comment("Because of that, we can't condition only on whether either of them is defined.")%> |
| 13 | +<%comment("This fixes that by including the template input variable need_staticflags.")%> |
| 14 | +<%if(!need_staticflags && sharedname)%> |
| 15 | +[Shared Object] |
| 16 | + -o <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%> |
16 | 17 | <%else%>
|
17 |
| -<%if(sharedname)%> |
18 |
| - [Shared Object] |
19 |
| - -o <%if(dllout)%><%reltop_dllout%><%else%><%reltop_libout%><%endif%>/<%lib_prefix%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".so")%> |
| 18 | +<%if(need_staticflags && staticname)%> |
| 19 | +[Library] |
| 20 | + -o <%libout%>/<%lib_prefix%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%libext(".a")%> |
20 | 21 | <%else%>
|
21 |
| - [Subproject] |
| 22 | +[Subproject] |
22 | 23 | <%endif%>
|
23 | 24 | <%endif%>
|
24 | 25 | <%endif%>
|
|
43 | 44 | -D<%pch_define%>
|
44 | 45 | <%endfor%>
|
45 | 46 | <%endif%>
|
46 |
| -<%foreach(reltop_includes)%> |
47 |
| - -I<%reltop_include%> |
| 47 | +<%foreach(includes)%> |
| 48 | + -I<%include%> |
48 | 49 | <%endfor%>
|
49 |
| -<%foreach(reltop_libpaths)%> |
50 |
| - -L<%reltop_libpath%> |
| 50 | +<%foreach(libpaths)%> |
| 51 | + -L<%libpath%> |
51 | 52 | <%endfor%>
|
52 | 53 | <%if(libs || lit_libs || pure_libs)%>
|
53 | 54 | <%if(exename || sharedname)%>
|
|
0 commit comments