Package.pp 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // Package.pp
  3. //
  4. // This file defines certain configuration variables that are to be
  5. // written into the various make scripts. It is processed by ppremake
  6. // (along with the Sources.pp files in each of the various
  7. // directories) to generate build scripts appropriate to each
  8. // environment.
  9. //
  10. // This is the package-specific file, which should be at the top of
  11. // every source hierarchy. It generally gets the ball rolling, and is
  12. // responsible for explicitly including all of the relevent Config.pp
  13. // files.
  14. // Check the version of ppremake in use. This is temporary until
  15. // everyone gets up to at least 0.50. After that, the test in dtool
  16. // will suffice.
  17. #if $[not $[>= $[PPREMAKE_VERSION],0.50]]
  18. #error You need at least ppremake version 0.50 to process this tree.
  19. #endif
  20. // What is the name and version of this source tree?
  21. #if $[eq $[PACKAGE],]
  22. #define PACKAGE direct
  23. #define VERSION 0.80
  24. #endif
  25. // Where should we find the PANDA source directory?
  26. #if $[or $[CTPROJS],$[PANDA]]
  27. // If we are presently attached, use the environment variable.
  28. #define PANDA_SOURCE $[PANDA]
  29. #if $[eq $[PANDA],]
  30. #error You seem to be attached to some trees, but not PANDA!
  31. #endif
  32. #else
  33. // Otherwise, if we are not attached, we guess that the source is a
  34. // sibling directory to this source root.
  35. #define PANDA_SOURCE $[standardize $[TOPDIR]/../panda]
  36. #endif
  37. // Where should we install DIRECT?
  38. #if $[or $[CTPROJS],$[DIRECT]]
  39. #define DIRECT_INSTALL $[DIRECT]
  40. #define DIRECT_INSTALL_OTHER $(DIRECT)
  41. #if $[eq $[DIRECT],]
  42. #error You seem to be attached to some trees, but not DIRECT!
  43. #endif
  44. #else
  45. #defer DIRECT_INSTALL $[INSTALL_DIR]
  46. #defer DIRECT_INSTALL_OTHER $[INSTALL_DIR]
  47. #endif
  48. // Define the inter-tree dependencies.
  49. #define NEEDS_TREES $[NEEDS_TREES] panda
  50. // Also get the PANDA Package file and everything that includes.
  51. #if $[not $[isfile $[PANDA_SOURCE]/Package.pp]]
  52. #error PANDA source directory not found! Are you attached properly?
  53. #endif
  54. #include $[PANDA_SOURCE]/Package.pp