summaryrefslogtreecommitdiff
path: root/bin/MakeProjectCreator/templates/va4icc.mpd
blob: 60c8560752e060aada212ede197cfbf7e12ff1c5 (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
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
// Configuration file to build <%if(type_is_dynamic)%><%sharedname%> shared library (aka DLL)<%endif%><%if(type_is_static)%><%staticname%> static library<%endif%><%if(type_is_binary)%><%exename%> executable<%endif%> on both Win32
// and AIX using Visual Age C++ 4 (or later)

if $__TOS_WIN__ {
        option PlatformOptions =
<%foreach(defines common_defines macros)%>
                define ("<%define%>", "1"),
<%endfor%>
<%if(type_is_dynamic)%>
<%foreach(dynamicflags)%>
                define ("<%dynamicflag%>", "1"),
<%endfor%>
<%endif%>
<%if(need_staticflags)%>
<%foreach(staticflags)%>
                define ("<%staticflag%>", "1"),
<%endfor%>
<%endif%>
                define ("_stricmp", "stricmp"),
                define ("_strnicmp", "strnicmp"),
                define ("_O_TEMPORARY", 0x08),
                define ("_O_CREAT", "O_CREAT"),
                define ("_O_TRUNC", "O_TRUNC"),
                define ("_O_EXCL", "O_EXCL"),
                define ("_INTEGRAL_MAX_BITS", 64),
                gen('check', 'bounds', 'no'),
                gen('libansi', 'yes'),
                link('typecheck', 'yes'),
                opt('level', '0'),
                report('level', 'W'),
                lang('staticinlinelinkage', 'yes'),
                file('once', 'yes')
}

if $__TOS_AIX__ {
        option PlatformOptions =
                defaults('xlC_r'),
                gen('check', 'bounds', 'no'),
                gen('libansi', 'yes'),
                link('typecheck', 'yes'),
                opt('level', 0),
                report('level', 'W'),
                lang('staticinlinelinkage', 'yes'),
                file('once', 'yes')
}

option
         PlatformOptions,
<%foreach(includes)%>
         incl(searchPath, '<%include%>'),
<%endfor%>
<%if(sharedname || staticname)%>
         link(exportAll),
<%endif%>
         link(linkwithsharedlib),
<%foreach(libpaths)%>
         link(libSearchPath, '<%libpath%>'),
<%endfor%>
         link(linkWithMultiThreadLib,yes),
         link(debug)
         {
            if $__TOS_WIN__ {
               target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%staticname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>'
               {
                       option macros(global)
                       {
<%if(sharedname || staticname)%>
                             source type(hpp) 'wchar.h'
                             source type(hpp) 'wcstr.h'
<%endif%>
<%if(header_files)%>
                             source type(hpp)
<%foreach(header_files)%>
                                              '<%header_file%>'<%fornotlast(",")%>
<%endfor%>
<%endif%>
                       }
<%if(source_files)%>
                 source type(cpp)
<%foreach(source_files)%>
                                  "<%source_file%>"<%fornotlast(",")%>
<%endfor%>
<%endif%>
<%if(type_is_static)%>
                 // Template implementation files (#pragma implementation)
<%foreach(template_files)%>
                 source type(cpp) "<%template_file%>"
<%endfor%>
<%endif%>

                       // Libraries needed during linking
                       source type (lib) "advapi32.lib"
                       source type (lib) "user32.lib"
                       source type (lib) "ws2_32.lib"
                       source type (lib) "wsock32.lib"
                       source type (lib) "mswsock.lib"
<%foreach(lit_libs)%>
                       source type (lib) "<%lit_lib%>.lib"
<%endfor%>
<%foreach(libs default_libs)%>
                       source type (lib) "<%lib%><%lib_modifier%>.lib"
<%endfor%>
               }
            }
            if $__TOS_AIX__ {
               target type ( <%if(type_is_dynamic)%>shr<%endif%><%if(type_is_static)%>lib<%endif%><%if(type_is_binary)%>exe<%endif%> ) '<%if(type_is_dynamic)%>shr.o<%endif%><%if(type_is_static)%>lib<%staticname%>.a<%endif%><%if(type_is_binary)%><%exename%><%endif%>'
               {
                       run after sources("shr.o") targets ("lib<%sharedname%>.a") "ar -r -u lib<%sharedname%>.a shr.o", "rm -rf shr.o"
                       run cleanup "rm -rf lib<%sharedname%>.a shr.o"

<%if(source_files)%>
                 source type(cpp)
<%foreach(source_files)%>
                                  "<%source_file%>"<%fornotlast(",")%>
<%endfor%>
<%endif%>
<%if(type_is_static)%>
                 // Template implementation files (#pragma implementation)
<%foreach(template_files)%>
                 source type(cpp) "<%template_file%>"
<%endfor%>
<%endif%>

                       // Libraries needed during linking
<%foreach(libs defaultlibs lit_libs)%>
                       source type (lib) "lib<%lib%>.a"
<%endfor%>

<%if(type_is_dynamic)%>
                       source type (lib) "libtli_r.a"
                       source type (lib) "libpthreads.a"
                       source type (lib) "libc_r.a"
                       source type (lib) "libdl.a"
                       // Imports
                       source type (imp) "pse.exp"
<%endif%>
               }
            }
         }