added sample rule to check gcc version
[k8jam.git] / defaults / link / Jambase.link.libs
blob0157dc6999e692b2e1966c774f18b87d9f9ba97b
1 # /LinkLibraries image : libraries ;
3 # Makes _image_ depend on _libraries_ and includes them during linking
5 # _image_ may be referenced without a suffix in this rule invocation.
6 # @LinkLibraries supplies the suffix
8 # You should only use this rule with libraries created through the
9 # @Library rule. For external libraries, use something else (XXX)
11 rule LinkLibraries {
12   # make library dependencies of target
13   # set NEEDLIBS variable used by 'actions Main'
14   local _t = [ FAppendSuffix $(<) : $(SUFEXE) ] ;
16   Depends $(_t) : $(>:S=$(SUFLIB)) ;
17   NEEDLIBS on $(_t) += $(>:S=$(SUFLIB)) ;
21 # /LinkSharedLibraries image : libraries :
23 # Same as @LinkLibraries, but to link _image_ with shared libraries
24 # generated through the @SharedLibrary rule
26 rule LinkSharedLibraries {
27   # make library dependencies of target
28   # set NEEDLIBS variable used by 'actions Main'
29   local _t   = [ FAppendSuffix $(<) : $(SUFEXE) ] ;
30   local _ext = $(SUFLIBSHR) ;
32   if $(NT) && $(JAM_TOOLSET) != MINGW {
33     # on NT, we need to link agains the import library, not the DLL itself !!
34     _ext = $(SUFLIBSHR)$(SUFLIB) ;
35   }
36   Depends $(_t) : $(>:S=$(_ext))  ;
37   NEEDLIBS on $(_t) += $(>:S=$(_ext)) ;