Global.unix.pp 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // Global.unix.pp
  3. //
  4. // This file is read in before any of the individual Sources.pp files
  5. // are read. It defines a few global variables to assist
  6. // Template.unix.pp.
  7. //
  8. #defun get_metalibs target,complete_libs
  9. // In Windows, we need to know the complete set of metalibs that
  10. // encapsulates each of the libraries we'd be linking with normally.
  11. // In the case where a particular library is not part of a metalib,
  12. // we include the library itself.
  13. #define actual_libs
  14. #foreach lib $[complete_libs]
  15. // Only consider libraries that we're actually building.
  16. #if $[all_libs $[and $[build_directory],$[build_target]],$[lib]]
  17. #define modmeta $[module $[TARGET],$[lib]]
  18. #if $[ne $[modmeta],]
  19. #if $[ne $[modmeta],$[target]] // We don't link with ourselves.
  20. #set actual_libs $[actual_libs] $[modmeta]
  21. #endif
  22. #else
  23. #set actual_libs $[actual_libs] $[lib]
  24. #endif
  25. #endif
  26. #end lib
  27. #set actual_libs $[unique $[actual_libs]] $[patsubst %:m,%,$[filter %:m,$[OTHER_LIBS]]]
  28. $[actual_libs]
  29. #end get_metalibs
  30. #defer actual_local_libs $[get_metalibs $[TARGET],$[complete_local_libs]]