1 | # (C) Copyright Toon Knapen 2001, Markus Schoepflin 2002, 2003. |
---|
2 | # |
---|
3 | # Permission to copy, use, modify, sell and distribute this software is |
---|
4 | # granted provided this copyright notice appears in all copies. This |
---|
5 | # software is provided "as is" without express or implied warranty, and |
---|
6 | # with no claim as to its suitability for any purpose. |
---|
7 | |
---|
8 | # |
---|
9 | # Jam tools information for : |
---|
10 | # IBM VisualAge C++ compiler |
---|
11 | # version 5.0 |
---|
12 | # version 6.0 |
---|
13 | # |
---|
14 | # These settings are created and tested with VisualAge running on |
---|
15 | # IBM/Aix 4.3.3.0. They should also work for VisualAge on Windows NT, |
---|
16 | # OS/2 and AS/400. |
---|
17 | |
---|
18 | # The following #// line will be used by the regression test table generation |
---|
19 | # program as the column heading for HTML tables. Must not include version number. |
---|
20 | #//<a href="http://www.ibm.com/software/awdtools/vacpp/">IBM<br>VisualAge<br>C++</a> |
---|
21 | |
---|
22 | # The default tool path is declared as empty. This looks for the tools in |
---|
23 | # the current path. You can overide this in derived toolsets. |
---|
24 | set-as-singleton VA_TOOL_PATH ; |
---|
25 | flags vacpp VA_TOOL_PATH ; |
---|
26 | VA_TOOL_PATH = "" ; |
---|
27 | |
---|
28 | # Select the compiler name according to the threading model. |
---|
29 | flags vacpp VA_C_COMPILER <threading>single : xlc ; |
---|
30 | flags vacpp VA_C_COMPILER <threading>multi : xlc_r ; |
---|
31 | flags vacpp VA_CXX_COMPILER <threading>single : xlC ; |
---|
32 | flags vacpp VA_CXX_COMPILER <threading>multi : xlC_r ; |
---|
33 | |
---|
34 | # This disables the automatic generation of separate include files for |
---|
35 | # template functions and class declarations. |
---|
36 | flags vacpp C++FLAGS : -qnotempinc ; |
---|
37 | |
---|
38 | # The following is needed to get rid of most of the annoying linker warnings |
---|
39 | # about duplicated symbols when you use templates. |
---|
40 | flags vacpp C++FLAGS : -qfuncsect ; |
---|
41 | |
---|
42 | # This tells the linker not to link unneeded object files from static |
---|
43 | # libraries. Please note that this means that a static constructor |
---|
44 | # contained in such an object file won't be invoked. |
---|
45 | flags vacpp LINKFLAGS : -qtwolink ; |
---|
46 | |
---|
47 | flags vacpp CFLAGS <optimization>off : -qNOOPTimize ; |
---|
48 | flags vacpp CFLAGS <optimization>default : -O ; |
---|
49 | flags vacpp CFLAGS <optimization>speed : -O3 -qstrict ; |
---|
50 | flags vacpp CFLAGS <optimization>space : -O2 -qcompact ; |
---|
51 | |
---|
52 | flags vacpp CFLAGS <inlining>off : -qnoinline ; |
---|
53 | flags vacpp CFLAGS <inlining>on : -qinline ; |
---|
54 | flags vacpp CFLAGS <inlining>full : -qinline ; |
---|
55 | |
---|
56 | flags vacpp C++FLAGS <exception-handling>off : -qnoeh ; |
---|
57 | flags vacpp C++FLAGS <exception-handling>on : -qeh ; |
---|
58 | |
---|
59 | flags vacpp C++FLAGS <rtti>off : -qnortti ; |
---|
60 | flags vacpp C++FLAGS <rtti>on : -qrtti ; |
---|
61 | |
---|
62 | flags vacpp LINKFLAGS <runtime-link>static : -bstatic ; |
---|
63 | # We want the full path to the sources in the debug symbols because otherwise |
---|
64 | # the debugger won't find the sources when we use boost.build. |
---|
65 | flags vacpp CFLAGS <debug-symbols>on : -g -qfullpath ; |
---|
66 | flags vacpp LINKFLAGS <debug-symbols>on : -g ; |
---|
67 | flags vacpp LINKFLAGS <debug-symbols>off : -s ; |
---|
68 | |
---|
69 | flags vacpp CFLAGS <profiling>on : -pg ; |
---|
70 | flags vacpp LINKFLAGS <profiling>on : -pg ; |
---|
71 | |
---|
72 | flags vacpp CFLAGS <cflags> ; |
---|
73 | flags vacpp C++FLAGS <cxxflags> ; |
---|
74 | flags vacpp DEFINES <define> ; |
---|
75 | flags vacpp UNDEFS <undef> ; |
---|
76 | flags vacpp HDRS <include> ; |
---|
77 | flags vacpp SYSHDRS <sysinclude> ; |
---|
78 | flags vacpp LINKFLAGS <linkflags> ; |
---|
79 | flags vacpp ARFLAGS <arflags> ; |
---|
80 | |
---|
81 | flags vacpp LIBPATH <library-path> ; |
---|
82 | flags vacpp NEEDLIBS <library-file> ; |
---|
83 | flags vacpp FINDLIBS <find-library> ; |
---|
84 | |
---|
85 | if ! $(ARFLAGS) |
---|
86 | { |
---|
87 | flags xlc ARFLAGS : "" ; |
---|
88 | } |
---|
89 | |
---|
90 | # Clear the STDHDRS variable which contains /usr/include. Vacpp does not like |
---|
91 | # that this sys directory is included (vacpp related headers are in |
---|
92 | # /usr/vacpp/include) |
---|
93 | STDHDRS = ; |
---|
94 | |
---|
95 | #### Link #### |
---|
96 | |
---|
97 | rule Link-action |
---|
98 | { |
---|
99 | if $(gTARGET_TYPE($(<))) = EXE |
---|
100 | { |
---|
101 | LINKFLAGS on $(<) += -brtl ; |
---|
102 | } |
---|
103 | if $(gTARGET_TYPE($(<))) in $(SHARED_TYPES) |
---|
104 | { |
---|
105 | LINKFLAGS on $(<) += -G ; |
---|
106 | } |
---|
107 | xlc-Link-action $(<) : $(>) ; |
---|
108 | } |
---|
109 | |
---|
110 | # for xlc, we repeat all libraries so that dependencies are always resolved |
---|
111 | actions xlc-Link-action bind NEEDLIBS |
---|
112 | { |
---|
113 | $(SHELL_SET)$(gSHELL_LIBPATH)=$(LINK_LIBPATH)$(gAPPEND_LD_LIBRARY_PATH) |
---|
114 | $(SHELL_EXPORT)$(gSHELL_LIBPATH) |
---|
115 | $(VA_CXX_COMPILER:R=$(VA_TOOL_PATH)) $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -bdynamic -l$(FINDLIBS) |
---|
116 | } |
---|
117 | |
---|
118 | #### Cc ##### |
---|
119 | |
---|
120 | rule Cc-action |
---|
121 | { |
---|
122 | xlc-Cc-action $(<) : $(>) ; |
---|
123 | } |
---|
124 | |
---|
125 | # Always allow C++ comments in C source files! |
---|
126 | actions xlc-Cc-action |
---|
127 | { |
---|
128 | $(VA_C_COMPILER:R=$(VA_TOOL_PATH)) -qcpluscmt -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" |
---|
129 | } |
---|
130 | |
---|
131 | #### C++ #### |
---|
132 | rule C++-action |
---|
133 | { |
---|
134 | xlc-C++-action $(<) : $(>) ; |
---|
135 | } |
---|
136 | |
---|
137 | actions xlc-C++-action |
---|
138 | { |
---|
139 | $(VA_CXX_COMPILER:R=$(VA_TOOL_PATH)) -c -I$(BOOST_ROOT) -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)" |
---|
140 | } |
---|
141 | |
---|
142 | #### Archive #### |
---|
143 | |
---|
144 | rule Archive-action |
---|
145 | { |
---|
146 | xlc-Archive-action $(<) : $(>) ; |
---|
147 | } |
---|
148 | |
---|
149 | actions updated together piecemeal xlc-Archive-action |
---|
150 | { |
---|
151 | ar ru$(ARFLAGS) "$(<)" "$(>)" |
---|
152 | } |
---|