b7ff65a4107c26ee4f311674a7c4e973c68823a4
[scons.git] / src / engine / SCons / Tool / cc.xml
1 <!--
2 __COPYRIGHT__
3
4 This file is processed by the bin/SConsDoc.py module.
5 See its __doc__ string for a discussion of the format.
6 -->
7 <tool name="cc">
8 <summary>
9 &cv-link-CC;
10 &cv-link-CFLAGS;
11 &cv-link-CCCOM;
12 &cv-link-SHCC;
13 &cv-link-SHCFLAGS;
14 &cv-link-SHCCCOM;
15
16 &cv-link-CPPDEFPREFIX;
17 &cv-link-CPPDEFSUFFIX;
18 &cv-link-INCPREFIX;
19 &cv-link-INCSUFFIX;
20 &cv-link-SHOBJSUFFIX;
21 <!-- &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME; -->
22
23 &cv-link-CFILESUFFIX;
24 </summary>
25 </tool>
26
27 <cvar name="CC">
28 <summary>
29 The C compiler.
30 </summary>
31 </cvar>
32
33 <cvar name="CCCOM">
34 <summary>
35 The command line used to compile a C source file to a (static) object
36 file.  Any options specified in the &cv-link-CFLAGS;, &cv-link-CCFLAGS; and
37 &cv-link-CPPFLAGS; construction variables are included on this command
38 line.
39 </summary>
40 </cvar>
41
42 <cvar name="CCCOMSTR">
43 <summary>
44 The string displayed when a C source file
45 is compiled to a (static) object file.
46 If this is not set, then &cv-link-CCCOM; (the command line) is displayed.
47
48 <example>
49 env = Environment(CCCOMSTR = "Compiling static object $TARGET")
50 </example>
51 </summary>
52 </cvar>
53
54 <cvar name="CCFLAGS">
55 <summary>
56 General options that are passed to the C and C++ compilers.
57 </summary>
58 </cvar>
59
60 <cvar name="CFLAGS">
61 <summary>
62 General options that are passed to the C compiler (C only; not C++).
63 </summary>
64 </cvar>
65
66 <cvar name="CPPFLAGS">
67 <summary>
68 User-specified C preprocessor options.
69 These will be included in any command that uses the C preprocessor,
70 including not just compilation of C and C++ source files
71 via the &cv-link-CCCOM;,
72 &cv-link-SHCCCOM;,
73 &cv-link-CXXCOM; and
74 &cv-link-SHCXXCOM; command lines,
75 but also the &cv-link-FORTRANPPCOM;,
76 &cv-link-SHFORTRANPPCOM;,
77 &cv-link-F77PPCOM; and
78 &cv-link-SHF77PPCOM; command lines
79 used to compile a Fortran source file,
80 and the &cv-link-ASPPCOM; command line
81 used to assemble an assembly language source file,
82 after first running each file through the C preprocessor.
83 Note that this variable does
84 <emphasis>not</emphasis>
85 contain
86 <option>-I</option>
87 (or similar) include search path options
88 that scons generates automatically from &cv-link-CPPPATH;.
89 See &cv-link-_CPPINCFLAGS;, below,
90 for the variable that expands to those options.
91 </summary>
92 </cvar>
93
94 <cvar name="CPPSUFFIXES">
95 <summary>
96 The list of suffixes of files that will be scanned
97 for C preprocessor implicit dependencies
98 (#include lines).
99 The default list is:
100
101 <example>
102 [".c", ".C", ".cxx", ".cpp", ".c++", ".cc",
103  ".h", ".H", ".hxx", ".hpp", ".hh",
104  ".F", ".fpp", ".FPP",
105  ".m", ".mm",
106  ".S", ".spp", ".SPP"]
107 </example>
108 </summary>
109 </cvar>
110
111 <cvar name="SHCC">
112 <summary>
113 The C compiler used for generating shared-library objects.
114 </summary>
115 </cvar>
116
117 <cvar name="SHCCCOM">
118 <summary>
119 The command line used to compile a C source file
120 to a shared-library object file.
121 Any options specified in the &cv-link-SHCFLAGS;,
122 &cv-link-SHCCFLAGS; and
123 &cv-link-CPPFLAGS; construction variables
124 are included on this command line.
125 </summary>
126 </cvar>
127
128 <cvar name="SHCCCOMSTR">
129 <summary>
130 The string displayed when a C source file
131 is compiled to a shared object file.
132 If this is not set, then &cv-link-SHCCCOM; (the command line) is displayed.
133
134 <example>
135 env = Environment(SHCCCOMSTR = "Compiling shared object $TARGET")
136 </example>
137 </summary>
138 </cvar>
139
140 <cvar name="SHCCFLAGS">
141 <summary>
142 Options that are passed to the C and C++ compilers
143 to generate shared-library objects.
144 </summary>
145 </cvar>
146
147 <cvar name="SHCFLAGS">
148 <summary>
149 Options that are passed to the C compiler (only; not C++)
150 to generate shared-library objects.
151 </summary>
152 </cvar>