Package.pp 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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],1.11]
  16. #error You need at least ppremake version 1.11 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 we 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. #set DTOOL $[unixfilename $[DTOOL]]
  35. #define DTOOL_INSTALL $[DTOOL]
  36. #define DTOOL_INSTALL_OTHER $(DTOOL)
  37. #if $[eq $[DTOOL],]
  38. #error You seem to be attached to some trees, but not DTOOL!
  39. #endif
  40. #else
  41. // Otherwise, if we are not attached, install in the standard place
  42. // (unless the user specifies otherwise).
  43. #defer DTOOL_INSTALL $[unixfilename $[INSTALL_DIR]]
  44. #defer DTOOL_INSTALL_OTHER $[unixfilename $[INSTALL_DIR]]
  45. #endif
  46. // These variables tell ppremake how to interpret the contents of the
  47. // PLATFORM variable, and help it to control the effects of functions
  48. // like $[os] and $[isfullpath].
  49. // True if we are building on some flavor of Windows.
  50. #define WINDOWS_PLATFORM $[or $[eq $[PLATFORM],Win32],$[eq $[PLATFORM],Cygwin]]
  51. // True if we are building on some flavor of Unix.
  52. #define UNIX_PLATFORM $[not $[WINDOWS_PLATFORM]]
  53. // Pull in the package-level Config file. This contains a lot of
  54. // configuration variables that the user might want to fine-tune.
  55. #include $[THISDIRPREFIX]Config.pp
  56. // Also get the platform-specific config file. This defines a few
  57. // more variables that are more likely to be platform-dependent and
  58. // are less likely to be directly modified by the user.
  59. #include $[THISDIRPREFIX]Config.$[PLATFORM].pp
  60. // If the environment variable PPREMAKE_CONFIG is set, it points to a
  61. // user-customized Config.pp file, for instance in the user's home
  62. // directory. This file might redefine any of the variables defined
  63. // above.
  64. #if $[ne $[PPREMAKE_CONFIG],]
  65. #set PPREMAKE_CONFIG $[unixfilename $[PPREMAKE_CONFIG]]
  66. #print Reading $[PPREMAKE_CONFIG]
  67. #include $[PPREMAKE_CONFIG]
  68. #else
  69. #print Environment variable PPREMAKE_CONFIG not set; using defaults.
  70. #endif
  71. // Now evaluate all of our deferred variable definitions from
  72. // Config.pp.
  73. #set PYTHON_IPATH $[unixfilename $[PYTHON_IPATH]]
  74. #set PYTHON_LPATH $[unixfilename $[PYTHON_LPATH]]
  75. #set HAVE_PYTHON $[HAVE_PYTHON]
  76. #set NSPR_IPATH $[unixfilename $[NSPR_IPATH]]
  77. #set NSPR_LPATH $[unixfilename $[NSPR_LPATH]]
  78. #set NSPR_LIBS $[NSPR_LIBS]
  79. #set HAVE_NSPR $[HAVE_NSPR]
  80. #set CRYPTO_IPATH $[unixfilename $[CRYPTO_IPATH]]
  81. #set CRYPTO_LPATH $[unixfilename $[CRYPTO_LPATH]]
  82. #set CRYPTO_LIBS $[CRYPTO_LIBS]
  83. #set HAVE_CRYPTO $[HAVE_CRYPTO]
  84. #set JPEG_IPATH $[unixfilename $[JPEG_IPATH]]
  85. #set JPEG_LPATH $[unixfilename $[JPEG_LPATH]]
  86. #set JPEG_LIBS $[JPEG_LIBS]
  87. #set HAVE_JPEG $[HAVE_JPEG]
  88. #set JPEG2000_IPATH $[unixfilename $[JPEG2000_IPATH]]
  89. #set JPEG2000_LPATH $[unixfilename $[JPEG2000_LPATH]]
  90. #set JPEG2000_LIBS $[JPEG2000_LIBS]
  91. #set HAVE_JPEG2000 $[HAVE_JPEG2000]
  92. #set TIFF_IPATH $[unixfilename $[TIFF_IPATH]]
  93. #set TIFF_LPATH $[unixfilename $[TIFF_LPATH]]
  94. #set TIFF_LIBS $[TIFF_LIBS]
  95. #set HAVE_TIFF $[HAVE_TIFF]
  96. #set FFTW_IPATH $[unixfilename $[FFTW_IPATH]]
  97. #set FFTW_LPATH $[unixfilename $[FFTW_LPATH]]
  98. #set FFTW_LIBS $[FFTW_LIBS]
  99. #set HAVE_FFTW $[HAVE_FFTW]
  100. #set VRPN_IPATH $[unixfilename $[VRPN_IPATH]]
  101. #set VRPN_LPATH $[unixfilename $[VRPN_LPATH]]
  102. #set VRPN_LIBS $[VRPN_LIBS]
  103. #set HAVE_VRPN $[HAVE_VRPN]
  104. #set ZLIB_IPATH $[unixfilename $[ZLIB_IPATH]]
  105. #set ZLIB_LPATH $[unixfilename $[ZLIB_LPATH]]
  106. #set ZLIB_LIBS $[ZLIB_LIBS]
  107. #set HAVE_ZLIB $[HAVE_ZLIB]
  108. #set SOXST_IPATH $[unixfilename $[SOXST_IPATH]]
  109. #set SOXST_LPATH $[unixfilename $[SOXST_LPATH]]
  110. #set SOXST_LIBS $[SOXST_LIBS]
  111. #set HAVE_SOXST $[HAVE_SOXST]
  112. #set GL_IPATH $[unixfilename $[GL_IPATH]]
  113. #set GL_LPATH $[unixfilename $[GL_LPATH]]
  114. #set GL_LIBS $[GL_LIBS]
  115. #set HAVE_GL $[HAVE_GL]
  116. #set CHROMIUM_IPATH $[unixfilename $[CHROMIUM_IPATH]]
  117. #set CHROMIUM_LPATH $[unixfilename $[CHROMIUM_LPATH]]
  118. #set CHROMIUM_LIBS $[CHROMIUM_LIBS]
  119. #set HAVE_CHROMIUM $[HAVE_CHROMIUM]
  120. #set GLX_IPATH $[unixfilename $[GLX_IPATH]]
  121. #set GLX_LPATH $[unixfilename $[GLX_LPATH]]
  122. #set HAVE_GLX $[HAVE_GLX]
  123. #set GLUT_IPATH $[unixfilename $[GLUT_IPATH]]
  124. #set GLUT_LPATH $[unixfilename $[GLUT_LPATH]]
  125. #set GLUT_LIBS $[GLUT_LIBS]
  126. #set HAVE_GLUT $[HAVE_GLUT]
  127. #set HAVE_WGL $[HAVE_WGL]
  128. #set HAVE_SGIGL $[HAVE_SGIGL]
  129. #set DX_IPATH $[unixfilename $[DX_IPATH]]
  130. #set DX_LPATH $[unixfilename $[DX_LPATH]]
  131. #set DX_LIBS $[DX_LIBS]
  132. #set HAVE_DX $[HAVE_DX]
  133. #set HAVE_RIB $[HAVE_RIB]
  134. #set MIKMOD_CONFIG $[MIKMOD_CONFIG]
  135. #set HAVE_MIKMOD $[HAVE_MIKMOD]
  136. #set IPC_IPATH $[unixfilename $[IPC_IPATH]]
  137. #set IPC_LPATH $[unixfilename $[IPC_LPATH]]
  138. #set IPC_LIBS $[IPC_LIBS]
  139. #set HAVE_IPC $[HAVE_IPC]
  140. #set NET_IPATH $[unixfilename $[NET_IPATH]]
  141. #set NET_LPATH $[unixfilename $[NET_LPATH]]
  142. #set NET_LIBS $[NET_LIBS]
  143. #set HAVE_NET $[HAVE_NET]
  144. #set DO_PSTATS $[DO_PSTATS]
  145. #set RAD_MSS_IPATH $[unixfilename $[RAD_MSS_IPATH]]
  146. #set RAD_MSS_LPATH $[unixfilename $[RAD_MSS_LPATH]]
  147. #set RAD_MSS_LIBS $[RAD_MSS_LIBS]
  148. #set HAVE_RAD_MSS $[HAVE_RAD_MSS]
  149. #set CHROMIUM_IPATH $[unixfilename $[CHROMIUM_IPATH]]
  150. #set CHROMIUM_LPATH $[unixfilename $[CHROMIUM_LPATH]]
  151. #set CHROMIUM_LIBS $[CHROMIUM_LIBS]
  152. #set HAVE_CHROMIUM $[HAVE_CHROMIUM]
  153. #set GTKMM_CONFIG $[GTKMM_CONFIG]
  154. #set HAVE_GTKMM $[HAVE_GTKMM]
  155. #set FREETYPE_CONFIG $[FREETYPE_CONFIG]
  156. #set HAVE_FREETYPE $[HAVE_FREETYPE]
  157. #set FREETYPE_CFLAGS $[FREETYPE_CFLAGS]
  158. #set FREETYPE_IPATH $[unixfilename $[FREETYPE_IPATH]]
  159. #set FREETYPE_LPATH $[unixfilename $[FREETYPE_LPATH]]
  160. #set FREETYPE_LIBS $[FREETYPE_LIBS]
  161. #set MAYA_LOCATION $[unixfilename $[MAYA_LOCATION]]
  162. #set HAVE_MAYA $[HAVE_MAYA]
  163. // Now infer a few more variables based on what was defined.
  164. #if $[and $[HAVE_MIKMOD],$[MIKMOD_CONFIG]]
  165. #define cflags $[shell $[MIKMOD_CONFIG] --cflags]
  166. #define libs $[shell $[MIKMOD_CONFIG] --libs]
  167. #define MIKMOD_CFLAGS $[filter-out -I%,$[cflags]]
  168. #define MIKMOD_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  169. #define MIKMOD_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  170. #define MIKMOD_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  171. #endif
  172. #if $[and $[HAVE_GTKMM],$[GTKMM_CONFIG]]
  173. #define cflags $[shell $[GTKMM_CONFIG] --cflags]
  174. #define libs $[shell $[GTKMM_CONFIG] --libs]
  175. #define GTKMM_CFLAGS $[filter-out -I%,$[cflags]]
  176. #define GTKMM_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  177. #define GTKMM_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  178. #define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  179. #endif
  180. #if $[and $[HAVE_FREETYPE],$[FREETYPE_CONFIG]]
  181. #define cflags $[shell $[FREETYPE_CONFIG] --cflags]
  182. #define libs $[shell $[FREETYPE_CONFIG] --libs]
  183. #define FREETYPE_CFLAGS $[filter-out -I%,$[cflags]]
  184. #define FREETYPE_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  185. #define FREETYPE_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  186. #define FREETYPE_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  187. #endif
  188. // Finally, include the system configure file.
  189. #include $[THISDIRPREFIX]pptempl/System.pp