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 = [ DoObjectGrist _resource.o ] ;
26 LOCATE on $(rcobject) = $(LOCATE_TARGET) ;
27 SEARCH on $(rcobject) = $(LOCATE_TARGET) ;
29 # only add 1 resource object per target
30 if ! $($(<)_HASWIN32RESOURCE)
32 $(<)_HASWIN32RESOURCE = yes ;
33 ExtraObjects $(<) : $(rcobject) ;
36 CompileResources $(rcobject) : $(>) ;
39 #----------------------------------------------------------------------------
42 ## ConstructApplicationTarget target : options
43 ## Constructs the application atrget name (ie. foo.exe for foo)
44 rule ConstructApplicationTarget
48 rule ConstructLibraryTarget
52 rule ConstructPluginTarget
57 # SystemLinkApplication target : objects : options
58 rule SystemLinkApplication
60 local target = $($(<)_TARGET) ;
62 Depends $(target) : $(>) ;
63 LinkApplication $(target) : $(>) ;
65 Clean clean : $(target) ;
66 Clean $(<)clean : $(target) ;
69 actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS
71 $(LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LFLAGS)