diff --git a/Jamfile b/Jamfile index 96e9eba..ccc4040 100644 --- a/Jamfile +++ b/Jamfile @@ -1,4 +1,4 @@ -## Haiku Generic Jamfile v1.0.1 ## +## Haiku Generic Jamfile v1.0.3 ## ## Fill in this file to specify the project being created, and the referenced ## Jamfile-engine will do all of the hard work for you. This handles both @@ -35,6 +35,9 @@ SRCS = ; # Full path or a relative path to the resource file can be used. RSRCS = ; +# Additionally specify the path of rdef files to compile and add to resources +RDEFS = ; + # Specify additional libraries to link against # There are two acceptable forms of library specifications # - if your library follows the naming pattern of: diff --git a/Jamfile-engine b/Jamfile-engine index 86c6c3f..a3a5362 100644 --- a/Jamfile-engine +++ b/Jamfile-engine @@ -1,4 +1,4 @@ -## Haiku Generic Jamfile Engine v1.0.2 +## Haiku Generic Jamfile Engine v1.0.3 ## Does all the hard work for the Generic Jamfile ## which simply defines the project parameters. ## Most of the real work is done in the Jambase @@ -6,7 +6,7 @@ ## ## Inspired by the Be Makefile Engine ## -## Supports Generic Jamfile v1.0.1 +## Supports Generic Jamfile v1.0.3 ## ## Copyright (c) 2002-2010 Ryan Leavengood ## Copyright (c) 2011 Peter Poláčik @@ -29,6 +29,19 @@ actions AddResources $(XRES) -o "$(<)" $(>) } +# Rc : ; +# Compile an rdef file into a binary resources file +rule Rc +{ + Depends $(<) : $(>) ; + LOCATE on $(<) = $(LOCATE_TARGET) ; +} + +actions Rc +{ + rc -o "$(<)" $(>) +} + # MimeSet ; # Sets the mime type of the given application to be an application. actions MimeSet @@ -237,6 +250,13 @@ rule BeMain Main $(<) : $(>) ; } + if ( $(RDEFS) ) + { + RSRCS += $(NAME).rsrc ; + + Rc $(NAME).rsrc : $(RDEFS) ; + } + if ( $(RSRCS) ) { AddResources $(<) : $(RSRCS) ;