Config.pp 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  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. // *******************************************************************
  10. // NOTE: you should not attempt to copy this file verbatim as your own
  11. // personal Config.pp file. Instead, you should start with an empty
  12. // Config.pp file, and add lines to it when you wish to override
  13. // settings given in here. In the normal ppremake system, this file
  14. // will always be read first, and then your personal Config.pp file
  15. // will be read later, which gives you a chance to override the
  16. // default settings found in this file. However, if you start by
  17. // copying the entire file, it will be difficult to tell which
  18. // settings you have customized, and it will be difficult to upgrade
  19. // to a subsequent version of Panda.
  20. // *******************************************************************
  21. //
  22. // ppremake is capable of generating makefiles for Unix compilers such
  23. // as gcc or SGI's MipsPRO compiler, as well as for Windows
  24. // environments like Microsoft's Visual C++. It can also,
  25. // potentially, generate Microsoft Developer's Studio project files
  26. // directly, although we haven't written the scripts to do this yet.
  27. // In principle, it can be extended to generate suitable build script
  28. // files for any number of different build environments.
  29. //
  30. // All of these build scripts can be tuned for a particular
  31. // environment via this file. This is the place for the user to
  32. // specify which external packages are installed and where, or to
  33. // enable or disable certain optional features. However, it is
  34. // suggested that rather than modify this file directly, you create a
  35. // custom file in your home directory and there redefine whatever
  36. // variables are appropriate, and set the environment variable
  37. // PPREMAKE_CONFIG to refer to it. In this way, you can easily get an
  38. // updated source tree (including a new Config.pp) without risking
  39. // accidentally losing your customizations. This also avoids having
  40. // to redefine the same variables in different packages (for instance,
  41. // in dtool and in panda).
  42. //
  43. // The syntax in this file resembles some hybrid between C++
  44. // preprocessor declarations and GNU make variables. This is the same
  45. // syntax used in the various ppremake system configure files; it's
  46. // designed to be easy to use as a macro language to generate
  47. // makefiles and their ilk.
  48. //
  49. // Some of the variables below are defined using the #define command,
  50. // and others are defined using #defer. The two are very similar in
  51. // their purpose; the difference is that, if the variable definition
  52. // includes references to other variables (e.g. $[varname]), then
  53. // #define will evaluate all of the other variable references
  54. // immediately and store the resulting expansion, while #defer will
  55. // store only the variable references themselves, and expand them when
  56. // the variable is later referenced. It is very similar to the
  57. // relationship between := and = in GNU Make.
  58. // dtool/Config.pp
  59. // In general, #defer is used in this file, to allow the user to
  60. // redefine critical variables in his or her own Config.pp file.
  61. // What kind of build scripts are we generating? This selects a
  62. // suitable template file from the ppremake system files. The
  63. // allowable choices, at present, are:
  64. //
  65. // unix - Generate makefiles suitable for most Unix platforms.
  66. // msvc - Generate Visual C++ project files (still a work in progress)
  67. // nmake - Generate makefiles for Microsoft Visual C++, using
  68. // Microsoft's nmake utility.
  69. // gmsvc - Generate makefiles similar to the above, using Microsoft
  70. // Visual C++, but uses the Cygwin-supplied GNU make
  71. // instead of Microsoft nmake. This is potentially
  72. // faster if you have multiple CPU's, since it supports
  73. // distributed make. It's a tiny bit slower if you're
  74. // not taking advantage of distributed make, because of
  75. // the overhead associated with Cygwin fork() calls.
  76. #if $[eq $[PLATFORM], Win32]
  77. #define BUILD_TYPE nmake
  78. #elif $[eq $[PLATFORM], Cygwin]
  79. #define BUILD_TYPE gmsvc
  80. #elif $[OSX_PLATFORM]
  81. #define BUILD_TYPE unix
  82. #else
  83. #define BUILD_TYPE unix
  84. #endif
  85. // What is the default install directory for all trees in the Panda
  86. // suite? The default value for this variable is provided by
  87. // ppremake; on Unix machines it is the value of --prefix passed in to
  88. // the configure script, and on Windows machines the default is
  89. // hardcoded in config_msvc.h to C:\Panda3d.
  90. // You may also override this for a particular tree by defining a
  91. // variable name like DTOOL_INSTALL or PANDA_INSTALL. (The
  92. // INSTALL_DIR variable will have no effect if you are using the
  93. // ctattach tools to control your attachment to the trees; but this
  94. // will be the case only if you are a member of the VR Studio.)
  95. // #define INSTALL_DIR /usr/local/panda
  96. // If you intend to use Panda only as a Python module, you may find
  97. // the following define useful (but you should put in the correct path
  98. // to site-packages within your own installed Python). This will
  99. // install the Panda libraries into the standard Python search space
  100. // so that they can be accessed as Python modules. (Also see the
  101. // PYTHON_IPATH variable, below.)
  102. // If you don't do this, you can still use Panda as a Python module,
  103. // but you must put /usr/local/panda/lib (or $INSTALL_DIR/lib) on
  104. // your PYTHONPATH.
  105. // #define INSTALL_LIB_DIR /usr/lib/python2.6/site-packages
  106. // The character used to separate components of an OS-specific
  107. // directory name depends on the platform (it is '/' on Unix, '\' on
  108. // Windows). That character selection is hardcoded into Panda and
  109. // cannot be changed here. (Note that an internal Panda filename
  110. // always uses the forward slash, '/', to separate the components of a
  111. // directory name.)
  112. // There's a different character used to separate the complete
  113. // directory names in a search path specification. On Unix, the
  114. // normal convention is ':', on Windows, it has to be ';', because the
  115. // colon is already used to mark the drive letter. This character is
  116. // selectable here. Most users won't want to change this. If
  117. // multiple characters are placed in this string, any one of them may
  118. // be used as a separator character.
  119. #define DEFAULT_PATHSEP $[if $[WINDOWS_PLATFORM],;,:]
  120. // What level of compiler optimization/debug symbols should we build?
  121. // The various optimize levels are defined as follows:
  122. //
  123. // 1 - No compiler optimizations, debug symbols, debug heap, lots of checks
  124. // 2 - Full compiler optimizations, debug symbols, debug heap, lots of checks
  125. // 3 - Full compiler optimizations, full debug symbols, fewer checks
  126. // 4 - Full optimizations, no debug symbols, and asserts removed
  127. //
  128. #define OPTIMIZE 3
  129. // On OSX, you may or may not want to compile universal binaries.
  130. // Turning this option on allows your compiled version of Panda to run
  131. // on any version of OSX (PPC or Intel-based), but it will also
  132. // increase the compilation time, as well as the resulting binary
  133. // size. I believe you have to be building on an Intel-based platform
  134. // to generate universal binaries using this technique. This option
  135. // has no effect on non-OSX platforms.
  136. #define UNIVERSAL_BINARIES
  137. // Panda uses prc files for runtime configuration. There are many
  138. // compiled-in options to customize the behavior of the prc config
  139. // system; most users won't need to change any of them. Feel free to
  140. // skip over all of the PRC_* variables defined here.
  141. // The default behavior is to search for files names *.prc in the
  142. // directory specified by the PRC_DIR environment variable, and then
  143. // to search along all of the directories named by the PRC_PATH
  144. // environment variable. Either of these variables might be
  145. // undefined; if both of them are undefined, the default is to search
  146. // in the directory named here by DEFAULT_PRC_DIR.
  147. // By default, we specify the install/etc dir, which is where the
  148. // system-provided PRC files get copied to.
  149. #defer DEFAULT_PRC_DIR $[INSTALL_DIR]/etc
  150. // You can specify the names of the environment variables that are
  151. // used to specify the search location(s) for prc files at runtime.
  152. // These are space-separated lists of environment variable names.
  153. // Specify empty string for either one of these to disable the
  154. // feature. For instance, redefining PRC_DIR_ENVVARS here to
  155. // PANDA_PRC_DIR would cause the environment variable $PANDA_PRC_DIR
  156. // to be consulted at startup instead of the default value of
  157. // $PRC_DIR.
  158. #define PRC_DIR_ENVVARS PRC_DIR
  159. #define PRC_PATH_ENVVARS PRC_PATH
  160. // You can specify the name of the file(s) to search for in the above
  161. // paths to be considered a config file. This should be a
  162. // space-separated list of filename patterns. This is *.prc by
  163. // default; normally there's no reason to change this.
  164. #define PRC_PATTERNS *.prc
  165. // You can optionally encrypt your prc file(s) to help protect them
  166. // from curious eyes. You have to specify the encryption key, which
  167. // gets hard-coded into the executable. (This feature provides mere
  168. // obfuscation, not real security, since the encryption key can
  169. // potentially be extracted by a hacker.) This requires building with
  170. // OpenSSL (see below).
  171. #define PRC_ENCRYPTED_PATTERNS *.prc.pe
  172. #define PRC_ENCRYPTION_KEY ""
  173. // One unusual feature of config is the ability to execute one or more
  174. // of the files it discovers as if it were a program, and then treat
  175. // the output of this program as a prc file. If you want to use this
  176. // feature, define this variable to the filename pattern or patterns
  177. // for such executable-style config programs (e.g. *prc.exe). This
  178. // can be the same as the above if you like this sort of ambiguity; in
  179. // that case, config will execute the file if it appears to be
  180. // executable; otherwise, it will simply read it.
  181. #define PRC_EXECUTABLE_PATTERNS
  182. // If you do use the above feature, you'll need another environment
  183. // variable that specifies additional arguments to pass to the
  184. // executable programs. The default definition, given here, makes
  185. // that variable be $PRC_EXECUTABLE_ARGS. Sorry, the same arguments
  186. // must be supplied to all executables in a given runtime session.
  187. #define PRC_EXECUTABLE_ARGS_ENVVAR PRC_EXECUTABLE_ARGS
  188. // You can implement signed prc files, if you require this advanced
  189. // feature. This allows certain config variables to be set only by a
  190. // prc file that has been provided by a trusted source. To do this,
  191. // first install and compile Dtool with OpenSSL (below) and run the
  192. // program make-prc-key, and then specify here the output filename
  193. // generated by that program, and then recompile Dtool (ppremake; make
  194. // install).
  195. #define PRC_PUBLIC_KEYS_FILENAME
  196. // By default, the signed-prc feature, above, is enabled only for a
  197. // release build (OPTIMIZE = 4). In a normal development environment
  198. // (OPTIMIZE < 4), any prc file can set any config variable, whether
  199. // or not it is signed. Set this variable true (nonempty) or false
  200. // (empty) to explicitly enable or disable this feature.
  201. #defer PRC_RESPECT_TRUST_LEVEL $[= $[OPTIMIZE],4]
  202. // If trust level is in effect, this specifies the default trust level
  203. // for any legacy (Dconfig) config variables (that is, variables
  204. // created using the config.GetBool(), etc. interface, rather than the
  205. // newer ConfigVariableBool interface).
  206. #defer PRC_DCONFIG_TRUST_LEVEL 0
  207. // If trust level is in effect, you may globally increment the
  208. // (mis)trust level of all variables by the specified amount.
  209. // Incrementing this value by 1 will cause all variables to require at
  210. // least a level 1 signature.
  211. #define PRC_INC_TRUST_LEVEL 0
  212. // Similarly, the descriptions are normally saved only in a
  213. // development build, not in a release build. Set this value true to
  214. // explicitly save them anyway.
  215. #defer PRC_SAVE_DESCRIPTIONS $[< $[OPTIMIZE],4]
  216. // This is the end of the PRC variable customization section. The
  217. // remaining variables are of general interest to everyone.
  218. // You may define this to build or develop the plugin.
  219. //#define HAVE_P3D_PLUGIN 1
  220. // You may define both of these to build or develop the Panda3D
  221. // rtdist, the environment packaged up for distribution with the
  222. // plugin.
  223. //#define PANDA_PACKAGE_VERSION local_dev
  224. //#define PANDA_PACKAGE_HOST_URL http://some.url/
  225. #defer HAVE_P3D_RTDIST $[PANDA_PACKAGE_HOST_URL]
  226. // NOTE: In the following, to indicate "yes" to a yes/no question,
  227. // define the variable to be a nonempty string. To indicate "no",
  228. // define the variable to be an empty string.
  229. // Many of the HAVE_* variables are defined in terms of expressions
  230. // based on the paths and library names, etc., defined above. These
  231. // are defined using the "defer" command, so that they are not
  232. // evaluated right away, giving the user an opportunity to redefine
  233. // the variables they depend on, or to redefine the HAVE_* variables
  234. // themselves (you can explicitly define a HAVE_* variable to some
  235. // nonempty string to force the package to be marked as installed).
  236. // Do you want to generate a Python-callable interrogate interface?
  237. // This is only necessary if you plan to make calls into Panda from a
  238. // program written in Python. This is done only if HAVE_PYTHON,
  239. // below, is also true.
  240. #define INTERROGATE_PYTHON_INTERFACE 1
  241. // Define this true to use the new interrogate feature to generate
  242. // Python-native objects directly, rather than requiring a separate
  243. // FFI step. This loads and runs much more quickly than the original
  244. // mechanism. Define this false (that is, empty) to use the original
  245. // interfaces.
  246. #define PYTHON_NATIVE 1
  247. // Do you want to generate a C-callable interrogate interface? This
  248. // generates an interface similar to the Python interface above, with
  249. // a C calling convention. It should be useful for most other kinds
  250. // of scripting language; the VR Studio used to use this to make calls
  251. // into Panda from Squeak. This is not presently used by any VR
  252. // Studio code.
  253. #define INTERROGATE_C_INTERFACE
  254. // Do you even want to build interrogate at all? This is the program
  255. // that reads our C++ source files and generates one of the above
  256. // interfaces. If you won't be building the interfaces, you don't
  257. // need the program.
  258. #defer HAVE_INTERROGATE $[or $[INTERROGATE_PYTHON_INTERFACE],$[INTERROGATE_C_INTERFACE]]
  259. // What additional options should be passed to interrogate when
  260. // generating either of the above two interfaces? Generally, you
  261. // probably don't want to mess with this.
  262. #define INTERROGATE_OPTIONS -fnames -string -refcount -assert
  263. // What's the name of the interrogate binary to run? The default
  264. // specified is the one that is built as part of DTOOL. If you have a
  265. // prebuilt binary standing by (for instance, one built opt4), specify
  266. // its name instead.
  267. #define INTERROGATE interrogate
  268. #define INTERROGATE_MODULE interrogate_module
  269. // What is the name of the C# compiler binary?
  270. #define CSHARP csc
  271. // This defines the include path to the Eigen linear algebra library.
  272. // If this is provided, Panda will use this library as the fundamental
  273. // implementation of its own linmath library; otherwise, it will use
  274. // its own internal implementation. The primary advantage of using
  275. // Eigen is SSE2 support, which is only activated if LINMATH_ALIGN
  276. // is also enabled. (However, activating LINMATH_ALIGN does
  277. // constrain most objects in Panda to 16-byte alignment, which could
  278. // impact memory usage on very-low-memory platforms.) Currently
  279. // experimental.
  280. #define EIGEN_IPATH
  281. #defer EIGEN_CFLAGS $[if $[WINDOWS_PLATFORM],/arch:SSE2,-msse2]
  282. #defer HAVE_EIGEN $[isdir $[EIGEN_IPATH]/Eigen]
  283. #define LINMATH_ALIGN 1
  284. // Is Python installed, and should Python interfaces be generated? If
  285. // Python is installed, which directory is it in?
  286. #define PYTHON_IPATH /usr/include/python2.6
  287. #define PYTHON_LPATH
  288. #define PYTHON_FPATH
  289. #define PYTHON_COMMAND python
  290. #defer PYTHON_DEBUG_COMMAND $[PYTHON_COMMAND]$[if $[WINDOWS_PLATFORM],_d]
  291. #define PYTHON_FRAMEWORK
  292. #defer HAVE_PYTHON $[or $[PYTHON_FRAMEWORK],$[isdir $[PYTHON_IPATH]]]
  293. // By default, we'll assume the user only wants to run with Debug
  294. // python if he has to--that is, on Windows when building a debug build.
  295. #defer USE_DEBUG_PYTHON $[and $[< $[OPTIMIZE],3],$[WINDOWS_PLATFORM]]
  296. // Define the default set of libraries to be instrumented by
  297. // genPyCode. You may wish to add to this list to add your own
  298. // libraries, or if you want to use some of the more obscure
  299. // interfaces like libpandaegg and libpandafx.
  300. #defer GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libp3direct libpandafx libp3vision $[if $[HAVE_ODE],libpandaode] $[if $[HAVE_VRPN],libp3vrpn]
  301. // Normally, Python source files are copied into the INSTALL_LIB_DIR
  302. // defined above, along with the compiled C++ library objects, when
  303. // you make install. If you prefer not to copy these Python source
  304. // files, but would rather run them directly out of the source
  305. // directory (presumably so you can develop them and make changes
  306. // without having to reinstall), comment out this definition and put
  307. // your source directory on your PYTHONPATH.
  308. #define INSTALL_PYTHON_SOURCE 1
  309. // Do you want to compile in support for tracking memory usage? This
  310. // enables you to define the variable "track-memory-usage" at runtime
  311. // to help track memory leaks, and also report total memory usage on
  312. // PStats. There is some small overhead for having this ability
  313. // available, even if it is unused.
  314. #defer DO_MEMORY_USAGE $[<= $[OPTIMIZE], 3]
  315. // This option compiles in support for simulating network delay via
  316. // the min-lag and max-lag prc variables. It adds a tiny bit of
  317. // overhead even when it is not activated, so it is typically enabled
  318. // only in a development build.
  319. #defer SIMULATE_NETWORK_DELAY $[<= $[OPTIMIZE], 3]
  320. // This option compiles in support for immediate-mode OpenGL
  321. // rendering. Since this is normally useful only for researching
  322. // buggy drivers, and since there is a tiny bit of per-primitive
  323. // overhead to have this option available even if it is unused, it is
  324. // by default enabled only in a development build. This has no effect
  325. // on DirectX rendering.
  326. #defer SUPPORT_IMMEDIATE_MODE $[<= $[OPTIMIZE], 3]
  327. // These are two optional alternative memory-allocation schemes
  328. // available within Panda. You can experiment with either of them to
  329. // see if they give better performance than the system malloc(), but
  330. // at the time of this writing, it doesn't appear that they do.
  331. #define USE_MEMORY_DLMALLOC
  332. #define USE_MEMORY_PTMALLOC2
  333. // Set this true if you prefer to use the system malloc library even
  334. // if 16-byte alignment must be performed on top of it, wasting up to
  335. // 30% of memory usage. If you do not set this, and 16-byte alignment
  336. // is required and not provided by the system malloc library, then an
  337. // alternative malloc system (above) will be used instead.
  338. #define MEMORY_HOOK_DO_ALIGN
  339. // Panda contains some experimental code to compile for IPhone. This
  340. // requires the Apple IPhone SDK, which is currently only available
  341. // for OS X platforms. Set this to either "iPhoneSimulator" or
  342. // "iPhoneOS". Note that this is still *experimental* and incomplete!
  343. // Don't enable this unless you know what you're doing!
  344. #define BUILD_IPHONE
  345. // Panda contains some experimental code to compile for Android. This
  346. // requires the Google Android NDK.
  347. // Besides BUILD_ANDROID, you'll also have to set ANDROID_NDK_HOME
  348. // to the location of the Android NDK directory. ANDROID_NDK_HOME may
  349. // not contain any spaces.
  350. // Furthermore, ANDROID_ABI can be set to armeabi, armeabi-v7a, x86,
  351. // or mips, depending on which architecture should be targeted.
  352. #define ANDROID_NDK_HOME
  353. #define ANDROID_ABI armeabi
  354. #define ANDROID_STL gnustl_shared
  355. #define ANDROID_PLATFORM android-9
  356. #define ANDROID_ARCH arm
  357. #defer ANDROID_TOOLCHAIN $[if $[eq $[ANDROID_ARCH],arm],arm-linux-androideabi]
  358. // Do you want to use one of the alternative malloc implementations?
  359. // This is almost always a good idea on Windows, where the standard
  360. // malloc implementation appears to be pretty poor, but probably
  361. // doesn't matter much on Linux (which is likely to implement
  362. // ptmalloc2 anyway). We always define this by default on Windows; on
  363. // Linux, we define it by default only when DO_MEMORY_USAGE is enabled
  364. // (since in that case, we'll be paying the overhead for the extra
  365. // call anyway) or when HAVE_THREADS is not defined (since the
  366. // non-thread-safe dlmalloc is a tiny bit faster than the system
  367. // library).
  368. // In hindsight, let's not enable this at all. It just causes
  369. // problems.
  370. //#defer ALTERNATIVE_MALLOC $[or $[WINDOWS_PLATFORM],$[DO_MEMORY_USAGE],$[not $[HAVE_THREADS]]]
  371. #define ALTERNATIVE_MALLOC
  372. // Define this true to use the DELETED_CHAIN macros, which support
  373. // fast re-use of existing allocated blocks, minimizing the low-level
  374. // calls to malloc() and free() for frequently-created and -deleted
  375. // objects. There's usually no reason to set this false, unless you
  376. // suspect a bug in Panda's memory management code.
  377. #define USE_DELETED_CHAIN 1
  378. // Define this if you are building on Windows 7 or better, and you
  379. // want your Panda build to run only on Windows 7 or better, and you
  380. // need to use the Windows touchinput interfaces.
  381. #define HAVE_WIN_TOUCHINPUT
  382. // Define this true to build the low-level native network
  383. // implementation. Normally this should be set true.
  384. #define WANT_NATIVE_NET 1
  385. #define NATIVE_NET_IPATH
  386. #define NATIVE_NET_LPATH
  387. #define NATIVE_NET_LIBS $[if $[WINDOWS_PLATFORM],wsock32.lib]
  388. // Do you want to build the high-level network interface? This layers
  389. // on top of the low-level native_net interface, specified above.
  390. // Normally, if you build NATIVE_NET, you will also build NET.
  391. #defer HAVE_NET $[WANT_NATIVE_NET]
  392. // Do you want to build the egg loader? Usually there's no reason to
  393. // avoid building this, unless you really want to make a low-footprint
  394. // build (such as, for instance, for the iPhone).
  395. #define HAVE_EGG 1
  396. // Is a third-party STL library installed, and where? This is only
  397. // necessary if the default include and link lines that come with the
  398. // compiler don't provide adequate STL support. At least some form of
  399. // STL is absolutely required in order to build Panda.
  400. #define STL_IPATH
  401. #define STL_LPATH
  402. #define STL_CFLAGS
  403. #define STL_LIBS
  404. // Does your STL library provide hashed associative containers like
  405. // hash_map and hash_set? Define this true if you have a nonstandard
  406. // STL library that provides these, like Visual Studio .NET's. (These
  407. // hashtable containers are not part of the C++ standard yet, but the
  408. // Dinkum STL library that VC7 ships with includes a preliminary
  409. // implementation that Panda can optionally use.) For now, we assume
  410. // you have this by default only on a Windows platform.
  411. // On second thought, it turns out that this API is still too
  412. // volatile. The interface seems to have changed with the next
  413. // version of .NET, and it didn't present any measureable performance
  414. // gain anyway. Never mind.
  415. #define HAVE_STL_HASH
  416. // Is OpenSSL installed, and where?
  417. #define OPENSSL_IPATH
  418. #define OPENSSL_LPATH
  419. #define OPENSSL_LIBS ssl crypto
  420. #defer HAVE_OPENSSL $[libtest $[OPENSSL_LPATH],$[OPENSSL_LIBS]]
  421. // Define this true to include the OpenSSL code to report verbose
  422. // error messages when they occur.
  423. #defer REPORT_OPENSSL_ERRORS $[< $[OPTIMIZE], 4]
  424. // Is libjpeg installed, and where?
  425. #define JPEG_IPATH
  426. #define JPEG_LPATH
  427. #define JPEG_LIBS jpeg
  428. #defer HAVE_JPEG $[libtest $[JPEG_LPATH],$[JPEG_LIBS]]
  429. // Some versions of libjpeg did not provide jpegint.h. Redefine this
  430. // to empty if you lack this header file.
  431. #define PHAVE_JPEGINT_H 1
  432. // Do you want to compile video-for-linux? If you have an older Linux
  433. // system with incompatible headers, define this to empty string.
  434. #defer HAVE_VIDEO4LINUX $[IS_LINUX]
  435. // Is libpng installed, and where?
  436. #define PNG_IPATH
  437. #define PNG_LPATH
  438. #define PNG_LIBS png
  439. #defer HAVE_PNG $[libtest $[PNG_LPATH],$[PNG_LIBS]]
  440. // Is libtiff installed, and where?
  441. #define TIFF_IPATH
  442. #define TIFF_LPATH
  443. #define TIFF_LIBS tiff z
  444. #defer HAVE_TIFF $[libtest $[TIFF_LPATH],$[TIFF_LIBS]]
  445. // These image file formats don't require the assistance of a
  446. // third-party library to read and write, so there's normally no
  447. // reason to disable them in the build, unless you are looking to
  448. // reduce the memory footprint.
  449. #define HAVE_SGI_RGB 1
  450. #define HAVE_TGA 1
  451. #define HAVE_IMG 1
  452. #define HAVE_SOFTIMAGE_PIC 1
  453. #define HAVE_BMP 1
  454. #define HAVE_PNM 1
  455. // Is libtar installed, and where? This is used to optimize patch
  456. // generation against tar files.
  457. #define TAR_IPATH
  458. #define TAR_LPATH
  459. #define TAR_LIBS tar
  460. #defer HAVE_TAR $[libtest $[TAR_LPATH],$[TAR_LIBS]]
  461. // Is libfftw installed, and where?
  462. #define FFTW_IPATH /opt/local/include
  463. #define FFTW_LPATH /opt/local/lib
  464. #define FFTW_LIBS rfftw fftw
  465. #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]]
  466. // This is because darwinport's version of the fftw lib is called
  467. // drfftw instead of rfftw.
  468. #defer PHAVE_DRFFTW_H $[libtest $[FFTW_LPATH],drfftw]
  469. // Is libsquish installed, and where?
  470. #define SQUISH_IPATH /usr/local/include
  471. #define SQUISH_LPATH /usr/local/lib
  472. #define SQUISH_LIBS squish
  473. #defer HAVE_SQUISH $[libtest $[SQUISH_LPATH],$[SQUISH_LIBS]]
  474. // Is Berkeley DB installed, and where? Presently, this is only used
  475. // for some applications (egg-optchar in particular) in Pandatool, and
  476. // it is completely optional there. If available, egg-optchar takes
  477. // advantage of it to allow the optimization of very large numbers of
  478. // models in one pass, that might otherwise exceed available memory.
  479. // Actually, this isn't even true anymore. At the time of this writing,
  480. // no system in Panda makes use of Berkeley DB. So don't bother to
  481. // define this.
  482. #define BDB_IPATH
  483. #define BDB_LPATH
  484. #define BDB_LIBS db db_cxx
  485. #defer HAVE_BDB $[libtest $[BDB_LPATH],$[BDB_LIBS]]
  486. // Is Cg installed, and where?
  487. #if $[WINDOWS_PLATFORM]
  488. #define CG_IPATH
  489. #define CG_LPATH
  490. #define CG_LIBS cg.lib
  491. #else
  492. #define CG_IPATH
  493. #define CG_LPATH
  494. #define CG_LIBS Cg
  495. #endif
  496. #define CG_FRAMEWORK
  497. #defer HAVE_CG $[or $[CG_FRAMEWORK],$[libtest $[CG_LPATH],$[CG_LIBS]]]
  498. // Is CgGL installed, and where?
  499. #defer CGGL_IPATH $[CG_IPATH]
  500. #defer CGGL_LPATH $[CG_LPATH]
  501. #define CGGL_LIBS $[if $[WINDOWS_PLATFORM],cgGL.lib,CgGL]
  502. #defer HAVE_CGGL $[or $[CGGL_FRAMEWORK],$[and $[HAVE_CG],$[libtest $[CGGL_LPATH],$[CGGL_LIBS]]]]
  503. // Is CgDX8 installed, and where?
  504. #defer CGDX8_IPATH $[CG_IPATH]
  505. #defer CGDX8_LPATH $[CG_LPATH]
  506. #define CGDX8_LIBS $[if $[WINDOWS_PLATFORM],cgD3D8.lib,CgDX8]
  507. #defer HAVE_CGDX8 $[and $[HAVE_CG],$[libtest $[CGDX8_LPATH],$[CGDX8_LIBS]]]
  508. // Is CgDX9 installed, and where?
  509. #defer CGDX9_IPATH $[CG_IPATH]
  510. #defer CGDX9_LPATH $[CG_LPATH]
  511. #define CGDX9_LIBS $[if $[WINDOWS_PLATFORM],cgD3D9.lib,CgDX9]
  512. #defer HAVE_CGDX9 $[and $[HAVE_CG],$[libtest $[CGDX9_LPATH],$[CGDX9_LIBS]]]
  513. // Is CgDX10 installed, and where?
  514. #defer CGDX10_IPATH $[CG_IPATH]
  515. #defer CGDX10_LPATH $[CG_LPATH]
  516. #define CGDX10_LIBS $[if $[WINDOWS_PLATFORM],cgD3D10.lib,CgDX10]
  517. #defer HAVE_CGDX10 $[and $[HAVE_CG],$[libtest $[CGDX10_LPATH],$[CGDX10_LIBS]]]
  518. // Is VRPN installed, and where?
  519. #define VRPN_IPATH
  520. #define VRPN_LPATH
  521. #define VRPN_LIBS
  522. #defer HAVE_VRPN $[libtest $[VRPN_LPATH],$[VRPN_LIBS]]
  523. // Is HELIX installed, and where?
  524. #define HELIX_IPATH
  525. #define HELIX_LPATH
  526. #define HELIX_LIBS
  527. #defer HAVE_HELIX $[libtest $[HELIX_LPATH],$[HELIX_LIBS]]
  528. // Is ZLIB installed, and where?
  529. #define ZLIB_IPATH
  530. #define ZLIB_LPATH
  531. #define ZLIB_LIBS z
  532. #defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
  533. // Is OpenGL installed, and where?
  534. #defer GL_IPATH /usr/include
  535. #defer GL_LPATH
  536. #defer GL_LIBS
  537. #if $[WINDOWS_PLATFORM]
  538. #define GL_LIBS opengl32.lib
  539. #elif $[OSX_PLATFORM]
  540. #defer GL_FRAMEWORK OpenGL
  541. #else
  542. #defer GL_LPATH /usr/X11R6/lib
  543. #defer GL_LIBS GL
  544. #endif
  545. #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
  546. // If you are having trouble linking in OpenGL extension functions at
  547. // runtime for some reason, you can set this variable. This defines
  548. // the minimum runtime version of OpenGL that Panda will require.
  549. // Setting it to a higher version will compile in hard references to
  550. // the extension functions provided by that OpenGL version and below,
  551. // which may reduce runtime portability to other systems, but it will
  552. // avoid issues with getting extension function pointers. It also, of
  553. // course, requires you to install the OpenGL header files and
  554. // compile-time libraries appropriate to the version you want to
  555. // compile against.
  556. // The variable is the major, minor version of OpenGL, separated by a
  557. // space (instead of a dot). Thus, "1 1" means OpenGL version 1.1.
  558. #define MIN_GL_VERSION 1 1
  559. // Is Mesa installed separately from OpenGL? Mesa is an open-source
  560. // software-only OpenGL renderer. Panda can link with it
  561. // independently from OpenGL (and if Mesa is built statically, and/or
  562. // with -DUSE_MGL_NAMESPACE declared to rename gl* to mgl*, it can
  563. // switch between the system OpenGL implementation and the Mesa
  564. // implementation at runtime).
  565. // Also, Mesa includes some core libraries (in libOSMesa.so) that
  566. // allow totally headless rendering, handy if you want to run a
  567. // renderer as a batch service, and you don't want to insist that a
  568. // user be logged on to the desktop or otherwise deal with X11 or
  569. // Windows.
  570. // If you define HAVE_MESA here, and the appropriate paths to headers
  571. // and libraries, then Panda will build libmesadisplay, which can be
  572. // used in lieu of libpandagl or libpandadx to do rendering. However,
  573. // for most applications, you don't need to do this, since (a) if you
  574. // have hardware rendering capability, you probably don't want to use
  575. // Mesa, since it's software-only, and (b) if you don't have hardware
  576. // rendering, you can install Mesa as the system's OpenGL
  577. // implementation, so you can just use the normal libpandagl. You
  578. // only need to define HAVE_MESA if you want to run totally headless,
  579. // or if you want to be able to easily switch between Mesa and the
  580. // system OpenGL implementation at runtime. If you compiled Mesa with
  581. // USE_MGL_NAMESPACE defined, define MESA_MGL here.
  582. #define MESA_IPATH
  583. #define MESA_LPATH
  584. #define MESA_LIBS
  585. #define MESA_MGL
  586. #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]]
  587. // Similar to MIN_GL_VERSION, above.
  588. #define MIN_MESA_VERSION 1 1
  589. // Do you want to build tinydisplay, a light and fast software
  590. // renderer built into Panda, based on TinyGL? This isn't as
  591. // full-featured as Mesa, but it is many times faster, and in fact
  592. // competes favorably with hardware-accelerated integrated graphics
  593. // cards for raw speed (though the hardware-accelerated output looks
  594. // better).
  595. #define HAVE_TINYDISPLAY 1
  596. // Is OpenGL ES 1.x installed, and where? This is a minimal subset of
  597. // OpenGL for mobile devices.
  598. #define GLES_IPATH
  599. #define GLES_LPATH
  600. #define GLES_LIBS GLES_cm
  601. #defer HAVE_GLES $[libtest $[GLES_LPATH],$[GLES_LIBS]]
  602. // OpenGL ES 2.x is a version of OpenGL ES but without fixed-function
  603. // pipeline - everything is programmable there.
  604. #define GLES2_IPATH
  605. #define GLES2_LPATH
  606. #define GLES2_LIBS GLESv2
  607. #defer HAVE_GLES2 $[libtest $[GLES2_LPATH],$[GLES2_LIBS]]
  608. // EGL is like GLX, but for OpenGL ES.
  609. #defer EGL_IPATH
  610. #defer EGL_LPATH
  611. #defer EGL_LIBS EGL
  612. #defer HAVE_EGL $[libtest $[EGL_LPATH],$[EGL_LIBS]]
  613. // The SDL library is useful only for tinydisplay, and is not even
  614. // required for that, as tinydisplay is also supported natively on
  615. // each supported platform.
  616. #define SDL_IPATH
  617. #define SDL_LPATH
  618. #define SDL_LIBS
  619. #defer HAVE_SDL $[libtest $[SDL_LPATH],$[SDL_LIBS]]
  620. // X11 may need to be linked against for tinydisplay, but probably
  621. // only on a Linux platform.
  622. #define X11_IPATH
  623. #define X11_LPATH /usr/X11R6/lib
  624. #define X11_LIBS X11
  625. #defer HAVE_X11 $[and $[UNIX_PLATFORM],$[libtest $[X11_LPATH],$[X11_LIBS]]]
  626. // This defines if we have XF86DGA installed. This enables smooth
  627. // FPS-style mouse in x11display, when mouse mode M_relative is used.
  628. #define XF86DGA_IPATH /usr/include/X11/extensions
  629. #define XF86DGA_LPATH /usr/lib
  630. #define XF86DGA_LIBS Xxf86dga
  631. #defer HAVE_XF86DGA $[libtest $[XF86DGA_LPATH],$[XF86DGA_LIBS]]
  632. // This defines if we have XRANDR installed. This
  633. // enables resolution switching in x11display.
  634. #define XRANDR_IPATH /usr/include/X11/extensions
  635. #define XRANDR_LPATH /usr/lib
  636. #define XRANDR_LIBS Xrandr
  637. #defer HAVE_XRANDR $[libtest $[XRANDR_LPATH],$[XRANDR_LIBS]]
  638. // This defines if we have XCURSOR installed. This
  639. // enables custom cursor support in x11display.
  640. #define XCURSOR_IPATH /usr/include/X11/extensions
  641. #define XCURSOR_LPATH /usr/lib
  642. #define XCURSOR_LIBS Xcursor
  643. #defer HAVE_XCURSOR $[libtest $[XCURSOR_LPATH],$[XCURSOR_LIBS]]
  644. // How about GLX?
  645. #define GLX_IPATH
  646. #define GLX_LPATH
  647. #defer HAVE_GLX $[and $[HAVE_GL],$[HAVE_X11]]
  648. // glXGetProcAddress() is the function used to query OpenGL extensions
  649. // under X. However, this function is itself an extension function,
  650. // leading to a chicken-and-egg problem. One approach is to compile
  651. // in a hard reference to the function, another is to pull the
  652. // function address from the dynamic runtime. Each has its share of
  653. // problems. Panda's default behavior is to pull it from the dynamic
  654. // runtime; define this to compile in a reference to the function.
  655. // This is only relevant from platforms using OpenGL under X (for
  656. // instance, Linux).
  657. #define LINK_IN_GLXGETPROCADDRESS
  658. // Should we try to build the WGL interface?
  659. #defer HAVE_WGL $[and $[HAVE_GL],$[WINDOWS_PLATFORM]]
  660. // These interfaces are for OSX only.
  661. #define HAVE_COCOA
  662. #define HAVE_CARBON
  663. // Is DirectX8 available, and should we try to build with it?
  664. #define DX8_IPATH
  665. #define DX8_LPATH
  666. #define DX8_LIBS d3d8.lib d3dx8.lib dxerr8.lib
  667. #defer HAVE_DX8 $[libtest $[DX8_LPATH],$[DX8_LIBS]]
  668. // Is DirectX9 available, and should we try to build with it?
  669. #define DX9_IPATH
  670. #define DX9_LPATH
  671. #define DX9_LIBS d3d9.lib d3dx9.lib dxerr9.lib
  672. #defer HAVE_DX9 $[libtest $[DX9_LPATH],$[DX9_LIBS]]
  673. // Set this nonempty to use <dxerr.h> instead of <dxerr9.h>. The
  674. // choice between the two is largely based on which version of the
  675. // DirectX SDK(s) you might have installed. The generic library is
  676. // the default for 64-bit windows.
  677. #defer USE_GENERIC_DXERR_LIBRARY $[WIN64_PLATFORM]
  678. // Do we have at least OpenCV 2.3?
  679. #define OPENCV_VER_23 1
  680. // Is OpenCV installed, and where?
  681. #define OPENCV_IPATH
  682. #define OPENCV_LPATH
  683. #defer OPENCV_LIBS $[if $[OPENCV_VER_23], opencv_highgui opencv_core, cv highgui cxcore]
  684. #defer HAVE_OPENCV $[libtest $[OPENCV_LPATH],$[OPENCV_LIBS]]
  685. // Is FFMPEG installed, and where?
  686. #define FFMPEG_IPATH /usr/include/ffmpeg
  687. #define FFMPEG_LPATH
  688. #define FFMPEG_LIBS $[if $[WINDOWS_PLATFORM],avcodec.lib avformat.lib avutil.lib swscale.lib swresample.lib,avcodec avformat avutil swscale swresample]
  689. #defer HAVE_FFMPEG $[libtest $[FFMPEG_LPATH],$[FFMPEG_LIBS]]
  690. // Define this if you compiled ffmpeg with libswscale enabled.
  691. #define HAVE_SWSCALE 1
  692. #define HAVE_SWRESAMPLE 1
  693. // Is ODE installed, and where?
  694. #define ODE_IPATH
  695. #define ODE_LPATH
  696. #define ODE_LIBS $[if $[WINDOWS_PLATFORM],ode.lib,ode]
  697. #define ODE_CFLAGS
  698. #defer HAVE_ODE $[libtest $[ODE_LPATH],$[ODE_LIBS]]
  699. // Is Awesomium installed, and where?
  700. #define AWESOMIUM_IPATH
  701. #define AWESOMIUM_LPATH
  702. #if $[OSX_PLATFORM]
  703. #define AWESOMIUM_LIBS
  704. #else
  705. #define AWESOMIUM_LIBS $[if $[WINDOWS_PLATFORM],awesomium.lib,awesomium]
  706. #endif
  707. #define AWESOMIUM_FRAMEWORK
  708. #defer HAVE_AWESOMIUM $[libtest $[AWESOMIUM_LPATH],$[AWESOMIUM_LIBS]]
  709. // Mozilla's so-called Gecko SDK, a.k.a. Xulrunner SDK, implements
  710. // NPAPI. So does the OSX WebKit framework. Either implementation
  711. // can be used to build a web plugin for Firefox, Safari, Chrome, and
  712. // other non-Microsoft browsers.
  713. #define NPAPI_IPATH
  714. #define NPAPI_LPATH
  715. #define NPAPI_LIBS
  716. #define NPAPI_FRAMEWORK
  717. #define HAVE_NPAPI
  718. #define HAVE_ACTIVEX $[WINDOWS_PLATFORM]
  719. // Do you want to build the DirectD tools for starting Panda clients
  720. // remotely? This only affects the direct tree. Enabling this may
  721. // cause libdirect.dll to fail to load on Win98 clients.
  722. #define HAVE_DIRECTD
  723. // If your system supports the Posix threads interface
  724. // (pthread_create(), etc.), define this true.
  725. #define HAVE_POSIX_THREADS $[and $[isfile /usr/include/pthread.h],$[not $[WINDOWS_PLATFORM]]]
  726. // Do you want to build in support for threading (multiprocessing)?
  727. // Building in support for threading will enable Panda to take
  728. // advantage of multiple CPU's if you have them (and if the OS
  729. // supports kernel threads running on different CPU's), but it will
  730. // slightly slow down Panda for the single CPU case, so this is not
  731. // enabled by default.
  732. #define HAVE_THREADS 1
  733. #define THREADS_LIBS $[if $[not $[WINDOWS_PLATFORM]],pthread]
  734. // If you have enabled threading support with HAVE_THREADS, the
  735. // default is to use OS-provided threading constructs, which usually
  736. // allows for full multiprogramming support (i.e. the program can take
  737. // advantage of multiple CPU's). On the other hand, compiling in this
  738. // full OS-provided support can impose some substantial runtime
  739. // overhead, making the application run slower on a single-CPU
  740. // machine. To avoid this overhead, but still gain some of the basic
  741. // functionality of threads (such as support for asynchronous model
  742. // loads), define SIMPLE_THREADS true in addition to HAVE_THREADS.
  743. // This will compile in a homespun cooperative threading
  744. // implementation that runs strictly on one CPU, adding very little
  745. // overhead over plain single-threaded code.
  746. #define SIMPLE_THREADS
  747. // If this is defined true, then OS threading constructs will be used
  748. // (if available) to perform context switches in the SIMPLE_THREADS
  749. // model, instead of strictly user-space calls like setjmp/longjmp. A
  750. // mutex is used to ensure that only one thread runs at a time, so the
  751. // normal SIMPLE_THREADS optimizations still apply, and the normal
  752. // SIMPLE_THREADS scheduler is used to switch between threads (instead
  753. // of the OS scheduler). This may be more portable and more reliable,
  754. // but it is a weird hybrid between user-space threads and os-provided
  755. // threads. This has meaning only if SIMPLE_THREADS is also defined.
  756. #define OS_SIMPLE_THREADS 1
  757. // Whether threading is defined or not, you might want to validate the
  758. // thread and synchronization operations. With threading enabled,
  759. // defining this will also enable deadlock detection and logging.
  760. // Without threading enabled, defining this will simply verify that a
  761. // mutex is not recursively locked. There is, of course, additional
  762. // run-time overhead for these tests.
  763. #defer DEBUG_THREADS $[<= $[OPTIMIZE], 2]
  764. // Do you want to compile in support for pipelining? This adds code
  765. // to maintain a different copy of the scene graph for each thread in
  766. // the render pipeline, so that app, cull, and draw may each safely
  767. // run in a separate thread, allowing maximum parallelization of CPU
  768. // processing for the frame. Enabling this option does not *require*
  769. // you to use separate threads for rendering, but makes it possible.
  770. // However, compiling this option in does add some additional runtime
  771. // overhead even if it is not used. By default, we enable pipelining
  772. // whenever threads are enabled, assuming that if you have threads,
  773. // you also want to use pipelining. We also enable it at OPTIMIZE
  774. // level 1, since that enables additional runtime checks.
  775. #defer DO_PIPELINING $[or $[<= $[OPTIMIZE], 1],$[HAVE_THREADS]]
  776. // Define this true to implement mutexes and condition variables via
  777. // user-space spinlocks, instead of via OS-provided constructs. This
  778. // is almost never a good idea, except possibly in very specialized
  779. // cases when you are building Panda for a particular application, on
  780. // a particular platform, and you are sure you won't have more threads
  781. // than CPU's. Even then, OS-based locking is probably better.
  782. #define MUTEX_SPINLOCK
  783. // Define this to use the PandaFileStream interface for pifstream,
  784. // pofstream, and pfstream. This is a customized file buffer that may
  785. // have slightly better newline handling, but its primary benefit is
  786. // that it supports SIMPLE_THREADS better by blocking just the active
  787. // "thread" when I/O is delayed, instead of blocking the entire
  788. // process. Normally, there's no reason to turn this off, unless you
  789. // suspect a bug in Panda.
  790. #define USE_PANDAFILESTREAM 1
  791. // Do you want to build the PStats interface, for graphical run-time
  792. // performance statistics? This requires NET to be available. By
  793. // default, we don't build PStats when OPTIMIZE = 4, although this is
  794. // possible.
  795. #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]]
  796. // Do you want to type-check downcasts? This is a good idea during
  797. // development, but does impose some run-time overhead.
  798. #defer DO_DCAST $[< $[OPTIMIZE], 3]
  799. // Do you want to build the debugging tools for recording and
  800. // visualizing intersection tests by the collision system? Enabling
  801. // this increases runtime collision overhead just a tiny bit.
  802. #defer DO_COLLISION_RECORDING $[< $[OPTIMIZE], 4]
  803. // Do you want to include the "debug" and "spam" Notify messages?
  804. // Normally, these are stripped out when we build with OPTIMIZE = 4, but
  805. // sometimes it's useful to keep them around. Redefine this in your
  806. // own Config.pp to achieve that.
  807. #defer NOTIFY_DEBUG $[< $[OPTIMIZE], 4]
  808. // Do you want to build the audio interface?
  809. #define HAVE_AUDIO 1
  810. // The Tau profiler provides a multiplatform, thread-aware profiler.
  811. // To use it, define USE_TAU to 1, and set TAU_MAKEFILE to the
  812. // filename that contains the Tau-provided Makefile for your platform.
  813. // Then rebuild the code with ppremake; make install. Alternatively,
  814. // instead of setting TAU_MAKEFILE, you can also define TAU_ROOT and
  815. // PDT_ROOT, to point to the root directory of the tau and pdtoolkit
  816. // installations, respectively; then the individual Tau components
  817. // will be invoked directly. This is especially useful on Windows,
  818. // where there is no Tau Makefile.
  819. #define TAU_MAKEFILE
  820. #define TAU_ROOT
  821. #define PDT_ROOT
  822. #define TAU_OPTS -optKeepFiles -optRevert
  823. #define TAU_CFLAGS
  824. #define USE_TAU
  825. // Info for the RAD game tools, Miles Sound System
  826. // note this may be overwritten in wintools Config.pp
  827. #define RAD_MSS_IPATH /usr/include/Miles6/include
  828. #define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
  829. #define RAD_MSS_LIBS Mss32
  830. #defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
  831. // Info for the Fmod audio engine
  832. #define FMODEX_IPATH /usr/local/fmod/api/inc
  833. #define FMODEX_LPATH /usr/local/fmod/api/lib
  834. #define FMODEX_LIBS $[if $[libtest $[FMODEX_LPATH],fmodex64],fmodex64,fmodex]
  835. #defer HAVE_FMODEX $[libtest $[FMODEX_LPATH],$[FMODEX_LIBS]]
  836. // Info for the OpenAL audio engine
  837. #define OPENAL_IPATH
  838. #define OPENAL_LPATH
  839. #if $[OSX_PLATFORM]
  840. #define OPENAL_LIBS
  841. #define OPENAL_FRAMEWORK OpenAL
  842. #else
  843. #define OPENAL_LIBS openal
  844. #define OPENAL_FRAMEWORK
  845. #endif
  846. #defer HAVE_OPENAL $[or $[OPENAL_FRAMEWORK],$[libtest $[OPENAL_LPATH],$[OPENAL_LIBS]]]
  847. // Info for the NVIDIA PhysX SDK
  848. #define PHYSX_IPATH /usr/include/PhysX/v2.8.3/SDKs/Cooking/include /usr/include/PhysX/v2.8.3/SDKs/Foundation/include /usr/include/PhysX/v2.8.3/SDKs/NxCharacter/include /usr/include/PhysX/v2.8.3/SDKs/Physics/include /usr/include/PhysX/v2.8.3/SDKs/PhysXLoader/include
  849. #define PHYSX_LPATH /usr/lib/PhysX/v2.8.3
  850. #define PHYSX_LIBS $[if $[WINDOWS_PLATFORM],PhysXLoader.lib NxCharacter.lib NxCooking.lib NxExtensions.lib,PhysXLoader NxCharacter NxCooking]
  851. #defer HAVE_PHYSX $[libtest $[PHYSX_LPATH],$[PHYSX_LIBS]]
  852. // Info for the SpeedTree tree and terrain rendering library. This is
  853. // a commercial library that specializes in rendering trees and other
  854. // foliage.
  855. // This may be either "OpenGL" or "DirectX9". Case is important, due
  856. // to the naming of the SpeedTree libraries.
  857. #define SPEEDTREE_API OpenGL
  858. // The local directory in which the SpeedTree SDK has been installed.
  859. #define SPEEDTREE_SDK_DIR
  860. // The default directory in which to find the SpeedTree installation at runtime.
  861. #defer SPEEDTREE_BIN_DIR $[SPEEDTREE_SDK_DIR]/Bin
  862. #defer SPEEDTREE_IPATH $[SPEEDTREE_SDK_DIR]/Include
  863. #defer SPEEDTREE_LPATH $[SPEEDTREE_SDK_DIR]/Lib/Windows/VC9$[if $[WIN64_PLATFORM],.x64]
  864. #defer SPEEDTREE_DEBUG $[if $[< $[OPTIMIZE], 3],_d]
  865. #defer SPEEDTREE_64 $[if $[WIN64_PLATFORM],64]
  866. // These names are used to build up the names of the SpeedTree libraries.
  867. #defer SPEEDTREE_VERSION 5.1
  868. #defer SPEEDTREE_LIB_SUFFIX _v$[SPEEDTREE_VERSION]_VC90MT$[SPEEDTREE_64]_Static$[SPEEDTREE_DEBUG].lib
  869. #if $[WINDOWS_PLATFORM]
  870. #defer SPEEDTREE_LIBS SpeedTreeCore$[SPEEDTREE_LIB_SUFFIX] SpeedTreeForest$[SPEEDTREE_LIB_SUFFIX] SpeedTree$[SPEEDTREE_API]Renderer$[SPEEDTREE_LIB_SUFFIX] SpeedTreeRenderInterface$[SPEEDTREE_LIB_SUFFIX] $[if $[eq $[SPEEDTREE_API],OpenGL],glew32.lib glu32.lib]
  871. #else
  872. #defer SPEEDTREE_LIBS
  873. #endif
  874. #defer HAVE_SPEEDTREE $[isdir $[SPEEDTREE_SDK_DIR]]
  875. // Is gtk+-2 installed? This is needed to build the pstats program on
  876. // Unix (or non-Windows) platforms. It is also used to provide
  877. // support for XEmbed for the web plugin system, which is necessary to
  878. // support Chromium on Linux.
  879. #define PKG_CONFIG pkg-config
  880. #define HAVE_GTK
  881. // Do we have Freetype 2.0 (or better)? If available, this package is
  882. // used to generate dynamic in-the-world text from font files.
  883. // On Unix, freetype comes with the freetype-config executable, which
  884. // tells us where to look for the various files. On Windows, we need to
  885. // supply this information explicitly.
  886. #defer FREETYPE_CONFIG $[if $[not $[WINDOWS_PLATFORM]],freetype-config]
  887. #defer HAVE_FREETYPE $[or $[libtest $[FREETYPE_LPATH],$[FREETYPE_LIBS]],$[bintest $[FREETYPE_CONFIG]]]
  888. #define FREETYPE_CFLAGS
  889. #define FREETYPE_IPATH
  890. #define FREETYPE_LPATH
  891. #define FREETYPE_LIBS
  892. // Define this true to compile in a default font, so every TextNode
  893. // will always have a font available without requiring the user to
  894. // specify one. Define it empty not to do this, saving a few
  895. // kilobytes on the generated library. Sorry, you can't pick a
  896. // particular font to be the default; it's hardcoded in the source
  897. // (although you can use the text-default-font prc variable to specify
  898. // a particular font file to load as the default, overriding the
  899. // compiled-in font).
  900. #define COMPILE_IN_DEFAULT_FONT 1
  901. // Define this true to compile a special version of Panda to use a
  902. // "double" floating-precision type for most internal values, such as
  903. // positions and transforms, instead of the standard single-precision
  904. // "float" type. This does not affect the default numeric type of
  905. // vertices, which is controlled by the runtime config variable
  906. // vertices-float64.
  907. #define STDFLOAT_DOUBLE
  908. // We use wxWidgets--the C++ library, not the Python library--for
  909. // building the application p3dcert, which is needed only when
  910. // building the plugin/runtime system. This uses a wx-config program,
  911. // similar to freetype, above.
  912. #defer WX_CONFIG $[if $[not $[WINDOWS_PLATFORM]],wx-config]
  913. #defer HAVE_WX $[or $[libtest $[WX_LPATH],$[WX_LIBS]],$[bintest $[WX_CONFIG]]]
  914. #define WX_CFLAGS
  915. #define WX_IPATH
  916. #define WX_LPATH
  917. #define WX_LIBS
  918. // We use FLTK--the C++ library, not the Python library--for
  919. // building the application p3dcert, which is needed only when
  920. // building the plugin/runtime system. This uses a fltk-config program,
  921. // similar to freetype, above.
  922. #defer FLTK_CONFIG $[if $[not $[WINDOWS_PLATFORM]],fltk-config]
  923. #defer HAVE_FLTK $[or $[libtest $[FLTK_LPATH],$[FLTK_LIBS]],$[bintest $[FLTK_CONFIG]]]
  924. #define FLTK_CFLAGS
  925. #define FLTK_IPATH
  926. #define FLTK_LPATH
  927. #define FLTK_LIBS
  928. // Is Maya installed? This matters only to programs in PANDATOOL.
  929. // Also, as of Maya 5.0 it seems the Maya library will not compile
  930. // properly with optimize level 4 set (we get link errors with ostream).
  931. #define MAYA_LOCATION /usr/aw/maya
  932. #defer MAYA_LIBS $[if $[WINDOWS_PLATFORM],Foundation.lib OpenMaya.lib OpenMayaAnim.lib OpenMayaUI.lib,Foundation OpenMaya OpenMayaAnim OpenMayaUI]
  933. // Optionally define this to the value of LM_LICENSE_FILE that should
  934. // be set before invoking Maya.
  935. #define MAYA_LICENSE_FILE
  936. #defer HAVE_MAYA $[and $[<= $[OPTIMIZE], 3],$[isdir $[MAYA_LOCATION]/include/maya]]
  937. // Define this if your version of Maya is earlier than 5.0 (e.g. Maya 4.5).
  938. #define MAYA_PRE_5_0
  939. #define MAYA2EGG maya2egg
  940. // In the same fashion as mayaegg converter above, set softimage to egg converter as well
  941. #define SOFTIMAGE_LOCATION /c/Softimage/sdk_18sp2/SDK_1.8SP2/SAAPHIRE
  942. #defer SOFTIMAGE_LIBS SAA.lib
  943. #defer HAVE_SOFTIMAGE $[isdir $[SOFTIMAGE_LOCATION]/h]
  944. // Is FCollada installed? This is for the daeegg converter.
  945. #define FCOLLADA_IPATH /usr/local/include/fcollada
  946. #define FCOLLADA_LPATH /usr/local/lib
  947. #define FCOLLADA_LIBS FColladaSD
  948. #defer HAVE_FCOLLADA $[libtest $[FCOLLADA_LPATH],$[FCOLLADA_LIBS]]
  949. // Is the COLLADA DOM installed? This is for the native COLLADA loader.
  950. // This defines the versions that your copy of COLLADA DOM supports.
  951. #define COLLADA14DOM_IPATH /usr/local/include/collada-dom /usr/local/include/collada-dom/1.4
  952. #define COLLADA14DOM_LPATH /usr/local/lib
  953. #define COLLADA14DOM_LIBS collada14dom xml2 boost_filesystem
  954. #defer HAVE_COLLADA14DOM $[libtest $[COLLADA14DOM_LPATH],$[COLLADA14DOM_LIBS]]
  955. #define COLLADA15DOM_IPATH /usr/local/include/collada-dom /usr/local/include/collada-dom/1.5
  956. #define COLLADA15DOM_LPATH /usr/local/lib
  957. #define COLLADA15DOM_LIBS collada15dom xml2 boost_filesystem
  958. #defer HAVE_COLLADA15DOM $[libtest $[COLLADA15DOM_LPATH],$[COLLADA15DOM_LIBS]]
  959. // The Assimp library loads various model formats.
  960. #define ASSIMP_IPATH /usr/local/include/assimp
  961. #define ASSIMP_LPATH /usr/local/lib
  962. #define ASSIMP_LIBS assimp
  963. #define HAVE_ASSIMP $[libtest $[ASSIMP_LPATH],$[ASSIMP_LIBS]]
  964. // Also for the ARToolKit library, for augmented reality
  965. #define ARTOOLKIT_IPATH
  966. #define ARTOOLKIT_LPATH
  967. #define ARTOOLKIT_LIBS $[if $[WINDOWS_PLATFORM],libAR.lib,AR]
  968. #defer HAVE_ARTOOLKIT $[libtest $[ARTOOLKIT_LPATH],$[ARTOOLKIT_LIBS]]
  969. // libRocket is a GUI library
  970. #define ROCKET_IPATH /usr/local/include
  971. #define ROCKET_LPATH /usr/local/lib
  972. #define ROCKET_LIBS RocketCore RocketDebugger boost_python
  973. #defer HAVE_ROCKET $[libtest $[ROCKET_LPATH],$[ROCKET_LIBS]]
  974. #defer HAVE_ROCKET_DEBUGGER $[< $[OPTIMIZE],4]
  975. // Unset this if you built libRocket without Python bindings
  976. #defer HAVE_ROCKET_PYTHON $[and $[HAVE_ROCKET],$[HAVE_PYTHON]]
  977. // Bullet is a physics engine
  978. #define BULLET_IPATH /usr/local/include/bullet
  979. #define BULLET_LPATH /usr/local/lib
  980. #if $[WIN64_PLATFORM]
  981. #define BULLET_LIBS BulletSoftBody_x64.lib BulletDynamics_x64.lib BulletCollision_x64.lib LinearMath_x64.lib
  982. #elif $[WINDOWS_PLATFORM]
  983. #define BULLET_LIBS BulletSoftBody.lib BulletDynamics.lib BulletCollision.lib LinearMath.lib
  984. #else
  985. #define BULLET_LIBS BulletSoftBody BulletDynamics BulletCollision LinearMath
  986. #endif
  987. #defer HAVE_BULLET $[libtest $[BULLET_LPATH],$[BULLET_LIBS]]
  988. // libvorbisfile is used for reading Ogg Vorbis audio files (.ogg).
  989. #define VORBIS_IPATH
  990. #define VORBIS_LPATH
  991. #define VORBIS_LIBS $[if $[WINDOWS_PLATFORM],libogg_static.lib libvorbis_static.lib libvorbisfile_static.lib,ogg vorbis vorbisfile]
  992. #defer HAVE_VORBIS $[libtest $[VORBIS_LPATH],$[VORBIS_LIBS]]
  993. // Define this to explicitly indicate the given platform string within
  994. // the resulting Panda runtime. Normally it is best to leave this
  995. // undefined, in which case Panda will determine the best value
  996. // automatically.
  997. #define DTOOL_PLATFORM
  998. // Define this to generate static libraries and executables, rather than
  999. // dynamic libraries.
  1000. //#define LINK_ALL_STATIC yes
  1001. // The panda source tree is made up of a bunch of component libraries
  1002. // (e.g. express, downloader, pgraph, egg) which are ultimately
  1003. // combined into a smaller group of meta libraries or metalibs
  1004. // (e.g. libpandaexpress, libpanda, libpandaegg). Depending on your
  1005. // build configuration, these component libraries might have their own
  1006. // existence, or they might disappear completely and be contained
  1007. // entirely within their metalibs. The former is more convenient for
  1008. // rapid development, while the latter might be more convenient for
  1009. // distribution.
  1010. // Define this variable to compile and link each component as a
  1011. // separate library so that the resulting metalibs are small and there
  1012. // are many separate component libraries; leave it undefined to link
  1013. // component object files directly into their containing metalibs so
  1014. // that the resutling metalib files are large and component libraries
  1015. // don't actually exist. The Windows has traditionally been built
  1016. // with this cleared (because of the original Win32 STL requirements),
  1017. // while the Unix build has traditionally been built with it set.
  1018. // Changing this from the traditional platform-specific setting is not
  1019. // 100% supported yet.
  1020. #define BUILD_COMPONENTS $[not $[WINDOWS_PLATFORM]]
  1021. // Define this to export the templates from the DLL. This is only
  1022. // meaningful if LINK_ALL_STATIC is not defined, and we are building
  1023. // on Windows. Some Windows compilers may not support this syntax.
  1024. #defer EXPORT_TEMPLATES yes
  1025. // Define this to generate .bat files when a Sources.pp makes a
  1026. // script; leave it clear to generate Unix-style sh scripts.
  1027. #defer MAKE_BAT_SCRIPTS $[eq $[PLATFORM],Win32]
  1028. // Define USE_COMPILER to switch the particular compiler that should
  1029. // be used. A handful of tokens are recognized, depending on BUILD_TYPE.
  1030. // This may also be further customized within Global.$[BUILD_TYPE].pp.
  1031. // If BUILD_TYPE is "unix", this may be one of:
  1032. // GCC (gcc/g++)
  1033. // MIPS (Irix MIPSPro compiler)
  1034. //
  1035. // If BUILD_TYPE is "msvc" or "gmsvc", this may be one of:
  1036. // MSVC (Microsoft Visual C++ 6.0)
  1037. // MSVC7 (Microsoft Visual C++ 7.0)
  1038. // BOUNDS (BoundsChecker)
  1039. // INTEL (Intel C/C++ compiler)
  1040. #if $[WINDOWS_PLATFORM]
  1041. #if $[eq $[USE_COMPILER],]
  1042. #define USE_COMPILER MSVC7
  1043. #endif
  1044. #elif $[eq $[PLATFORM], Irix]
  1045. #define USE_COMPILER MIPS
  1046. #elif $[eq $[PLATFORM], Linux]
  1047. #define USE_COMPILER GCC
  1048. #elif $[OSX_PLATFORM]
  1049. #define USE_COMPILER GCC
  1050. #elif $[eq $[PLATFORM], FreeBSD]
  1051. #define USE_COMPILER GCC
  1052. #endif
  1053. // Permission masks to install data and executable files,
  1054. // respectively. This is only meaningful for Unix systems.
  1055. #define INSTALL_UMASK_DATA 644
  1056. #define INSTALL_UMASK_PROG 755
  1057. // How to invoke bison and flex. Panda takes advantage of some
  1058. // bison/flex features, and therefore specifically requires bison and
  1059. // flex, not some other versions of yacc and lex. However, you only
  1060. // need to have these programs if you need to make changes to the
  1061. // bison or flex sources (see the next point, below).
  1062. #defer BISON bison
  1063. #defer FLEX flex
  1064. // You may not even have bison and flex installed. If you don't, no
  1065. // sweat; Panda ships with the pre-generated output of these programs,
  1066. // so you don't need them unless you want to make changes to the
  1067. // grammars themselves (files named *.yxx or *.lxx).
  1068. #defer HAVE_BISON $[bintest $[BISON]]
  1069. // How to invoke sed. A handful of make rules use this. Since some
  1070. // platforms (specifically, non-Unix platforms like Windows) don't
  1071. // have any kind of sed, ppremake performs some limited sed-like
  1072. // functions. The default is to use ppremake in this capacity. In
  1073. // this variable, $[source] is the name of the file to read, $[target]
  1074. // is the name of the file to generate, and $[script] is the one-line
  1075. // sed script to run.
  1076. #defer SED ppremake -s "$[script]" <$[source] >$[target]
  1077. // What directory name (within each source directory) should the .o
  1078. // (or .obj) files be written to? This can be any name, and it can be
  1079. // used to differentiate different builds within the same tree.
  1080. // However, don't define this to be '.', or you will be very sad the
  1081. // next time you run 'make clean'.
  1082. //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
  1083. // ODIR_SUFFIX is optional, usually empty
  1084. #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[ODIR_SUFFIX]
  1085. // What is the normal extension of a compiled object file?
  1086. #if $[WINDOWS_PLATFORM]
  1087. #define OBJ .obj
  1088. #else
  1089. #define OBJ .o
  1090. #endif
  1091. //////////////////////////////////////////////////////////////////////
  1092. // There are also some additional variables that control specific
  1093. // compiler/platform features or characteristics, defined in the
  1094. // platform specific file Config.platform.pp. Be sure to inspect
  1095. // these variables for correctness too.
  1096. //////////////////////////////////////////////////////////////////////