Package.pp 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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 OS X.
  52. #define OSX_PLATFORM $[or $[eq $[PLATFORM],Darwin],$[eq $[PLATFORM],osx]]
  53. // True if we are building on some flavor of Unix.
  54. #define UNIX_PLATFORM $[and $[not $[WINDOWS_PLATFORM]],$[not $[OSX_PLATFORM]]]
  55. // Pull in the package-level Config file. This contains a lot of
  56. // configuration variables that the user might want to fine-tune.
  57. #include $[THISDIRPREFIX]Config.pp
  58. // Also get the platform-specific config file. This defines a few
  59. // more variables that are more likely to be platform-dependent and
  60. // are less likely to be directly modified by the user.
  61. #include $[THISDIRPREFIX]Config.$[PLATFORM].pp
  62. // If the environment variable PPREMAKE_CONFIG is set, it points to a
  63. // user-customized Config.pp file, for instance in the user's home
  64. // directory. This file might redefine any of the variables defined
  65. // above.
  66. #if $[ne $[PPREMAKE_CONFIG],]
  67. #set PPREMAKE_CONFIG $[unixfilename $[PPREMAKE_CONFIG]]
  68. #print Reading $[PPREMAKE_CONFIG]
  69. #include $[PPREMAKE_CONFIG]
  70. #else
  71. #print Environment variable PPREMAKE_CONFIG not set; using defaults.
  72. #endif
  73. // Now evaluate all of our deferred variable definitions from
  74. // Config.pp.
  75. #set PYTHON_IPATH $[unixfilename $[PYTHON_IPATH]]
  76. #set PYTHON_LPATH $[unixfilename $[PYTHON_LPATH]]
  77. #set HAVE_PYTHON $[HAVE_PYTHON]
  78. #set NSPR_IPATH $[unixfilename $[NSPR_IPATH]]
  79. #set NSPR_LPATH $[unixfilename $[NSPR_LPATH]]
  80. #set NSPR_LIBS $[NSPR_LIBS]
  81. #set HAVE_NSPR $[HAVE_NSPR]
  82. #set SSL_IPATH $[unixfilename $[SSL_IPATH]]
  83. #set SSL_LPATH $[unixfilename $[SSL_LPATH]]
  84. #set SSL_LIBS $[SSL_LIBS]
  85. #set HAVE_SSL $[HAVE_SSL]
  86. #set JPEG_IPATH $[unixfilename $[JPEG_IPATH]]
  87. #set JPEG_LPATH $[unixfilename $[JPEG_LPATH]]
  88. #set JPEG_LIBS $[JPEG_LIBS]
  89. #set HAVE_JPEG $[HAVE_JPEG]
  90. #set JPEG2000_IPATH $[unixfilename $[JPEG2000_IPATH]]
  91. #set JPEG2000_LPATH $[unixfilename $[JPEG2000_LPATH]]
  92. #set JPEG2000_LIBS $[JPEG2000_LIBS]
  93. #set HAVE_JPEG2000 $[HAVE_JPEG2000]
  94. #set TIFF_IPATH $[unixfilename $[TIFF_IPATH]]
  95. #set TIFF_LPATH $[unixfilename $[TIFF_LPATH]]
  96. #set TIFF_LIBS $[TIFF_LIBS]
  97. #set HAVE_TIFF $[HAVE_TIFF]
  98. #set FFTW_IPATH $[unixfilename $[FFTW_IPATH]]
  99. #set FFTW_LPATH $[unixfilename $[FFTW_LPATH]]
  100. #set FFTW_LIBS $[FFTW_LIBS]
  101. #set HAVE_FFTW $[HAVE_FFTW]
  102. #set VRPN_IPATH $[unixfilename $[VRPN_IPATH]]
  103. #set VRPN_LPATH $[unixfilename $[VRPN_LPATH]]
  104. #set VRPN_LIBS $[VRPN_LIBS]
  105. #set HAVE_VRPN $[HAVE_VRPN]
  106. #set ZLIB_IPATH $[unixfilename $[ZLIB_IPATH]]
  107. #set ZLIB_LPATH $[unixfilename $[ZLIB_LPATH]]
  108. #set ZLIB_LIBS $[ZLIB_LIBS]
  109. #set HAVE_ZLIB $[HAVE_ZLIB]
  110. #set GL_IPATH $[unixfilename $[GL_IPATH]]
  111. #set GL_LPATH $[unixfilename $[GL_LPATH]]
  112. #set GL_LIBS $[GL_LIBS]
  113. #set HAVE_GL $[HAVE_GL]
  114. #set CHROMIUM_IPATH $[unixfilename $[CHROMIUM_IPATH]]
  115. #set CHROMIUM_LPATH $[unixfilename $[CHROMIUM_LPATH]]
  116. #set CHROMIUM_LIBS $[CHROMIUM_LIBS]
  117. #set HAVE_CHROMIUM $[HAVE_CHROMIUM]
  118. #set GLX_IPATH $[unixfilename $[GLX_IPATH]]
  119. #set GLX_LPATH $[unixfilename $[GLX_LPATH]]
  120. #set HAVE_GLX $[HAVE_GLX]
  121. #set HAVE_WGL $[HAVE_WGL]
  122. #set HAVE_SGIGL $[HAVE_SGIGL]
  123. #set DX_IPATH $[unixfilename $[DX_IPATH]]
  124. #set DX_LPATH $[unixfilename $[DX_LPATH]]
  125. #set DX_LIBS $[DX_LIBS]
  126. #set HAVE_DX $[HAVE_DX]
  127. #set HAVE_THREADS $[HAVE_THREADS]
  128. #set NET_IPATH $[unixfilename $[NET_IPATH]]
  129. #set NET_LPATH $[unixfilename $[NET_LPATH]]
  130. #set NET_LIBS $[NET_LIBS]
  131. #set HAVE_NET $[HAVE_NET]
  132. #set DO_PSTATS $[DO_PSTATS]
  133. #set RAD_MSS_IPATH $[unixfilename $[RAD_MSS_IPATH]]
  134. #set RAD_MSS_LPATH $[unixfilename $[RAD_MSS_LPATH]]
  135. #set RAD_MSS_LIBS $[RAD_MSS_LIBS]
  136. #set HAVE_RAD_MSS $[HAVE_RAD_MSS]
  137. #set FMOD_IPATH $[unixfilename $[FMOD_IPATH]]
  138. #set FMOD_LPATH $[unixfilename $[FMOD_LPATH]]
  139. #set FMOD_LIBS $[FMOD_LIBS]
  140. #set HAVE_FMOD $[HAVE_FMOD]
  141. #set CHROMIUM_IPATH $[unixfilename $[CHROMIUM_IPATH]]
  142. #set CHROMIUM_LPATH $[unixfilename $[CHROMIUM_LPATH]]
  143. #set CHROMIUM_LIBS $[CHROMIUM_LIBS]
  144. #set HAVE_CHROMIUM $[HAVE_CHROMIUM]
  145. #set GTKMM_CONFIG $[GTKMM_CONFIG]
  146. #set HAVE_GTKMM $[HAVE_GTKMM]
  147. #set FREETYPE_CONFIG $[FREETYPE_CONFIG]
  148. #set HAVE_FREETYPE $[HAVE_FREETYPE]
  149. #set FREETYPE_CFLAGS $[FREETYPE_CFLAGS]
  150. #set FREETYPE_IPATH $[unixfilename $[FREETYPE_IPATH]]
  151. #set FREETYPE_LPATH $[unixfilename $[FREETYPE_LPATH]]
  152. #set FREETYPE_LIBS $[FREETYPE_LIBS]
  153. #set MAYA_LOCATION $[unixfilename $[MAYA_LOCATION]]
  154. #set HAVE_MAYA $[HAVE_MAYA]
  155. #set SOFTIMAGE_LOCATION $[unixfilename $[SOFTIMAGE_LOCATION]]
  156. #set HAVE_SOFTIMAGE $[HAVE_SOFTIMAGE]
  157. // Now infer a few more variables based on what was defined.
  158. #if $[and $[HAVE_GTKMM],$[GTKMM_CONFIG]]
  159. #define cflags $[shell $[GTKMM_CONFIG] --cflags]
  160. #define libs $[shell $[GTKMM_CONFIG] --libs]
  161. #define GTKMM_CFLAGS $[filter-out -I%,$[cflags]]
  162. #define GTKMM_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  163. #define GTKMM_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  164. #define GTKMM_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  165. #endif
  166. #if $[and $[HAVE_FREETYPE],$[FREETYPE_CONFIG]]
  167. #define cflags $[shell $[FREETYPE_CONFIG] --cflags]
  168. #define libs $[shell $[FREETYPE_CONFIG] --libs]
  169. #define FREETYPE_CFLAGS $[filter-out -I%,$[cflags]]
  170. #define FREETYPE_IPATH $[unique $[patsubst -I%,%,$[filter -I%,$[cflags]]]]
  171. #define FREETYPE_LPATH $[unique $[patsubst -L%,%,$[filter -L%,$[libs]]]]
  172. #define FREETYPE_LIBS $[patsubst -l%,%,$[filter -l%,$[libs]]]
  173. #endif
  174. // Finally, include the system configure file.
  175. #include $[THISDIRPREFIX]pptempl/System.pp