Package.pp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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.
  15. #if $[< $[PPREMAKE_VERSION],0.50]
  16. #error You need at least ppremake version 0.50 to process this tree.
  17. #endif
  18. // What is the name and version of this source tree?
  19. #if $[eq $[PACKAGE],]
  20. #define PACKAGE dtool
  21. #define VERSION 0.80
  22. #endif
  23. // Where should install DTOOL, specifically?
  24. #if $[or $[CTPROJS],$[DTOOL]]
  25. // If we are presently attached, use the environment variable.
  26. // We define two variables: one for ourselves, which burns in the
  27. // current value of the DTOOL environment variable (so that any
  28. // attempt to install in this tree will install correctly, no
  29. // matter whether we are attached to a different DTOOL later by
  30. // mistake), and one for other trees to use, which expands to a
  31. // ordinary reference to the DTOOL environment variable, so
  32. // they will read from the right tree no matter which DTOOL they're
  33. // attached to.
  34. #define DTOOL_INSTALL $[DTOOL]
  35. #define DTOOL_INSTALL_OTHER $(DTOOL)
  36. #if $[eq $[DTOOL],]
  37. #error You seem to be attached to some trees, but not DTOOL!
  38. #endif
  39. #else
  40. // Otherwise, if we are not attached, install in the standard place
  41. // (unless the user specifies otherwise).
  42. #defer DTOOL_INSTALL $[INSTALL_DIR]
  43. #defer DTOOL_INSTALL_OTHER $[INSTALL_DIR]
  44. #endif
  45. // Pull in the package-level Config file. This contains a lot of
  46. // configuration variables that the user might want to fine-tune.
  47. #include $[THISDIRPREFIX]Config.pp
  48. // Also get the platform-specific config file. This defines a few
  49. // more variables that are more likely to be platform-dependent and
  50. // are less likely to be directly modified by the user.
  51. #include $[THISDIRPREFIX]Config.$[PLATFORM].pp
  52. // If the environment variable PPREMAKE_CONFIG is set, it points to a
  53. // user-customized Config.pp file, for instance in the user's home
  54. // directory. This file might redefine any of the variables defined
  55. // above.
  56. #if $[ne $[PPREMAKE_CONFIG],]
  57. #print Reading $[PPREMAKE_CONFIG]
  58. #include $[PPREMAKE_CONFIG]
  59. #else
  60. #print Environment variable PPREMAKE_CONFIG not set; using defaults.
  61. #endif
  62. // Now evaluate all of our deferred variable definitions from
  63. // Config.pp.
  64. #set PYTHON_IPATH $[PYTHON_IPATH]
  65. #set PYTHON_LPATH $[PYTHON_LPATH]
  66. #set HAVE_PYTHON $[HAVE_PYTHON]
  67. #set NSPR_IPATH $[NSPR_IPATH]
  68. #set NSPR_LPATH $[NSPR_LPATH]
  69. #set NSPR_LIBS $[NSPR_LIBS]
  70. #set HAVE_NSPR $[HAVE_NSPR]
  71. #set CRYPTO_IPATH $[CRYPTO_IPATH]
  72. #set CRYPTO_LPATH $[CRYPTO_LPATH]
  73. #set CRYPTO_LIBS $[CRYPTO_LIBS]
  74. #set HAVE_CRYPTO $[HAVE_CRYPTO]
  75. #set JPEG_IPATH $[JPEG_IPATH]
  76. #set JPEG_LPATH $[JPEG_LPATH]
  77. #set JPEG_LIBS $[JPEG_LIBS]
  78. #set HAVE_JPEG $[HAVE_JPEG]
  79. #set TIFF_IPATH $[TIFF_IPATH]
  80. #set TIFF_LPATH $[TIFF_LPATH]
  81. #set TIFF_LIBS $[TIFF_LIBS]
  82. #set HAVE_TIFF $[HAVE_TIFF]
  83. #set FFTW_IPATH $[FFTW_IPATH]
  84. #set FFTW_LPATH $[FFTW_LPATH]
  85. #set FFTW_LIBS $[FFTW_LIBS]
  86. #set HAVE_FFTW $[HAVE_FFTW]
  87. #set VRPN_IPATH $[VRPN_IPATH]
  88. #set VRPN_LPATH $[VRPN_LPATH]
  89. #set VRPN_LIBS $[VRPN_LIBS]
  90. #set HAVE_VRPN $[HAVE_VRPN]
  91. #set ZLIB_IPATH $[ZLIB_IPATH]
  92. #set ZLIB_LPATH $[ZLIB_LPATH]
  93. #set ZLIB_LIBS $[ZLIB_LIBS]
  94. #set HAVE_ZLIB $[HAVE_ZLIB]
  95. #set SOXST_IPATH $[SOXST_IPATH]
  96. #set SOXST_LPATH $[SOXST_LPATH]
  97. #set SOXST_LIBS $[SOXST_LIBS]
  98. #set HAVE_SOXST $[HAVE_SOXST]
  99. #set GL_IPATH $[GL_IPATH]
  100. #set GL_LPATH $[GL_LPATH]
  101. #set GL_LIBS $[GL_LIBS]
  102. #set HAVE_GL $[HAVE_GL]
  103. #set GLX_IPATH $[GLX_IPATH]
  104. #set GLX_LPATH $[GLX_LPATH]
  105. #set HAVE_GLX $[HAVE_GLX]
  106. #set GLUT_IPATH $[GLUT_IPATH]
  107. #set GLUT_LPATH $[GLUT_LPATH]
  108. #set GLUT_LIBS $[GLUT_LIBS]
  109. #set HAVE_GLUT $[HAVE_GLUT]
  110. #set HAVE_WGL $[HAVE_WGL]
  111. #set HAVE_SGIGL $[HAVE_SGIGL]
  112. #set DX_IPATH $[DX_IPATH]
  113. #set DX_LPATH $[DX_LPATH]
  114. #set DX_LIBS $[DX_LIBS]
  115. #set HAVE_DX $[HAVE_DX]
  116. #set HAVE_RIB $[HAVE_RIB]
  117. #set MIKMOD_CONFIG $[MIKMOD_CONFIG]
  118. #set HAVE_MIKMOD $[HAVE_MIKMOD]
  119. #set IPC_IPATH $[IPC_IPATH]
  120. #set IPC_LPATH $[IPC_LPATH]
  121. #set IPC_LIBS $[IPC_LIBS]
  122. #set HAVE_IPC $[HAVE_IPC]
  123. #set NET_IPATH $[NET_IPATH]
  124. #set NET_LPATH $[NET_LPATH]
  125. #set NET_LIBS $[NET_LIBS]
  126. #set HAVE_NET $[HAVE_NET]
  127. #set AUDIO_IPATH $[AUDIO_IPATH]
  128. #set AUDIO_LPATH $[AUDIO_LPATH]
  129. #set AUDIO_LIBS $[AUDIO_LIBS]
  130. #set HAVE_AUDIO $[HAVE_AUDIO]
  131. #set GTKMM_CONFIG $[GTKMM_CONFIG]
  132. #set HAVE_GTKMM $[HAVE_GTKMM]
  133. #set MAYA_LOCATION $[MAYA_LOCATION]
  134. #set HAVE_MAYA $[HAVE_MAYA]
  135. // Now infer a few more variables based on what was defined.
  136. #if $[and $[HAVE_MIKMOD],$[MIKMOD_CONFIG]]
  137. #define cflags $[shell $[MIKMOD_CONFIG] --cflags]
  138. #define libs $[shell $[MIKMOD_CONFIG] --libs]
  139. #define MIKMOD_CFLAGS $[filter-out -I%,$[cflags]]
  140. #define MIKMOD_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  141. #define MIKMOD_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  142. #define MIKMOD_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  143. #endif
  144. #if $[and $[HAVE_GTKMM],$[GTKMM_CONFIG]]
  145. #define cflags $[shell $[GTKMM_CONFIG] --cflags]
  146. #define libs $[shell $[GTKMM_CONFIG] --libs]
  147. #define GTKMM_CFLAGS $[filter-out -I%,$[cflags]]
  148. #define GTKMM_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  149. #define GTKMM_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  150. #define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  151. #endif
  152. // Finally, include the system configure file.
  153. #include $[THISDIRPREFIX]pptempl/System.pp