1 #============================================================================
2 # Jam configuration and actions for Win32
3 #============================================================================
6 #----------------------------------------------------------------------------
8 # Unfortunately we can't simply specify resources on the source list, because
9 # Mingw/Cygwin have the limitation that they can only link 1 resource file
10 # in. So we have to concatenate all resourcefiles here before compiling them.
12 actions together CompileResources
14 cat $(>) | $(WINDRES) $(WINDRES_FLAGS) --include-dir=$(>:D) -o $(<)
24 local target = $($(<)_TARGET) ;
25 local rcobject = [ LocateTarget _resource.o ] ;
27 # only add 1 resource object per target
28 if ! $($(<)_HASWIN32RESOURCE)
30 $(<)_HASWIN32RESOURCE = yes ;
31 ExtraObjects $(<) : $(rcobject) ;
34 CompileResources $(rcobject) : $(>) ;
37 #----------------------------------------------------------------------------
40 ## ConstructApplicationTarget target : options
41 ## Constructs the application atrget name (ie. foo.exe for foo)
42 rule ConstructApplicationTarget
46 rule ConstructLibraryTarget
50 rule ConstructPluginTarget
55 # SystemLinkApplication target : objects : options
56 rule SystemLinkApplication
58 local target = $($(<)_TARGET) ;
60 Depends $(target) : $(>) ;
62 if [ IsElem linkerfile : $(3) ]
64 RemoveLinkerInputFile $(target) ;
66 for i in $(>) { AppendLinkerInputFile $(target) : $(i) ; }
67 LinkApplicationFromFile $(target) : $(target) ;
68 RemoveLinkerInputFile $(target) ;
72 LinkApplication $(target) : $(>) ;
75 LIBS on $(target) = $(LIBS) ;
77 Clean clean : $(target) ;
78 Clean $(<)clean : $(target) ;
81 actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
83 $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
86 actions quietly RemoveLinkerInputFile
91 actions quietly together piecemeal AppendLinkerInputFile
96 actions LinkApplicationFromFile bind NEEDLIBS bind EXTRAOBJECTS
98 $(LINK) -o $(<) `cat $(>).opt` $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)
99 # $(LINK) -o $(<) -Xlinker @$(>).opt $(EXTRAOBJECTS) $(NEEDLIBS) $(LIBS)