mkjambase now can process '. file' includes; default monolithic Jambase separated...
[k8jam.git] / defaults / Jambase.build.cpp
blob46745933dc71ca704f178b8cec1b9e3b4c40c0ca
1 # /C++ object : source ;
3 # Compile the C++ source file _source_. Similar to @CC, called by @Object
5 # Do not call this rule directly, since _object_ and _source_ may have
6 # have platform-specific file extensions
8 rule C++ {
9 local ktmp ;
11 Depends $(<) : $(>) ;
13 if $(RELOCATE) { CcMv $(<) : $(>) ; }
15 # Just to clarify here: this sets the per-target CCFLAGS to
16 # be the current value of (global) CCFLAGS and SUBDIRCCFLAGS.
17 # CCHDRS and CCDEFS must be reformatted each time for some
18 # compiles (VMS, NT) that malign multiple -D or -I flags.
19 ktmp = $(C++FLAGS) ;
20 if ! $(ktmp) { ktmp = $(CCFLAGS) ; }
21 C++FLAGS on $(<) += $(ktmp) $(SUBDIRC++FLAGS) ;
23 ktmp = [ remove-std99-flags $(C++OPTIM) ] ;
24 if ! $(ktmp) { ktmp = [ remove-std99-flags $(OPTIM) ] ; }
25 C++OPTIM on $(<) += $(ktmp) ;
27 CCHDRS on $(<) = [ on $(<) FIncludes $(HDRS) ] ;
28 CCDEFS on $(<) = [ on $(<) FDefines $(DEFINES) ] ;
32 actions C++ {
33 $(C++) -c -o $(<) $(CFLAGS.all) $(C++FLAGS) $(OPTIM.all) $(C++OPTIM) $(CCDEFS) $(CCHDRS) $(>)