Config.pp 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003
  1. //
  2. // dtool/Config.pp
  3. //
  4. // This file defines certain configuration variables that are written
  5. // into the various make scripts. It is processed by ppremake (along
  6. // with the Sources.pp files in each of the various directories) to
  7. // generate build scripts appropriate to each environment.
  8. //
  9. // ppremake is capable of generating makefiles for Unix compilers such
  10. // as gcc or SGI's MipsPRO compiler, as well as for Windows
  11. // environments like Microsoft's Visual C++. It can also,
  12. // potentially, generate Microsoft Developer's Studio project files
  13. // directly, although we haven't written the scripts to do this yet.
  14. // In principle, it can be extended to generate suitable build script
  15. // files for any number of different build environments.
  16. //
  17. // All of these build scripts can be tuned for a particular
  18. // environment via this file. This is the place for the user to
  19. // specify which external packages are installed and where, or to
  20. // enable or disable certain optional features. However, it is
  21. // suggested that rather than modify this file directly, you create a
  22. // custom file in your home directory and there redefine whatever
  23. // variables are appropriate, and set the environment variable
  24. // PPREMAKE_CONFIG to refer to it. In this way, you can easily get an
  25. // updated source tree (including a new Config.pp) without risking
  26. // accidentally losing your customizations. This also avoids having
  27. // to redefine the same variables in different packages (for instance,
  28. // in dtool and in panda).
  29. //
  30. // The syntax in this file resembles some hybrid between C++
  31. // preprocessor declarations and GNU make variables. This is the same
  32. // syntax used in the various ppremake system configure files; it's
  33. // designed to be easy to use as a macro language to generate
  34. // makefiles and their ilk.
  35. //
  36. // Some of the variables below are defined using the #define command,
  37. // and others are defined using #defer. The two are very similar in
  38. // their purpose; the difference is that, if the variable definition
  39. // includes references to other variables (e.g. $[varname]), then
  40. // #define will evaluate all of the other variable references
  41. // immediately and store the resulting expansion, while #defer will
  42. // store only the variable references themselves, and expand them when
  43. // the variable is later referenced. It is very similar to the
  44. // relationship between := and = in GNU Make.
  45. // dtool/Config.pp
  46. // In general, #defer is used in this file, to allow the user to
  47. // redefine critical variables in his or her own Config.pp file.
  48. // What kind of build scripts are we generating? This selects a
  49. // suitable template file from the ppremake system files. The
  50. // allowable choices, at present, are:
  51. //
  52. // unix - Generate makefiles suitable for most Unix platforms.
  53. // msvc - Generate Visual C++ project files (still a work in progress)
  54. // nmake - Generate makefiles for Microsoft Visual C++, using
  55. // Microsoft's nmake utility.
  56. // gmsvc - Generate makefiles similar to the above, using Microsoft
  57. // Visual C++, but uses the Cygwin-supplied GNU make
  58. // instead of Microsoft nmake. This is potentially
  59. // faster if you have multiple CPU's, since it supports
  60. // distributed make. It's a tiny bit slower if you're
  61. // not taking advantage of distributed make, because of
  62. // the overhead associated with Cygwin fork() calls.
  63. #if $[eq $[PLATFORM], Win32]
  64. #define BUILD_TYPE nmake
  65. #elif $[eq $[PLATFORM], Cygwin]
  66. #define BUILD_TYPE gmsvc
  67. #elif $[eq $[PLATFORM], osx]
  68. #define BUILD_TYPE unix
  69. #else
  70. #define BUILD_TYPE unix
  71. #endif
  72. // What is the default install directory for all trees in the Panda
  73. // suite? The default value for this variable is provided by
  74. // ppremake; on Unix machines it is the value of --prefix passed in to
  75. // the configure script, and on Windows machines the default is
  76. // hardcoded in config_msvc.h to C:\Panda3d.
  77. // You may also override this for a particular tree by defining a
  78. // variable name like DTOOL_INSTALL or PANDA_INSTALL. (The
  79. // INSTALL_DIR variable will have no effect if you are using the
  80. // ctattach tools to control your attachment to the trees; but this
  81. // will be the case only if you are a member of the VR Studio.)
  82. // #define INSTALL_DIR /usr/local/panda
  83. // If you intend to use Panda only as a Python module, you may find
  84. // the following define useful (but you should put in the correct path
  85. // to site-packages within your own installed Python). This will
  86. // install the Panda libraries into the standard Python search space
  87. // so that they can be accessed as Python modules. (Also see the
  88. // PYTHON_IPATH variable, below.)
  89. // If you don't do this, you can still use Panda as a Python module,
  90. // but you must put /usr/local/panda/lib (or $INSTALL_DIR/lib) on
  91. // your PYTHONPATH.
  92. // #define INSTALL_LIB_DIR /usr/lib/python2.2/site-packages
  93. // The character used to separate components of an OS-specific
  94. // directory name depends on the platform (it is '/' on Unix, '\' on
  95. // Windows). That character selection is hardcoded into Panda and
  96. // cannot be changed here. (Note that an internal Panda filename
  97. // always uses the forward slash, '/', to separate the components of a
  98. // directory name.)
  99. // There's a different character used to separate the complete
  100. // directory names in a search path specification. On Unix, the
  101. // normal convention is ':', on Windows, it has to be ';', because the
  102. // colon is already used to mark the drive letter. This character is
  103. // selectable here. Most users won't want to change this. If
  104. // multiple characters are placed in this string, any one of them may
  105. // be used as a separator character.
  106. #define DEFAULT_PATHSEP $[if $[WINDOWS_PLATFORM],;,:]
  107. // What level of compiler optimization/debug symbols should we build?
  108. // The various optimize levels are defined as follows:
  109. //
  110. // 1 - No compiler optimizations, debug symbols, debug heap, lots of checks
  111. // 2 - Full compiler optimizations, debug symbols, debug heap, lots of checks
  112. // 3 - Full compiler optimizations, full debug symbols, fewer checks
  113. // 4 - Full optimizations, no debug symbols, and asserts removed
  114. //
  115. #define OPTIMIZE 3
  116. // Panda uses prc files for runtime configuration. There are many
  117. // compiled-in options to customize the behavior of the prc config
  118. // system; most users won't need to change any of them. Feel free to
  119. // skip over all of the PRC_* variables defined here.
  120. // The default behavior is to search for files names *.prc in the
  121. // directory specified by the PRC_DIR environment variable, and then
  122. // to search along all of the directories named by the PRC_PATH
  123. // environment variable. Either of these variables might be
  124. // undefined; if both of them are undefined, the default is to search
  125. // in the directory named here by DEFAULT_PRC_DIR.
  126. // By default, we specify the install/etc dir, which is where the
  127. // system-provided PRC files get copied to.
  128. #defer DEFAULT_PRC_DIR $[INSTALL_DIR]/etc
  129. // You can specify the names of the environment variables that are
  130. // used to specify the search location(s) for prc files at runtime.
  131. // These are space-separated lists of environment variable names.
  132. // Specify empty string for either one of these to disable the
  133. // feature. For instance, redefining PRC_DIR_ENVVARS here to
  134. // PANDA_PRC_DIR would cause the environment variable $PANDA_PRC_DIR
  135. // to be consulted at startup instead of the default value of
  136. // $PRC_DIR.
  137. #define PRC_DIR_ENVVARS PRC_DIR
  138. #define PRC_PATH_ENVVARS PRC_PATH
  139. // You can specify the name of the file(s) to search for in the above
  140. // paths to be considered a config file. This should be a
  141. // space-separated list of filename patterns. This is *.prc by
  142. // default; normally there's no reason to change this.
  143. #define PRC_PATTERNS *.prc
  144. // One unusual feature of config is the ability to execute one or more
  145. // of the files it discovers as if it were a program, and then treat
  146. // the output of this program as a prc file. If you want to use this
  147. // feature, define this variable to the filename pattern or patterns
  148. // for such executable-style config programs (e.g. *prc.exe). This
  149. // can be the same as the above if you like this sort of ambiguity; in
  150. // that case, config will execute the file if it appears to be
  151. // executable; otherwise, it will simply read it.
  152. #define PRC_EXECUTABLE_PATTERNS
  153. // If you do use the above feature, you'll need another environment
  154. // variable that specifies additional arguments to pass to the
  155. // executable programs. The default definition, given here, makes
  156. // that variable be $PRC_EXECUTABLE_ARGS. Sorry, the same arguments
  157. // must be supplied to all executables in a given runtime session.
  158. #define PRC_EXECUTABLE_ARGS_ENVVAR PRC_EXECUTABLE_ARGS
  159. // You can implement signed prc files, if you require this advanced
  160. // feature. This allows certain config variables to be set only by a
  161. // prc file that has been provided by a trusted source. To do this,
  162. // first install and compile Dtool with OpenSSL (below) and run the
  163. // program make-prc-key, and then specify here the output filename
  164. // generated by that program, and then recompile Dtool (ppremake; make
  165. // install).
  166. #define PRC_PUBLIC_KEYS_FILENAME
  167. // By default, the signed-prc feature, above, is enabled only for a
  168. // release build (OPTIMIZE = 4). In a normal development environment
  169. // (OPTIMIZE < 4), any prc file can set any config variable, whether
  170. // or not it is signed. Set this variable true (nonempty) or false
  171. // (empty) to explicitly enable or disable this feature.
  172. #defer PRC_RESPECT_TRUST_LEVEL $[= $[OPTIMIZE],4]
  173. // Similarly, the descriptions are normally saved only in a
  174. // development build, not in a release build. Set this value true to
  175. // explicitly save them anyway.
  176. #defer PRC_SAVE_DESCRIPTIONS $[< $[OPTIMIZE],4]
  177. // This is the end of the PRC variable customization section. The
  178. // remaining variables are of general interest to everyone.
  179. // NOTE: In the following, to indicate "yes" to a yes/no question,
  180. // define the variable to be a nonempty string. To indicate "no",
  181. // define the variable to be an empty string.
  182. // Many of the HAVE_* variables are defined in terms of expressions
  183. // based on the paths and library names, etc., defined above. These
  184. // are defined using the "defer" command, so that they are not
  185. // evaluated right away, giving the user an opportunity to redefine
  186. // the variables they depend on, or to redefine the HAVE_* variables
  187. // themselves (you can explicitly define a HAVE_* variable to some
  188. // nonempty string to force the package to be marked as installed).
  189. // Do you want to generate a Python-callable interrogate interface?
  190. // This is only necessary if you plan to make calls into Panda from a
  191. // program written in Python. This is done only if HAVE_PYTHON,
  192. // below, is also true.
  193. #define INTERROGATE_PYTHON_INTERFACE 1
  194. // Define this true to use the new interrogate feature to generate
  195. // Python-native objects directly, rather than requiring a separate
  196. // FFI step. This loads and runs much more quickly than the original
  197. // mechanism. Define this false (that is, empty) to use the original
  198. // interfaces.
  199. #define PYTHON_NATIVE 1
  200. // Do you want to generate a C-callable interrogate interface? This
  201. // generates an interface similar to the Python interface above, with
  202. // a C calling convention. It should be useful for most other kinds
  203. // of scripting language; the VR Studio used to use this to make calls
  204. // into Panda from Squeak. This is not presently used by any VR
  205. // Studio code.
  206. #define INTERROGATE_C_INTERFACE
  207. // Do you even want to build interrogate at all? This is the program
  208. // that reads our C++ source files and generates one of the above
  209. // interfaces. If you won't be building the interfaces, you don't
  210. // need the program.
  211. #defer HAVE_INTERROGATE $[or $[INTERROGATE_PYTHON_INTERFACE],$[INTERROGATE_C_INTERFACE]]
  212. // What additional options should be passed to interrogate when
  213. // generating either of the above two interfaces? Generally, you
  214. // probably don't want to mess with this.
  215. #define INTERROGATE_OPTIONS -fnames -string -refcount -assert
  216. // What's the name of the interrogate binary to run? The default
  217. // specified is the one that is built as part of DTOOL. If you have a
  218. // prebuilt binary standing by (for instance, one built opt4), specify
  219. // its name instead.
  220. #define INTERROGATE interrogate
  221. #define INTERROGATE_MODULE interrogate_module
  222. // Is Python installed, and should Python interfaces be generated? If
  223. // Python is installed, which directory is it in?
  224. #define PYTHON_IPATH c:\python24\include
  225. #define PYTHON_LPATH c:\python24\libs
  226. #define PYTHON_FPATH
  227. #define PYTHON_COMMAND python
  228. #defer PYTHON_DEBUG_COMMAND $[PYTHON_COMMAND]$[if $[WINDOWS_PLATFORM],_d]
  229. #define PYTHON_FRAMEWORK
  230. #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
  231. // By default, we'll assume the user only wants to run with Debug
  232. // python if he has to--that is, on Windows when building a debug build.
  233. #defer USE_DEBUG_PYTHON $[and $[< $[OPTIMIZE],3],$[WINDOWS_PLATFORM]]
  234. // Define the default set of libraries to be instrumented by
  235. // genPyCode. You may wish to add to this list to add your own
  236. // libraries, or if you want to use some of the more obscure
  237. // interfaces like libpandaegg and libpandafx.
  238. #define GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx
  239. // Normally, Python source files are copied into the INSTALL_LIB_DIR
  240. // defined above, along with the compiled C++ library objects, when
  241. // you make install. If you prefer not to copy these Python source
  242. // files, but would rather run them directly out of the source
  243. // directory (presumably so you can develop them and make changes
  244. // without having to reinstall), comment out this definition and put
  245. // your source directory on your PYTHONPATH.
  246. #define INSTALL_PYTHON_SOURCE 1
  247. // Do you want to enable the "in_interpreter" global variable? This
  248. // will enable some callbacks, particularly the MemoryUsage object, to
  249. // know whether they were called from Python code (or other high-level
  250. // show code) and react accordingly, generally for debugging
  251. // purporses. It adds a bit of runtime overhead, and isn't usually
  252. // useful unless we're building a debug tree anyway. The default is
  253. // to enable it only for optimize levels 1 and 2.
  254. #defer TRACK_IN_INTERPRETER $[<= $[OPTIMIZE], 2]
  255. // Do you want to compile in support for tracking memory usage? This
  256. // enables you to define the variable "track-memory-usage" at runtime
  257. // to help track memory leaks, and also report total memory usage on
  258. // PStats. There is some small overhead for having this ability
  259. // available, even if it is unused.
  260. #defer DO_MEMORY_USAGE $[<= $[OPTIMIZE], 3]
  261. // This option compiles in support for simulating network delay via
  262. // the min-lag and max-lag prc variables. It adds a tiny bit of
  263. // overhead even when it is not activated, so it is typically enabled
  264. // only in a development build.
  265. #defer SIMULATE_NETWORK_DELAY $[<= $[OPTIMIZE], 3]
  266. // This option compiles in support for immediate-mode OpenGL
  267. // rendering. Since this is normally useful only for researching
  268. // buggy drivers, and since there is a tiny bit of per-primitive
  269. // overhead to have this option available even if it is unused, it is
  270. // by default enabled only in a development build. This has no effect
  271. // on DirectX rendering.
  272. #define SUPPORT_IMMEDIATE_MODE $[<= $[OPTIMIZE], 3]
  273. // Do you want to compile in support for pipelining? This enables
  274. // setting and accessing multiple different copies of frame-specific
  275. // data stored in nodes, etc. This is necessary, in conjunction with
  276. // HAVE_THREADS, to implement threaded multistage rendering in Panda.
  277. // However, compiling this option in does add some additional runtime
  278. // overhead even if it is not used. By default, we enable pipelining
  279. // whenever threads are enabled, assuming that if you have threads,
  280. // you also want to use piplining. We also enable it at OPTIMIZE
  281. // level 1, since that enables additional runtime checks.
  282. #defer DO_PIPELINING $[or $[<= $[OPTIMIZE], 1],$[HAVE_THREADS]]
  283. // Do you want to use one of the alternative malloc implementations?
  284. // This is almost always a good idea on Windows, where the standard
  285. // malloc implementation appears to be pretty poor, but probably
  286. // doesn't matter much on Linux (which is likely to implement
  287. // ptmalloc2 anyway). We always define this by default on Windows; on
  288. // Linux, we define it by default only when DO_MEMORY_USAGE is enabled
  289. // (since in that case, we'll be paying the overhead for the extra
  290. // call anyway) or when HAVE_THREADS is not defined (since the
  291. // non-thread-safe dlmalloc is a tiny bit faster than the system
  292. // library).
  293. #defer ALTERNATIVE_MALLOC $[or $[WINDOWS_PLATFORM],$[DO_MEMORY_USAGE],$[not $[HAVE_THREADS]]]
  294. // Is NSPR installed, and where? This is the Netscape Portable
  295. // Runtime library, downloadable as part of the Mozilla package from
  296. // mozilla.org. It provides portable threading and networking
  297. // services to Panda. Panda should compile without it, although
  298. // without any threading or networking capabilities; eventually,
  299. // native support for these capabilities may be added for certain
  300. // platforms. See also HAVE_IPC and HAVE_NET.
  301. #define NSPR_IPATH /usr/include/nspr
  302. #define NSPR_LPATH
  303. #define NSPR_LIBS nspr4
  304. #defer HAVE_NSPR $[isfile $[NSPR_IPATH]/prtypes.h]
  305. // Is a third-party STL library installed, and where? This is only
  306. // necessary if the default include and link lines that come with the
  307. // compiler don't provide adequate STL support. At least some form of
  308. // STL is absolutely required in order to build Panda.
  309. #define STL_IPATH
  310. #define STL_LPATH
  311. #define STL_CFLAGS
  312. #define STL_LIBS
  313. // Does your STL library provide hashed associative containers like
  314. // hash_map and hash_set? Define this true if you have a nonstandard
  315. // STL library that provides these, like Visual Studio .NET's. (These
  316. // hashtable containers are not part of the C++ standard yet, but the
  317. // Dinkum STL library that VC7 ships with includes a preliminary
  318. // implementation that Panda can optionally use.) For now, we assume
  319. // you have this by default only on a Windows platform.
  320. // On second thought, it turns out that this API is still too
  321. // volatile. The interface seems to have changed with the next
  322. // version of .NET, and it didn't present any measureable performance
  323. // gain anyway. Never mind.
  324. #define HAVE_STL_HASH
  325. // Is OpenSSL installed, and where?
  326. #define OPENSSL_IPATH /usr/local/ssl/include
  327. #define OPENSSL_LPATH /usr/local/ssl/lib
  328. #define OPENSSL_LIBS ssl crypto
  329. #defer HAVE_OPENSSL $[libtest $[OPENSSL_LPATH],$[OPENSSL_LIBS]]
  330. // Define this nonempty if your version of OpenSSL is 0.9.7 or better.
  331. #define OPENSSL_097
  332. // Define this true to include the OpenSSL code to report verbose
  333. // error messages when they occur.
  334. #defer REPORT_OPENSSL_ERRORS $[< $[OPTIMIZE], 4]
  335. // Is libjpeg installed, and where?
  336. #define JPEG_IPATH
  337. #define JPEG_LPATH
  338. #define JPEG_LIBS jpeg
  339. #defer HAVE_JPEG $[libtest $[JPEG_LPATH],$[JPEG_LIBS]]
  340. // Is libpng installed, and where?
  341. #define PNG_IPATH
  342. #define PNG_LPATH
  343. #define PNG_LIBS png
  344. #defer HAVE_PNG $[libtest $[PNG_LPATH],$[PNG_LIBS]]
  345. // Is libtiff installed, and where?
  346. #define TIFF_IPATH
  347. #define TIFF_LPATH
  348. #define TIFF_LIBS tiff z
  349. #defer HAVE_TIFF $[libtest $[TIFF_LPATH],$[TIFF_LIBS]]
  350. // Is libfftw installed, and where?
  351. #define FFTW_IPATH /usr/local/include
  352. #define FFTW_LPATH /usr/local/lib
  353. #define FFTW_LIBS rfftw fftw
  354. #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]]
  355. // Is NURBS++ installed, and where?
  356. #define NURBSPP_IPATH /usr/local/include/nurbs++
  357. #define NURBSPP_LPATH /usr/local/lib
  358. #define NURBSPP_LIBS nurbsf matrixN matrixI matrix
  359. #defer HAVE_NURBSPP $[libtest $[NURBSPP_LPATH],$[NURBSPP_LIBS]]
  360. // Is Cg installed, and where?
  361. #if $[WINDOWS_PLATFORM]
  362. #define CG_IPATH
  363. #define CG_LPATH
  364. #define CG_LIBS cg.lib
  365. #else
  366. #define CG_IPATH
  367. #define CG_LPATH
  368. #define CG_LIBS Cg
  369. #endif
  370. #defer HAVE_CG $[libtest $[CG_LPATH],$[CG_LIBS]]
  371. // Is CgGL installed, and where?
  372. #defer CGGL_IPATH $[CG_IPATH]
  373. #defer CGGL_LPATH $[CG_LPATH]
  374. #define CGGL_LIBS $[if $[WINDOWS_PLATFORM],cgGL.lib,CgGL]
  375. #defer HAVE_CGGL $[and $[HAVE_CG],$[libtest $[CGGL_LPATH],$[CGGL_LIBS]]]
  376. // Is CgDX8 installed, and where?
  377. #defer CGDX8_IPATH $[CG_IPATH]
  378. #defer CGDX8_LPATH $[CG_LPATH]
  379. #define CGDX8_LIBS $[if $[WINDOWS_PLATFORM],cgD3D8.lib,CgDX8]
  380. #defer HAVE_CGDX8 $[and $[HAVE_CG],$[libtest $[CGDX8_LPATH],$[CGDX8_LIBS]]]
  381. // Is CgDX9 installed, and where?
  382. #defer CGDX9_IPATH $[CG_IPATH]
  383. #defer CGDX9_LPATH $[CG_LPATH]
  384. #define CGDX9_LIBS $[if $[WINDOWS_PLATFORM],cgD3D9.lib,CgDX9]
  385. #defer HAVE_CGDX9 $[and $[HAVE_CG],$[libtest $[CGDX9_LPATH],$[CGDX9_LIBS]]]
  386. // Is CgDX10 installed, and where?
  387. #defer CGDX10_IPATH $[CG_IPATH]
  388. #defer CGDX10_LPATH $[CG_LPATH]
  389. #define CGDX10_LIBS $[if $[WINDOWS_PLATFORM],cgD3D10.lib,CgDX10]
  390. #defer HAVE_CGDX10 $[and $[HAVE_CG],$[libtest $[CGDX10_LPATH],$[CGDX10_LIBS]]]
  391. // Is VRPN installed, and where?
  392. #define VRPN_IPATH
  393. #define VRPN_LPATH
  394. #define VRPN_LIBS
  395. #defer HAVE_VRPN $[libtest $[VRPN_LPATH],$[VRPN_LIBS]]
  396. // Is HELIX installed, and where?
  397. #define HELIX_IPATH
  398. #define HELIX_LPATH
  399. #define HELIX_LIBS
  400. #defer HAVE_HELIX $[libtest $[HELIX_LPATH],$[HELIX_LIBS]]
  401. // Is ZLIB installed, and where?
  402. #define ZLIB_IPATH
  403. #define ZLIB_LPATH
  404. #define ZLIB_LIBS z
  405. #defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
  406. // Is OpenGL installed, and where? This should include libGL as well
  407. // as libGLU, if they are in different places.
  408. #defer GL_IPATH /usr/include
  409. #defer GL_LPATH
  410. #defer GL_LIBS
  411. #defer GLU_LIBS
  412. #if $[WINDOWS_PLATFORM]
  413. #define GL_LIBS opengl32.lib
  414. #define GLU_LIBS glu32.lib
  415. #elif $[OSX_PLATFORM]
  416. #defer GL_FRAMEWORK OpenGL
  417. #else
  418. #defer GL_LPATH /usr/X11R6/lib
  419. #defer GL_LIBS GL
  420. #defer GLU_LIBS GLU
  421. #endif
  422. #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
  423. // GLU is an auxiliary library that is usually provided with OpenGL,
  424. // but is sometimes missing (e.g. the default FC5 installation).
  425. #defer HAVE_GLU $[libtest $[GL_LPATH],$[GLU_LIBS]]
  426. // Is Mesa installed separately from OpenGL? Mesa is an open-source
  427. // software-only OpenGL renderer. Panda can link with it
  428. // independently from OpenGL (and if Mesa is built statically, and/or
  429. // with -DUSE_MGL_NAMESPACE declared to rename gl* to mgl*, it can
  430. // switch between the system OpenGL implementation and the Mesa
  431. // implementation at runtime).
  432. // Also, Mesa includes some core libraries (in libOSMesa.so) that
  433. // allow totally headless rendering, handy if you want to run a
  434. // renderer as a batch service, and you don't want to insist that a
  435. // user be logged on to the desktop or otherwise deal with X11 or
  436. // Windows.
  437. // If you define HAVE_MESA here, and the appropriate paths to headers
  438. // and libraries, then Panda will build libmesadisplay, which can be
  439. // used in lieu of libpandagl or libpandadx to do rendering. However,
  440. // for most applications, you don't need to do this, since (a) if you
  441. // have hardware rendering capability, you probably don't want to use
  442. // Mesa, since it's software-only, and (b) if you don't have hardware
  443. // rendering, you can install Mesa as the system's OpenGL
  444. // implementation, so you can just use the normal libpandagl. You
  445. // only need to define HAVE_MESA if you want to run totally headless,
  446. // or if you want to be able to easily switch between Mesa and the
  447. // system OpenGL implementation at runtime. If you compiled Mesa with
  448. // USE_MGL_NAMESPACE defined, define MESA_MGL here.
  449. #define MESA_IPATH
  450. #define MESA_LPATH
  451. #define MESA_LIBS
  452. #define MESA_MGL
  453. #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]]
  454. // Is the Chromium remote-rendering library installed, and where?
  455. // This should include libcr_opengl32.
  456. #defer CHROMIUM_IPATH
  457. #defer CHROMIUM_LPATH
  458. #defer CHROMIUM_LIBS
  459. #defer HAVE_CHROMIUM $[libtest $[CHROMIUM_LPATH],$[CHROMIUM_LIBS]]
  460. // How about GLX?
  461. #define GLX_IPATH
  462. #define GLX_LPATH
  463. #defer HAVE_GLX $[and $[HAVE_GL],$[UNIX_PLATFORM]]
  464. // glXGetProcAddress() is the function used to query OpenGL extensions
  465. // under X. However, this function is itself an extension function,
  466. // leading to a chicken-and-egg problem. One approach is to compile
  467. // in a hard reference to the function, another is to pull the
  468. // function address from the dynamic runtime. Each has its share of
  469. // problems. Panda's default behavior is to pull it from the dynamic
  470. // runtime; define this to compile in a reference to the function.
  471. // This is only relevant from platforms using OpenGL under X (for
  472. // instance, Linux).
  473. #define LINK_IN_GLXGETPROCADDRESS
  474. // Should we try to build the WGL interface?
  475. #defer HAVE_WGL $[and $[HAVE_GL],$[WINDOWS_PLATFORM]]
  476. // Should we try to build the SGI-specific glxdisplay?
  477. #define HAVE_SGIGL $[eq $[PLATFORM],Irix]
  478. // Is DirectX available, and should we try to build with it?
  479. #define DX_IPATH
  480. #define DX_LPATH
  481. #define DX_LIBS d3d8.lib d3dx8.lib dxerr8.lib
  482. #defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
  483. // Is OpenCV installed, and where?
  484. #define OPENCV_IPATH /usr/local/include/opencv
  485. #define OPENCV_LPATH /usr/local/lib
  486. #define OPENCV_LIBS $[if $[WINDOWS_PLATFORM],cv.lib highgui.lib cxcore.lib,cv highgui cxcore]
  487. #defer HAVE_OPENCV $[libtest $[OPENCV_LPATH],$[OPENCV_LIBS]]
  488. // Is FFMPEG installed, and where?
  489. #define FFMPEG_IPATH /usr/include/ffmpeg
  490. #define FFMPEG_LPATH
  491. #define FFMPEG_LIBS $[if $[WINDOWS_PLATFORM],libavcodec.lib libavformat.lib libavutil.lib libgcc.lib,avcodec avformat avutil]
  492. #defer HAVE_FFMPEG $[libtest $[FFMPEG_LPATH],$[FFMPEG_LIBS]]
  493. // Do you want to build the DirectD tools for starting Panda clients
  494. // remotely? This only affects the direct tree. Enabling this may
  495. // cause libdirect.dll to fail to load on Win98 clients.
  496. #define HAVE_DIRECTD
  497. // If your system supports the Posix threads interface
  498. // (pthread_create(), etc.), define this true.
  499. #define HAVE_POSIX_THREADS $[and $[isfile /usr/include/pthread.h],$[not $[WINDOWS_PLATFORM]]]
  500. // If you're building for an i386 Linux machine, kernel version 2.6 or
  501. // higher, and you want to use native Linux threading operations
  502. // instead of Posix threads, define this. Warning: this is highly
  503. // experimental code, is likely to crash, and will probably be removed
  504. // in the future. Use Posix threads instead; they're much better.
  505. #define HAVE_LINUX_NATIVE_THREADS
  506. // Do you want to build in support for threading (multiprocessing)?
  507. // Building in support for threading will enable Panda to take
  508. // advantage of multiple CPU's if you have them (and if the OS
  509. // supports kernel threads running on different CPU's), but it will
  510. // slightly slow down Panda for the single CPU case, so this is not
  511. // enabled by default.
  512. // You should only turn this on if you have some threading library
  513. // available (most people will have one). Windows has one built-in.
  514. // Linux uses Posix threads, which most Linuxes provide.
  515. // Alternatively, the NSPR library also provides a threading interface
  516. // that Panda can use.
  517. #define HAVE_THREADS
  518. // Whether threading is defined or not, you might want to validate the
  519. // thread and synchronization operations. With threading enabled,
  520. // defining this will also enable deadlock detection and logging.
  521. // Without threading enabled, defining this will simply verify that a
  522. // mutex is not recursively locked. There is, of course, additional
  523. // run-time overhead for these tests.
  524. #defer DEBUG_THREADS $[<= $[OPTIMIZE], 2]
  525. // Define this true to implement mutexes and condition variables via
  526. // user-space spinlocks, instead of via OS-provided constructs. This
  527. // is almost never a good idea, except possibly in very specialized
  528. // cases when you are building Panda for a particular application, on
  529. // a particular platform, and you are sure you won't have more threads
  530. // than CPU's. Even then, OS-based locking is probably better.
  531. #define MUTEX_SPINLOCK
  532. // Do you want to build the network interface? What additional libraries
  533. // are required? Currently, this requires NSPR.
  534. #define NET_IPATH
  535. #define NET_LPATH
  536. #if $[WINDOWS_PLATFORM]
  537. #define NET_LIBS wsock32.lib
  538. #else
  539. #define NET_LIBS
  540. #endif
  541. #defer HAVE_NET $[HAVE_NSPR]
  542. // Do you want to build the PStats interface, for graphical run-time
  543. // performance statistics? This requires NET to be available. By
  544. // default, we don't build PStats when OPTIMIZE = 4, although this is
  545. // possible.
  546. #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]]
  547. // Do you want to type-check downcasts? This is a good idea during
  548. // development, but does impose some run-time overhead.
  549. #defer DO_DCAST $[< $[OPTIMIZE], 4]
  550. // Do you want to build the debugging tools for recording and
  551. // visualizing intersection tests by the collision system? Enabling
  552. // this increases runtime collision overhead just a tiny bit.
  553. #defer DO_COLLISION_RECORDING $[< $[OPTIMIZE], 4]
  554. // Do you want to include the "debug" and "spam" Notify messages?
  555. // Normally, these are stripped out when we build with OPTIMIZE = 4, but
  556. // sometimes it's useful to keep them around. Redefine this in your
  557. // own Config.pp to achieve that.
  558. #defer NOTIFY_DEBUG $[< $[OPTIMIZE], 4]
  559. // Do you want to build the audio interface?
  560. #define HAVE_AUDIO 1
  561. // The Tau profiler provides a multiplatform, thread-aware profiler.
  562. // To use it, define USE_TAU to 1, and set TAU_MAKEFILE to the
  563. // filename that contains the Tau-provided Makefile for your platform.
  564. // Then rebuild the code with ppremake; make install. Alternatively,
  565. // instead of setting TAU_MAKEFILE, you can also define TAU_ROOT and
  566. // PDT_ROOT, to point to the root directory of the tau and pdtoolkit
  567. // installations, respectively; then the individual Tau components
  568. // will be invoked directly. This is especially useful on Windows,
  569. // where there is no Tau Makefile.
  570. #define TAU_MAKEFILE
  571. #define TAU_ROOT
  572. #define PDT_ROOT
  573. #define TAU_OPTS -optKeepFiles
  574. #define TAU_CFLAGS -D_GNU_SOURCE
  575. #define USE_TAU
  576. // Info for the RAD game tools, Miles Sound System
  577. // note this may be overwritten in wintools Config.pp
  578. #define RAD_MSS_IPATH /usr/include/Miles6/include
  579. #define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
  580. #define RAD_MSS_LIBS Mss32
  581. #defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
  582. // Info for the Fmod audio engine
  583. // note this may be overwritten in wintools Config.pp
  584. #define FMOD_IPATH
  585. #define FMOD_LPATH
  586. #define FMOD_LIBS fmod
  587. #defer HAVE_FMOD $[libtest $[FMOD_LPATH],$[FMOD_LIBS]]
  588. // Info for http://www.sourceforge.net/projects/chromium
  589. // note this may be overwritten in wintools Config.pp
  590. #define CHROMIUM_IPATH /usr/include/chromium/include
  591. #define CHROMIUM_LPATH /usr/lib/chromium/bin/WINT_NT
  592. #define CHROMIUM_LIBS spuload
  593. #defer HAVE_CHROMIUM $[libtest $[CHROMIUM_LPATH],$[CHROMIUM_LIBS]]
  594. // Is gtk+-2 installed? This is only needed to build the pstats
  595. // program on Unix (or non-Windows) platforms.
  596. #define PKG_CONFIG pkg-config
  597. #define HAVE_GTK
  598. // Do we have Freetype 2.0 (or better)? If available, this package is
  599. // used to generate dynamic in-the-world text from font files.
  600. // On Unix, freetype comes with the freetype-config executable, which
  601. // tells us where to look for the various files. On Windows, we need to
  602. // supply this information explicitly.
  603. #defer FREETYPE_CONFIG $[if $[not $[WINDOWS_PLATFORM]],freetype-config]
  604. #defer HAVE_FREETYPE $[or $[libtest $[FREETYPE_LPATH],$[FREETYPE_LIBS]],$[bintest $[FREETYPE_CONFIG]]]
  605. #define FREETYPE_CFLAGS
  606. #define FREETYPE_IPATH
  607. #define FREETYPE_LPATH
  608. #define FREETYPE_LIBS
  609. // Define this true to compile in a default font, so every TextNode
  610. // will always have a font available without requiring the user to
  611. // specify one. Define it empty not to do this, saving a few
  612. // kilobytes on the generated library. Sorry, you can't pick a
  613. // particular font to be the default; it's hardcoded in the source
  614. // (although you can use the text-default-font prc variable to specify
  615. // a particular font file to load as the default, overriding the
  616. // compiled-in font).
  617. #define COMPILE_IN_DEFAULT_FONT 1
  618. // Is Maya installed? This matters only to programs in PANDATOOL.
  619. // Also, as of Maya 5.0 it seems the Maya library will not compile
  620. // properly with optimize level 4 set (we get link errors with ostream).
  621. #define MAYA_LOCATION /usr/aw/maya
  622. #defer MAYA_LIBS $[if $[WINDOWS_PLATFORM],Foundation.lib OpenMaya.lib OpenMayaAnim.lib OpenMayaUI.lib,Foundation OpenMaya OpenMayaAnim OpenMayaUI]
  623. // Optionally define this to the value of LM_LICENSE_FILE that should
  624. // be set before invoking Maya.
  625. #define MAYA_LICENSE_FILE
  626. #defer HAVE_MAYA $[and $[<= $[OPTIMIZE], 3],$[isdir $[MAYA_LOCATION]/include/maya]]
  627. // Define this if your version of Maya is earlier than 5.0 (e.g. Maya 4.5).
  628. #define MAYA_PRE_5_0
  629. // In the same fashion as mayaegg converter above, set softimage to egg converter as well
  630. #define SOFTIMAGE_LOCATION /c/Softimage/sdk_18sp2/SDK_1.8SP2/SAAPHIRE
  631. #defer SOFTIMAGE_LIBS SAA.lib
  632. #defer HAVE_SOFTIMAGE $[isdir $[SOFTIMAGE_LOCATION]/h]
  633. // Define this to generate static libraries and executables, rather than
  634. // dynamic libraries.
  635. //#define LINK_ALL_STATIC yes
  636. // Define this to export the templates from the DLL. This is only
  637. // meaningful if LINK_ALL_STATIC is not defined, and we are building
  638. // on Windows. Some Windows compilers may not support this syntax.
  639. #defer EXPORT_TEMPLATES yes
  640. // Define this to explicitly link in the various external drivers, which
  641. // are normally separate, as part of the Panda library.
  642. //#define LINK_IN_GL yes
  643. //#define LINK_IN_DX yes
  644. //#define LINK_IN_EGG yes
  645. //#define LINK_IN_PHYSICS yes
  646. // Define USE_COMPILER to switch the particular compiler that should
  647. // be used. A handful of tokens are recognized, depending on BUILD_TYPE.
  648. // This may also be further customized within Global.$[BUILD_TYPE].pp.
  649. // If BUILD_TYPE is "unix", this may be one of:
  650. // GCC (gcc/g++)
  651. // MIPS (Irix MIPSPro compiler)
  652. //
  653. // If BUILD_TYPE is "msvc" or "gmsvc", this may be one of:
  654. // MSVC (Microsoft Visual C++ 6.0)
  655. // MSVC7 (Microsoft Visual C++ 7.0)
  656. // BOUNDS (BoundsChecker)
  657. // INTEL (Intel C/C++ compiler)
  658. #if $[WINDOWS_PLATFORM]
  659. #if $[eq $[USE_COMPILER],]
  660. #define USE_COMPILER MSVC7
  661. #endif
  662. #elif $[eq $[PLATFORM], Irix]
  663. #define USE_COMPILER MIPS
  664. #elif $[eq $[PLATFORM], Linux]
  665. #define USE_COMPILER GCC
  666. #elif $[eq $[PLATFORM], osx]
  667. #define USE_COMPILER GCC
  668. #elif $[eq $[PLATFORM], FreeBSD]
  669. #define USE_COMPILER GCC
  670. #endif
  671. // Permission masks to install data and executable files,
  672. // respectively. This is only meaningful for Unix systems.
  673. #define INSTALL_UMASK_DATA 644
  674. #define INSTALL_UMASK_PROG 755
  675. // How to invoke bison and flex. Panda takes advantage of some
  676. // bison/flex features, and therefore specifically requires bison and
  677. // flex, not some other versions of yacc and lex. However, you only
  678. // need to have these programs if you need to make changes to the
  679. // bison or flex sources (see the next point, below).
  680. #defer BISON bison
  681. #defer FLEX flex
  682. // You may not even have bison and flex installed. If you don't, no
  683. // sweat; Panda ships with the pre-generated output of these programs,
  684. // so you don't need them unless you want to make changes to the
  685. // grammars themselves (files named *.yxx or *.lxx).
  686. #defer HAVE_BISON $[bintest $[BISON]]
  687. // How to invoke sed. A handful of make rules use this. Since some
  688. // platforms (specifically, non-Unix platforms like Windows) don't
  689. // have any kind of sed, ppremake performs some limited sed-like
  690. // functions. The default is to use ppremake in this capacity. In
  691. // this variable, $[source] is the name of the file to read, $[target]
  692. // is the name of the file to generate, and $[script] is the one-line
  693. // sed script to run.
  694. #defer SED ppremake -s "$[script]" <$[source] >$[target]
  695. // What directory name (within each source directory) should the .o
  696. // (or .obj) files be written to? This can be any name, and it can be
  697. // used to differentiate different builds within the same tree.
  698. // However, don't define this to be '.', or you will be very sad the
  699. // next time you run 'make clean'.
  700. //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
  701. // ODIR_SUFFIX is optional, usually empty
  702. #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[ODIR_SUFFIX]
  703. // What is the normal extension of a compiled object file?
  704. #if $[WINDOWS_PLATFORM]
  705. #define OBJ .obj
  706. #else
  707. #define OBJ .o
  708. #endif
  709. ///////////////////////////////////////////////////////////////////////
  710. // The following variables are only meaningful when BUILD_TYPE is
  711. // "unix". These define the commands to invoke the compiler, linker,
  712. // etc.
  713. //////////////////////////////////////////////////////////////////////
  714. // How to invoke the C and C++ compilers.
  715. #if $[eq $[USE_COMPILER], GCC]
  716. #define CC gcc
  717. #define CXX g++
  718. // gcc might run into template limits on some parts of Panda.
  719. // I upped this from 25 to build on OS X (GCC 3.3) -- skyler.
  720. #define C++FLAGS_GEN -ftemplate-depth-30
  721. #else
  722. #define CC cc
  723. #define CXX CC
  724. #endif
  725. // How to compile a C or C++ file into a .o file. $[target] is the
  726. // name of the .o file, $[source] is the name of the source file,
  727. // $[ipath] is a space-separated list of directories to search for
  728. // include files, and $[flags] is a list of additional flags to pass
  729. // to the compiler.
  730. #defer COMPILE_C $[CC] $[CFLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  731. #defer COMPILE_C++ $[CXX] $[C++FLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  732. // What flags should be passed to both C and C++ compilers to enable
  733. // compiler optimizations? This will be supplied when OPTIMIZE
  734. // (above) is set to 2, 3, or 4.
  735. #defer OPTFLAGS -O2
  736. // What define variables should be passed to the compilers for each
  737. // value of OPTIMIZE? We separate this so we can pass these same
  738. // options to interrogate, guaranteeing that the correct interfaces
  739. // are generated. Do not include -D here; that will be supplied
  740. // automatically.
  741. #defer CDEFINES_OPT1 _DEBUG $[EXTRA_CDEFS]
  742. #defer CDEFINES_OPT2 _DEBUG $[EXTRA_CDEFS]
  743. #defer CDEFINES_OPT3 $[EXTRA_CDEFS]
  744. #defer CDEFINES_OPT4 NDEBUG $[EXTRA_CDEFS]
  745. // What additional flags should be passed for each value of OPTIMIZE
  746. // (above)? We separate out the compiler-optimization flags, above,
  747. // so we can compile certain files that give optimizers trouble (like
  748. // the output of lex and yacc) without them, but with all the other
  749. // relevant flags.
  750. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall -g
  751. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall -g $[OPTFLAGS]
  752. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] -g $[OPTFLAGS]
  753. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[OPTFLAGS]
  754. // What additional flags should be passed to both compilers when
  755. // building shared (relocatable) sources? Some architectures require
  756. // special support for this.
  757. #defer CFLAGS_SHARED -fPIC
  758. // How to generate a C or C++ executable from a collection of .o
  759. // files. $[target] is the name of the binary to generate, and
  760. // $[sources] is the list of .o files. $[libs] is a space-separated
  761. // list of dependent libraries, and $[lpath] is a space-separated list
  762. // of directories in which those libraries can be found.
  763. #defer LINK_BIN_C $[cc_ld] -o $[target] $[sources] $[flags] $[lpath:%=-L%] $[libs:%=-l%]\
  764. $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]]
  765. #defer LINK_BIN_C++ $[cxx_ld]\
  766. -o $[target] $[sources]\
  767. $[flags]\
  768. $[lpath:%=-L%] $[libs:%=-l%]\
  769. $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]]
  770. // How to generate a static C or C++ library. $[target] is the
  771. // name of the library to generate, and $[sources] is the list of .o
  772. // files that will go into the library.
  773. #if $[eq $[PLATFORM], osx]
  774. #defer STATIC_LIB_C libtool -static -o $[target] $[sources]
  775. #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources]
  776. //#elif $[eq $[PLATFORM], FreeBSD]
  777. // #defer STATIC_LIB_C libtool --mode=link -static -o $[target] $[sources]
  778. // #defer STATIC_LIB_C++ libtool --mode=link -static -o $[target] $[sources]
  779. #else
  780. #defer STATIC_LIB_C ar cru $[target] $[sources]
  781. #defer STATIC_LIB_C++ ar cru $[target] $[sources]
  782. #endif
  783. // How to run ranlib, if necessary, after generating a static library.
  784. // $[target] is the name of the library. Set this to the empty string
  785. // if ranlib is not necessary on your platform.
  786. #defer RANLIB ranlib $[target]
  787. // Where to put the so_locations file, used by an Irix MIPSPro
  788. // compiler, to generate a map of shared library memory locations.
  789. #defer SO_LOCATIONS $[DTOOL_INSTALL]/etc/so_locations
  790. // How to generate a shared C or C++ library. $[source] and $[target]
  791. // as above, and $[libs] is a space-separated list of dependent
  792. // libraries, and $[lpath] is a space-separated list of directories in
  793. // which those libraries can be found.
  794. #if $[eq $[PLATFORM], osx]
  795. #defer SHARED_LIB_C $[cc_ld] -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]]
  796. #defer SHARED_LIB_C++ $[cxx_ld] -undefined dynamic_lookup -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]]
  797. #defer BUNDLE_LIB_C++ $[cxx_ld] -undefined dynamic_lookup -bundle -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]]
  798. #else
  799. #defer SHARED_LIB_C $[cc_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  800. #defer SHARED_LIB_C++ $[cxx_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  801. #define BUNDLE_LIB_C++
  802. #endif
  803. // How to install a data file or executable file. $[local] is the
  804. // local name of the file to install, and $[dest] is the name of the
  805. // directory to put it in.
  806. // On Unix systems, we strongly prefer using the install program to
  807. // install files. This has nice features like automatically setting
  808. // the permissions bits, and also is usually clever enough to install
  809. // a running program without crashing the running instance. However,
  810. // it doesn't understanding installing a program from a subdirectory,
  811. // so we have to cd into the source directory first.
  812. #defer install_dash_p $[if $[KEEP_TIMESTAMPS],-p,]
  813. #defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] $[install_dash_p] $[notdir $[local]] $[dest]/
  814. #defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] $[install_dash_p] $[notdir $[local]] $[dest]/
  815. // Variable definitions for building with the Irix MIPSPro compiler.
  816. #if $[eq $[USE_COMPILER], MIPS]
  817. #define CC cc -n32 -mips3
  818. #define CXX CC -n32 -mips3
  819. // Turn off a few annoying warning messages.
  820. // 1174 - function 'blah' was declared but never used
  821. // 1201 - trailing comma is nonstandard.
  822. // 1209 - controlling expression is constant, e.g. if (0) { ... }
  823. // 1234 - access control not specified, 'public' by default
  824. // 1355 - extra ";" ignored
  825. // 1375 - destructor for base class is not virtual.
  826. // this one actually is bad. But we got alot of them from the classes
  827. // that we've derived from STL collections. Beware of this.
  828. // 3322 - omission of explicit type is nonstandard ("int" assumed)
  829. #define WOFF_LIST -woff 1174,1201,1209,1234,1355,1375,3322
  830. // Linker warnings
  831. // 85 - definition of SOMESYMBOL in SOMELIB preempts that of definition in
  832. // SOMEOTHERLIB.
  833. #define WOFF_LIST $[WOFF_LIST] -Wl,-LD_MSG:off=85
  834. #defer OPTFLAGS -O2 -OPT:Olimit=2500
  835. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] $[WOFF_LIST] -g
  836. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] $[WOFF_LIST]
  837. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[WOFF_LIST]
  838. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[WOFF_LIST]
  839. #defer CFLAGS_SHARED
  840. #defer STATIC_LIB_C $[CC] -ar -o $[target] $[sources]
  841. #defer STATIC_LIB_C++ $[CXX] -ar -o $[target] $[sources]
  842. #defer RANLIB
  843. #defer SHARED_FLAGS -Wl,-none -Wl,-update_registry,$[SO_LOCATIONS]
  844. #defer SHARED_LIB_C $[cc_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  845. #defer SHARED_LIB_C++ $[cxx_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  846. #endif
  847. //////////////////////////////////////////////////////////////////////
  848. // There are also some additional variables that control specific
  849. // compiler/platform features or characteristics, defined in the
  850. // platform specific file Config.platform.pp. Be sure to inspect
  851. // these variables for correctness too.
  852. //////////////////////////////////////////////////////////////////////