added "C++FLAGS.all" (and "OBJCFLAGS.all"); "CFLAGS.all" is still in effect
[k8jam.git] / defaults / build / Jambase.build.cpp
blobdd9164530ee125e6edc6ca05ce62534079c2357f
1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, version 3 of the License ONLY.
5 # This program is distributed in the hope that it will be useful,
6 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 # GNU General Public License for more details.
10 # You should have received a copy of the GNU General Public License
11 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # /C++ object : source ;
15 # Compile the C++ source file _source_. Similar to @CC, called by @Object
17 # Do not call this rule directly, since _object_ and _source_ may have
18 # have platform-specific file extensions
20 rule C++ {
21 local ktmp ;
23 Depends $(<) : $(>) ;
25 # Just to clarify here: this sets the per-target CCFLAGS to
26 # be the current value of (global) CCFLAGS and SUBDIRCCFLAGS.
27 # CCHDRS and CCDEFS must be reformatted each time for some
28 # compiles (VMS, NT) that malign multiple -D or -I flags.
29 ktmp = $(C++FLAGS) ;
30 if ! $(ktmp) { ktmp = $(CCFLAGS) ; }
31 C++FLAGS on $(<) += $(ktmp) $(SUBDIRC++FLAGS) ;
33 ktmp = $(C++OPTIM) ;
34 if ! $(ktmp) { ktmp = $(OPTIM) ; }
35 C++OPTIM on $(<) += $(ktmp) ;
37 CCHDRS on $(<) = [ on $(<) FIncludes $(HDRS) ] ;
38 CCDEFS on $(<) = [ on $(<) FDefines $(DEFINES) ] ;
39 CCHDRS on $(<) += [ FIncludes $(SUBDIRHDRS) ] ;
40 CCDEFS on $(<) += [ FDefines $(SUBDIRDEFINES) ] ;
41 C++.standard on $(<) += $(C++.standard) ;
45 actions C++ {
46 $(C++) -c -o $(<) $(C++.standard) $(CFLAGS.all) $(C++FLAGS.all) $(C++FLAGS) $(OPTIM.all) $(C++OPTIM) $(CCDEFS) $(CCHDRS) $(>)