1 #============================================================================
2 # Jam configuration and actions for Linux/Unix
3 #============================================================================
6 #----------------------------------------------------------------------------
7 # platform specific rules
9 ## ConstructApplicationTarget target : options
10 ## Constructs the application atrget name (ie. foo.exe for foo)
11 rule ConstructApplicationTarget
15 rule ConstructLibraryTarget
17 if [ IsElem shared : $(2) ] {
23 rule ConstructPluginTarget
28 # SystemLinkApplication target : objects : options
29 # do system specific actions needed for linking the application and construct
30 # correct clean targets.
31 rule SystemLinkApplication
34 CheckOptions linkerfile : $(3) : $(<) ;
36 local target = $($(<)_TARGET) ;
38 Depends $(target) : $(>) ;
40 if [ IsElem linkerfile : $(3) ]
42 RemoveLinkerInputFile $(target) ;
44 for i in $(>) { AppendLinkerInputFile $(target) : $(i) ; }
45 LinkApplicationFromFile $(target) : $(target) ;
46 RemoveLinkerInputFile $(target) ;
50 LinkApplication $(target) : $(>) ;
53 LIBS on $(target) = $(LIBS) ;
55 Clean clean : $(target) ;
56 Clean $(<)clean : $(target) ;
59 actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
61 $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
64 actions quietly RemoveLinkerInputFile
69 actions quietly together piecemeal AppendLinkerInputFile
74 actions LinkApplicationFromFile bind NEEDLIBS bind EXTRAOBJECTS
76 $(LINK) -o $(<) `cat $(>).opt` $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
77 # $(LINK) -o $(<) -Xlinker @$(>).opt $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)