Parise implements suggestion to make $[TARGET] prefix for .obj's switchable

This commit is contained in:
Jon Parise 2003-02-11 17:34:34 +00:00 committed by David Rose
parent 3a1f42409d
commit d32efcd8c0
2 changed files with 10 additions and 1 deletions

View File

@ -80,7 +80,7 @@
// Define what the object files are. // Define what the object files are.
#foreach file $[c_sources] $[cxx_sources] $[yxx_sources] $[lxx_sources] #foreach file $[c_sources] $[cxx_sources] $[yxx_sources] $[lxx_sources]
#define $[file]_obj $[patsubst %.c %.cxx %.cpp %.yxx %.lxx,$[ODIR]/$[TARGET]_%$[OBJ],$[notdir $[file]]] #define $[file]_obj $[patsubst %.c %.cxx %.cpp %.yxx %.lxx,$[ODIR]/$[obj_prefix]%$[OBJ],$[notdir $[file]]]
#push 1 $[file]_obj #push 1 $[file]_obj
#end file #end file

View File

@ -527,6 +527,15 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set!
// platforms will leave this empty. // platforms will leave this empty.
#define dllext #define dllext
// $[obj_prefix] defines the prefix that is prepended to the name of
// the object files. It can be used to avoid potential collisions
// when a source file is used by multiple targets but with different
// compile options for each.
//
// $[obj_prefix] may be redefined by one of the Global.platform.pp
// files.
#defer obj_prefix $[TARGET]_
// Caution! interrogate_ipath might be redefined in the // Caution! interrogate_ipath might be redefined in the
// Global.platform.pp file. // Global.platform.pp file.
#defer interrogate_ipath $[target_ipath:%=-I%] #defer interrogate_ipath $[target_ipath:%=-I%]