mkjambase now can process '. file' includes; default monolithic Jambase separated...
[k8jam.git] / defaults / Jambase.build.c
blob39ec873319d0bf702a7c836fc0f69aa237f33351
1 # /Cc object : source ;
3 # Compile the file source into object, using the C compiler $(CC), its
4 # flags $(CCFLAGS) and $(OPTIM), and the header file directories $(HDRS).
5 # Called by the @Object rule
7 # Do not call this rule directly, since _object_ and _source_ may have
8 # have platform-specific file extensions
10 rule Cc {
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 CCFLAGS on $(<) += $(CCFLAGS) $(SUBDIRCCFLAGS) ;
21 CCHDRS on $(<) = [ on $(<) FIncludes $(HDRS) ] ;
22 CCDEFS on $(<) = [ on $(<) FDefines $(DEFINES) ] ;
26 actions Cc {
27 $(CC) -c -o $(<) $(CFLAGS.all) $(CCFLAGS) $(OPTIM.all) $(OPTIM) $(CCDEFS) $(CCHDRS) $(>)