doc: documented DBG=1
[k8jam.git] / defaults / link / cpp / Jambase.link.cpp
blob7293b6bce876711405627237ec951fea7532ec9a
1 # /C++Link image : objects ;
3 # Links _image_ from _objects_ and sets permissions on _image_ to
4 # $(EXEMODE). _image_ must be an actual filename; suffix is not
5 # supplied.
7 # Called by @Main, shouldn't be called by most people
9 rule C++Link {
10 local ktmp ;
12 ktmp = $(C++LINKFLAGS) ;
13 if ! $(ktmp) { ktmp = $(LINKFLAGS) ; }
14 C++LINKFLAGS on $(<) += $(ktmp) ;
16 ktmp = $(C++LINKLIBS) ;
17 if ! $(ktmp) { ktmp = $(LINKLIBS) ; }
18 C++LINKLIBS on $(<) += $(ktmp) ;
20 MODE on $(<) = $(EXEMODE) ;
21 Chmod $(<) ;
25 # /C++LinkFlagsOn mains : flags ;
27 # this rule is used to add compiler flags to the compilation of
28 # specific C++ source files
30 rule C++LinkFlagsOn {
31 if ! $(C++LINKFLAGS) { C++LINKFLAGS on [ FGristFiles $(<) ] += $(LINKFLAGS) ; }
32 C++LINKFLAGS on [ FGristFiles $(<) ] += $(>) ;
36 actions C++Link bind NEEDLIBS {
37 $(C++LINK) $(LINKFLAGS.all) $(C++LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS.all) $(C++LINKLIBS)