fixed bug in configure
[k8jam.git] / defaults / build / Jambase.build.cpp
blob56f2cb47e00662e5de8e74d6be2663cf5369b122
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 the compiler's -o flag doesn't work, relocate the .o
14 ### if $(RELOCATE) { CcMv $(<) : $(>) ; }
16 # Just to clarify here: this sets the per-target CCFLAGS to
17 # be the current value of (global) CCFLAGS and SUBDIRCCFLAGS.
18 # CCHDRS and CCDEFS must be reformatted each time for some
19 # compiles (VMS, NT) that malign multiple -D or -I flags.
20 ktmp = $(C++FLAGS) ;
21 if ! $(ktmp) { ktmp = $(CCFLAGS) ; }
22 C++FLAGS on $(<) += $(ktmp) $(SUBDIRC++FLAGS) ;
24 ktmp = $(C++OPTIM) ;
25 if ! $(ktmp) { ktmp = $(OPTIM) ; }
26 C++OPTIM on $(<) += $(ktmp) ;
28 CCHDRS on $(<) = [ on $(<) FIncludes $(HDRS) ] ;
29 CCDEFS on $(<) = [ on $(<) FDefines $(DEFINES) ] ;
30 CCHDRS on $(<) += [ FIncludes $(SUBDIRHDRS) ] ;
31 CCDEFS on $(<) += [ FDefines $(SUBDIRDEFINES) ] ;
32 C++.standard on $(<) += $(C++.standard) ;
36 actions C++ {
37 $(C++) -c -o $(<) $(C++.standard) $(CFLAGS.all) $(C++FLAGS) $(OPTIM.all) $(C++OPTIM) $(CCDEFS) $(CCHDRS) $(>)