2
0

Config.pp 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  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. // gmsvc - Generate makefiles similar to the above, using Microsoft
  55. // Visual C++, but uses the Cygwin-supplied GNU make
  56. // instead of Microsoft nmake. This is potentially
  57. // faster if you have multiple CPU's, since it supports
  58. // distributed make. It's a tiny bit slower if you're
  59. // not taking advantage of distributed make, because of
  60. // the overhead associated with Cygwin fork() calls.
  61. #if $[eq $[PLATFORM], Win32]
  62. // #define BUILD_TYPE msvc // not ready yet.
  63. #define BUILD_TYPE gmsvc
  64. #elif $[eq $[PLATFORM], Cygwin]
  65. #define BUILD_TYPE gmsvc
  66. #elif $[eq $[PLATFORM], osx]
  67. #define BUILD_TYPE osx
  68. #else
  69. #define BUILD_TYPE unix
  70. #endif
  71. // What is the default install directory for all trees in the Panda
  72. // suite? The default value for this variable is provided by
  73. // ppremake; on Unix machines it is the value of --prefix passed in to
  74. // the configure script, and on Windows machines the default is
  75. // hardcoded in config_msvc.h to C:\Panda3d.
  76. // You may also override this for a particular tree by defining a
  77. // variable name like DTOOL_INSTALL or PANDA_INSTALL. (The
  78. // INSTALL_DIR variable will have no effect if you are using the
  79. // ctattach tools to control your attachment to the trees; but this
  80. // will be the case only if you are a member of the VR Studio.)
  81. // #define INSTALL_DIR /usr/local/panda
  82. // If you intend to use Panda only as a Python module, you may find
  83. // the following define useful (but you should put in the correct path
  84. // to site-packages within your own installed Python). This will
  85. // install the Panda libraries into the standard Python search space
  86. // so that they can be accessed as Python modules. (Also see the
  87. // PYTHON_IPATH variable, below.)
  88. // If you don't do this, you can still use Panda as a Python module,
  89. // but you must put /usr/local/panda/lib (or $INSTALL_DIR/lib) on
  90. // your PYTHONPATH.
  91. // #define INSTALL_LIB_DIR /usr/lib/python2.2/site-packages
  92. // The PRC files are used by Panda for runtime configuration. Panda
  93. // will load up all files named *.prc in the directory specified by
  94. // the PRC_DIR environment variable, or in the directory named here if
  95. // that environment variable is undefined. Config files are loaded up
  96. // in alphabetical order (sorted by ASCII value), and the
  97. // alphabetically last files have precedence.
  98. // By default, we specify the install/etc dir, which is where the
  99. // system-provided PRC files get copied to.
  100. #defer DEFAULT_PRC_DIR $[INSTALL_DIR]/etc
  101. // What level of compiler optimization/debug symbols should we build?
  102. // The various optimize levels are defined as follows:
  103. //
  104. // 1 - No compiler optimizations, full debug symbols
  105. // 2 - Full compiler optimizations, full debug symbols
  106. // (if the compiler supports this)
  107. // 3 - Full compiler optimizations, no debug symbols
  108. // 4 - Full optimizations, no debug symbols, and asserts removed
  109. //
  110. #define OPTIMIZE 3
  111. // NOTE: In the following, to indicate "yes" to a yes/no question,
  112. // define the variable to be a nonempty string. To indicate "no",
  113. // define the variable to be an empty string.
  114. // Many of the HAVE_* variables are defined in terms of expressions
  115. // based on the paths and library names, etc., defined above. These
  116. // are defined using the "defer" command, so that they are not
  117. // evaluated right away, giving the user an opportunity to redefine
  118. // the variables they depend on, or to redefine the HAVE_* variables
  119. // themselves (you can explicitly define a HAVE_* variable to some
  120. // nonempty string to force the package to be marked as installed).
  121. // Do you want to generate a Python-callable interrogate interface?
  122. // This is only necessary if you plan to make calls into Panda from a
  123. // program written in Python. This is done only if HAVE_PYTHON,
  124. // below, is also true.
  125. #define INTERROGATE_PYTHON_INTERFACE 1
  126. // Do you want to generate a C-callable interrogate interface? This
  127. // generates an interface similar to the Python interface above, with
  128. // a C calling convention. It should be useful for most other kinds
  129. // of scripting language; the VR Studio used to use this to make calls
  130. // into Panda from Squeak. This is not presently used by any VR
  131. // Studio code.
  132. #define INTERROGATE_C_INTERFACE
  133. // Do you even want to build interrogate at all? This is the program
  134. // that reads our C++ source files and generates one of the above
  135. // interfaces. If you won't be building the interfaces, you don't
  136. // need the program.
  137. #defer HAVE_INTERROGATE $[or $[INTERROGATE_PYTHON_INTERFACE],$[INTERROGATE_C_INTERFACE]]
  138. // What additional options should be passed to interrogate when
  139. // generating either of the above two interfaces? Generally, you
  140. // probably don't want to mess with this.
  141. #define INTERROGATE_OPTIONS -fnames -string -refcount -assert
  142. // What's the name of the interrogate binary to run? The default
  143. // specified is the one that is built as part of DTOOL. If you have a
  144. // prebuilt binary standing by (for instance, one built opt4), specify
  145. // its name instead.
  146. #define INTERROGATE interrogate
  147. #define INTERROGATE_MODULE interrogate_module
  148. // Is Python installed, and should Python interfaces be generated? If
  149. // Python is installed, which directory is it in?
  150. #define PYTHON_IPATH /usr/include/python2.2
  151. #define PYTHON_LPATH
  152. #define PYTHON_FPATH
  153. #define PYTHON_FRAMEWORK
  154. #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
  155. // Define the default set of libraries to be instrumented by
  156. // genPyCode. You may wish to add to this list to add your own
  157. // libraries, or if you want to use some of the more obscure
  158. // interfaces like libpandaegg and libpandafx.
  159. #define GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect
  160. // Normally, Python source files are copied into the INSTALL_LIB_DIR
  161. // defined above, along with the compiled C++ library objects, when
  162. // you make install. If you prefer not to copy these Python source
  163. // files, but would rather run them directly out of the source
  164. // directory (presumably so you can develop them and make changes
  165. // without having to reinstall), comment out this definition and put
  166. // your source directory on your PYTHONPATH.
  167. #define INSTALL_PYTHON_SOURCE 1
  168. // Do you want to enable the "in_interpreter" global variable? This
  169. // will enable some callbacks, particularly the MemoryUsage object, to
  170. // know whether they were called from Python code (or other high-level
  171. // show code) and react accordingly, generally for debugging
  172. // purporses. It adds a bit of runtime overhead, and isn't usually
  173. // useful unless we're building a debug tree anyway. The default is
  174. // to enable it only for optimize levels 1 and 2.
  175. #defer TRACK_IN_INTERPRETER $[<= $[OPTIMIZE], 2]
  176. // Do you want to compile in support for tracking memory usage? This
  177. // enables you to define the variable "track-memory-usage" at runtime
  178. // to help track memory leaks, and also report total memory usage on
  179. // PStats. There is some small overhead for having this ability
  180. // available, even if it is unused.
  181. #defer DO_MEMORY_USAGE $[<= $[OPTIMIZE], 3]
  182. // Do you want to compile in support for pipelining? This enables
  183. // setting and accessing multiple different copies of frame-specific
  184. // data stored in nodes, etc. At the moment, Panda cannot actually
  185. // take advantage of this support to do anything useful, but
  186. // eventually this will enable multi-stage pipelining of the render
  187. // process, as well as potentially remote rendering using a
  188. // distributed scene graph. For now, we enable this when building
  189. // optimize 1 only, since turning this on does perform some additional
  190. // sanity checks, but doesn't do anything else useful other than
  191. // increase run-time overhead.
  192. #defer DO_PIPELINING $[<= $[OPTIMIZE], 1]
  193. // Is NSPR installed, and where? This is the Netscape Portable
  194. // Runtime library, downloadable as part of the Mozilla package from
  195. // mozilla.org. It provides portable threading and networking
  196. // services to Panda. Panda should compile without it, although
  197. // without any threading or networking capabilities; eventually,
  198. // native support for these capabilities may be added for certain
  199. // platforms. See also HAVE_IPC and HAVE_NET.
  200. #define NSPR_IPATH /usr/include/nspr
  201. #define NSPR_LPATH
  202. #define NSPR_LIBS nspr4
  203. #defer HAVE_NSPR $[libtest $[NSPR_LPATH],$[NSPR_LIBS]]
  204. // Is a third-party STL library installed, and where? This is only
  205. // necessary if the default include and link lines that come with the
  206. // compiler don't provide adequate STL support. At least some form of
  207. // STL is absolutely required in order to build Panda.
  208. #define STL_IPATH
  209. #define STL_LPATH
  210. #define STL_CFLAGS
  211. #define STL_LIBS
  212. // Is OpenSSL installed, and where?
  213. #define SSL_IPATH /usr/local/ssl/include
  214. #define SSL_LPATH /usr/local/ssl/lib
  215. #define SSL_LIBS ssl crypto
  216. #defer HAVE_SSL $[libtest $[SSL_LPATH],$[SSL_LIBS]]
  217. // Define this nonempty if your version of OpenSSL is 0.9.7 or better.
  218. #define SSL_097
  219. // Define this true to include the OpenSSL code to report verbose
  220. // error messages when they occur.
  221. #defer REPORT_OPENSSL_ERRORS $[< $[OPTIMIZE], 4]
  222. // Is libjpeg installed, and where?
  223. #define JPEG_IPATH
  224. #define JPEG_LPATH
  225. #define JPEG_LIBS jpeg
  226. #defer HAVE_JPEG $[libtest $[JPEG_LPATH],$[JPEG_LIBS]]
  227. // Is libpng installed, and where?
  228. #define PNG_IPATH
  229. #define PNG_LPATH
  230. #define PNG_LIBS png
  231. #defer HAVE_PNG $[libtest $[PNG_LPATH],$[PNG_LIBS]]
  232. // Is libtiff installed, and where?
  233. #define TIFF_IPATH
  234. #define TIFF_LPATH
  235. #define TIFF_LIBS tiff z
  236. #defer HAVE_TIFF $[libtest $[TIFF_LPATH],$[TIFF_LIBS]]
  237. // Is libfftw installed, and where?
  238. #define FFTW_IPATH /usr/local/include
  239. #define FFTW_LPATH /usr/local/lib
  240. #define FFTW_LIBS rfftw fftw
  241. #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]]
  242. // Is NURBS++ installed, and where?
  243. #define NURBSPP_IPATH /usr/local/include/nurbs++
  244. #define NURBSPP_LPATH /usr/local/lib
  245. #define NURBSPP_LIBS nurbsf matrixN matrixI matrix
  246. #defer HAVE_NURBSPP $[libtest $[NURBSPP_LPATH],$[NURBSPP_LIBS]]
  247. // Is VRPN installed, and where?
  248. #define VRPN_IPATH
  249. #define VRPN_LPATH
  250. #define VRPN_LIBS
  251. #defer HAVE_VRPN $[libtest $[VRPN_LPATH],$[VRPN_LIBS]]
  252. // Is ZLIB installed, and where?
  253. #define ZLIB_IPATH
  254. #define ZLIB_LPATH
  255. #define ZLIB_LIBS z
  256. #defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
  257. // Is OpenGL installed, and where? This should include libGL as well
  258. // as libGLU, if they are in different places.
  259. #if $[WINDOWS_PLATFORM]
  260. #defer GL_IPATH
  261. #defer GL_LPATH
  262. #define GL_LIBS opengl32.lib glu32.lib
  263. #else
  264. #defer GL_IPATH
  265. #defer GL_LPATH /usr/X11R6/lib
  266. #defer GL_LIBS GL GLU
  267. #endif
  268. #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
  269. // Is Mesa installed separately from OpenGL? Mesa is an open-source
  270. // software-only OpenGL renderer. Panda can link with it
  271. // independently from OpenGL (and if Mesa is built statically, and/or
  272. // with -DUSE_MGL_NAMESPACE declared to rename gl* to mgl*, it can
  273. // switch between the system OpenGL implementation and the Mesa
  274. // implementation at runtime).
  275. // Also, Mesa includes some core libraries (in libOSMesa.so) that
  276. // allow totally headless rendering, handy if you want to run a
  277. // renderer as a batch service, and you don't want to insist that a
  278. // user be logged on to the desktop or otherwise deal with X11 or
  279. // Windows.
  280. // If you define HAVE_MESA here, and the appropriate paths to headers
  281. // and libraries, then Panda will build libmesadisplay, which can be
  282. // used in lieu of libpandagl or libpandadx to do rendering. However,
  283. // for most applications, you don't need to do this, since (a) if you
  284. // have hardware rendering capability, you probably don't want to use
  285. // Mesa, since it's software-only, and (b) if you don't have hardware
  286. // rendering, you can install Mesa as the system's OpenGL
  287. // implementation, so you can just use the normal libpandagl. You
  288. // only need to define HAVE_MESA if you want to run totally headless,
  289. // or if you want to be able to easily switch between Mesa and the
  290. // system OpenGL implementation at runtime. If you compiled Mesa with
  291. // USE_MGL_NAMESPACE defined, define MESA_MGL here.
  292. #define MESA_IPATH
  293. #define MESA_LPATH
  294. #define MESA_LIBS
  295. #define MESA_MGL
  296. #defer HAVE_MESA $[libtest $[MESA_LPATH],$[MESA_LIBS]]
  297. // Is the Chromium remote-rendering library installed, and where?
  298. // This should include libcr_opengl32.
  299. #defer CHROMIUM_IPATH
  300. #defer CHROMIUM_LPATH
  301. #defer CHROMIUM_LIBS
  302. #defer HAVE_CHROMIUM $[libtest $[CHROMIUM_LPATH],$[CHROMIUM_LIBS]]
  303. // How about GLX?
  304. #define GLX_IPATH
  305. #define GLX_LPATH
  306. #defer HAVE_GLX $[and $[HAVE_GL],$[UNIX_PLATFORM]]
  307. // Should we try to build the WGL interface?
  308. #defer HAVE_WGL $[and $[HAVE_GL],$[WINDOWS_PLATFORM]]
  309. // Should we try to build the SGI-specific glxdisplay?
  310. #define HAVE_SGIGL $[eq $[PLATFORM],Irix]
  311. // Is DirectX available, and should we try to build with it?
  312. #define DX_IPATH
  313. #define DX_LPATH
  314. #define DX_LIBS d3d8.lib d3dx8.lib dxerr8.lib
  315. #defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
  316. // Do you want to build the DirectD tools for starting Panda clients
  317. // remotely? This only affects the direct tree. Enabling this may
  318. // cause libdirect.dll to fail to load on Win98 clients.
  319. #define HAVE_DIRECTD
  320. // Do you want to build in support for threading (multiprocessing)?
  321. // Building in support for threading will enable Panda to take
  322. // advantage of multiple CPU's if you have them (and if the OS
  323. // supports kernel threads running on different CPU's), but it will
  324. // slightly slow down Panda for the single CPU case, so this is not
  325. // enabled by default.
  326. // Currently, threading support requires NSPR, so you should not
  327. // define this true unless you have NSPR installed.
  328. #define HAVE_THREADS
  329. // Do you want to build the network interface? What additional libraries
  330. // are required? Currently, this requires NSPR.
  331. #define NET_IPATH
  332. #define NET_LPATH
  333. #if $[WINDOWS_PLATFORM]
  334. #define NET_LIBS wsock32.lib
  335. #else
  336. #define NET_LIBS
  337. #endif
  338. #defer HAVE_NET $[HAVE_NSPR]
  339. // Do you want to build the PStats interface, for graphical run-time
  340. // performance statistics? This requires NET to be available. By
  341. // default, we don't build PStats when OPTIMIZE = 4, although this is
  342. // possible.
  343. #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]]
  344. // Do you want to build the debugging tools for recording and
  345. // visualizing intersection tests by the collision system? Enabling
  346. // this increases runtime collision overhead just a tiny bit.
  347. #defer DO_COLLISION_RECORDING $[< $[OPTIMIZE], 4]
  348. // Do you want to include the "debug" and "spam" Notify messages?
  349. // Normally, these are stripped out when we build with OPTIMIZE = 4, but
  350. // sometimes it's useful to keep them around. Redefine this in your
  351. // own Config.pp to achieve that.
  352. #defer NOTIFY_DEBUG $[< $[OPTIMIZE], 4]
  353. // Do you want to build the audio interface?
  354. #define HAVE_AUDIO 1
  355. // Info for the RAD game tools, Miles Sound System
  356. // note this may be overwritten in wintools Config.pp
  357. #define RAD_MSS_IPATH /usr/include/Miles6/include
  358. #define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
  359. #define RAD_MSS_LIBS Mss32
  360. #defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
  361. // Info for the Fmod audio engine
  362. // note this may be overwritten in wintools Config.pp
  363. #define FMOD_IPATH
  364. #define FMOD_LPATH
  365. #define FMOD_LIBS fmod
  366. #defer HAVE_FMOD $[libtest $[FMOD_LPATH],$[FMOD_LIBS]]
  367. // Info for http://www.sourceforge.net/projects/chromium
  368. // note this may be overwritten in wintools Config.pp
  369. #define CHROMIUM_IPATH /usr/include/chromium/include
  370. #define CHROMIUM_LPATH /usr/lib/chromium/bin/WINT_NT
  371. #define CHROMIUM_LIBS spuload
  372. #defer HAVE_CHROMIUM $[libtest $[CHROMIUM_LPATH],$[CHROMIUM_LIBS]]
  373. // Is Gtk-- installed? How should we run the gtkmm-config program?
  374. // This matters only to programs in PANDATOOL.
  375. #define GTKMM_CONFIG gtkmm-config
  376. #defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]]
  377. // Do we have Freetype 2.0 (or better)? If available, this package is
  378. // used to generate dynamic in-the-world text from font files.
  379. // On Unix, freetype comes with the freetype-config executable, which
  380. // tells us where to look for the various files. On Windows, we need to
  381. // supply this information explicitly.
  382. #define FREETYPE_CONFIG freetype-config
  383. #defer HAVE_FREETYPE $[or $[libtest $[FREETYPE_LPATH],$[FREETYPE_LIBS]],$[bintest $[FREETYPE_CONFIG]]]
  384. #define FREETYPE_CFLAGS
  385. #define FREETYPE_IPATH
  386. #define FREETYPE_LPATH
  387. #define FREETYPE_LIBS
  388. // Define this true to compile in a default font, so every TextNode
  389. // will always have a font available without requiring the user to
  390. // specify one. Define it empty not to do this, saving a few
  391. // kilobytes on the generated library. Sorry, you can't pick a
  392. // particular font to be the default; it's hardcoded in the source
  393. // (although you can use the text-default-font prc variable to specify
  394. // a particular font file to load as the default, overriding the
  395. // compiled-in font).
  396. #define COMPILE_IN_DEFAULT_FONT 1
  397. // Is Maya installed? This matters only to programs in PANDATOOL.
  398. // Also, as of Maya 5.0 it seems the Maya library will not compile
  399. // properly with optimize level 4 set (we get link errors with ostream).
  400. #define MAYA_LOCATION /usr/aw/maya
  401. #defer MAYA_LIBS $[if $[WINDOWS_PLATFORM],Foundation.lib OpenMaya.lib OpenMayaAnim.lib,Foundation OpenMaya OpenMayaAnim]
  402. // Optionally define this to the value of LM_LICENSE_FILE that should
  403. // be set before invoking Maya.
  404. #define MAYA_LICENSE_FILE
  405. #defer HAVE_MAYA $[and $[<= $[OPTIMIZE], 3],$[isdir $[MAYA_LOCATION]/include/maya]]
  406. // Define this if your version of Maya is earlier than 5.0 (e.g. Maya 4.5).
  407. #define MAYA_PRE_5_0
  408. // In the same fashion as mayaegg converter above, set softimage to egg converter as well
  409. #define SOFTIMAGE_LOCATION /c/Softimage/sdk_18sp2/SDK_1.8SP2/SAAPHIRE
  410. #defer SOFTIMAGE_LIBS SAA.lib
  411. #defer HAVE_SOFTIMAGE $[isdir $[SOFTIMAGE_LOCATION]/h]
  412. // Define this to generate static libraries and executables, rather than
  413. // dynamic libraries.
  414. //#define LINK_ALL_STATIC yes
  415. // Define this to export the templates from the DLL. This is only
  416. // meaningful if LINK_ALL_STATIC is not defined, and we are building
  417. // on Windows. Some Windows compilers may not support this syntax.
  418. #defer EXPORT_TEMPLATES yes
  419. // Define this to explicitly link in the various external drivers, which
  420. // are normally separate, as part of the Panda library.
  421. //#define LINK_IN_GL yes
  422. //#define LINK_IN_DX yes
  423. //#define LINK_IN_EGG yes
  424. //#define LINK_IN_PHYSICS yes
  425. // Define USE_COMPILER to switch the particular compiler that should
  426. // be used. A handful of tokens are recognized, depending on BUILD_TYPE.
  427. // This may also be further customized within Global.$[BUILD_TYPE].pp.
  428. // If BUILD_TYPE is "unix", this may be one of:
  429. // GCC (gcc/g++)
  430. // MIPS (Irix MIPSPro compiler)
  431. //
  432. // If BUILD_TYPE is "msvc" or "gmsvc", this may be one of:
  433. // MSVC (Microsoft Visual C++ 6.0)
  434. // MSVC7 (Microsoft Visual C++ 7.0)
  435. // BOUNDS (BoundsChecker)
  436. // INTEL (Intel C/C++ compiler)
  437. #if $[WINDOWS_PLATFORM]
  438. #if $[eq $[USE_COMPILER],]
  439. #define USE_COMPILER MSVC7
  440. #endif
  441. #elif $[eq $[PLATFORM], Irix]
  442. #define USE_COMPILER MIPS
  443. #elif $[eq $[PLATFORM], Linux]
  444. #define USE_COMPILER GCC
  445. #elif $[eq $[PLATFORM], osx]
  446. #define USE_COMPILER GCC
  447. #endif
  448. // Permission masks to install data and executable files,
  449. // respectively. This is only meaningful for Unix systems.
  450. #define INSTALL_UMASK_DATA 644
  451. #define INSTALL_UMASK_PROG 755
  452. // How to invoke bison and flex. Panda takes advantage of some
  453. // bison/flex features, and therefore specifically requires bison and
  454. // flex, not some other versions of yacc and lex. However, you only
  455. // need to have these programs if you need to make changes to the
  456. // bison or flex sources (see the next point, below).
  457. #defer BISON bison
  458. #defer FLEX flex
  459. // You may not even have bison and flex installed. If you don't, no
  460. // sweat; Panda ships with the pre-generated output of these programs,
  461. // so you don't need them unless you want to make changes to the
  462. // grammars themselves (files named *.yxx or *.lxx).
  463. #defer HAVE_BISON $[bintest $[BISON]]
  464. // How to invoke sed. A handful of make rules use this. Since some
  465. // platforms (specifically, non-Unix platforms like Windows) don't
  466. // have any kind of sed, ppremake performs some limited sed-like
  467. // functions. The default is to use ppremake in this capacity. In
  468. // this variable, $[source] is the name of the file to read, $[target]
  469. // is the name of the file to generate, and $[script] is the one-line
  470. // sed script to run.
  471. #defer SED ppremake -s "$[script]" <$[source] >$[target]
  472. // What directory name (within each source directory) should the .o
  473. // (or .obj) files be written to? This can be any name, and it can be
  474. // used to differentiate different builds within the same tree.
  475. // However, don't define this to be '.', or you will be very sad the
  476. // next time you run 'make clean'.
  477. //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
  478. // ODIR_SUFFIX is optional, usually empty
  479. #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[ODIR_SUFFIX]
  480. // What is the normal extension of a compiled object file?
  481. #if $[WINDOWS_PLATFORM]
  482. #define OBJ .obj
  483. #else
  484. #define OBJ .o
  485. #endif
  486. ///////////////////////////////////////////////////////////////////////
  487. // The following variables are only meaningful when BUILD_TYPE is
  488. // "unix". These define the commands to invoke the compiler, linker,
  489. // etc.
  490. //////////////////////////////////////////////////////////////////////
  491. // How to invoke the C and C++ compilers.
  492. #if $[eq $[USE_COMPILER], GCC]
  493. #define CC gcc
  494. #define CXX g++
  495. // gcc might run into template limits on some parts of Panda.
  496. // I upped this from 25 to build on OS X (GCC 3.3) -- skyler.
  497. #define C++FLAGS_GEN -ftemplate-depth-30
  498. #else
  499. #define CC cc
  500. #define CXX CC
  501. #endif
  502. // How to compile a C or C++ file into a .o file. $[target] is the
  503. // name of the .o file, $[source] is the name of the source file,
  504. // $[ipath] is a space-separated list of directories to search for
  505. // include files, and $[flags] is a list of additional flags to pass
  506. // to the compiler.
  507. #defer COMPILE_C $[CC] $[CFLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  508. #defer COMPILE_C++ $[CXX] $[C++FLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  509. // What flags should be passed to both C and C++ compilers to enable
  510. // compiler optimizations? This will be supplied when OPTIMIZE
  511. // (above) is set to 2, 3, or 4.
  512. #defer OPTFLAGS -O2
  513. // What define variables should be passed to the compilers for each
  514. // value of OPTIMIZE? We separate this so we can pass these same
  515. // options to interrogate, guaranteeing that the correct interfaces
  516. // are generated. Do not include -D here; that will be supplied
  517. // automatically.
  518. #defer CDEFINES_OPT1 _DEBUG $[EXTRA_CDEFS]
  519. #defer CDEFINES_OPT2 _DEBUG $[EXTRA_CDEFS]
  520. #defer CDEFINES_OPT3 $[EXTRA_CDEFS]
  521. #defer CDEFINES_OPT4 NDEBUG $[EXTRA_CDEFS]
  522. // What additional flags should be passed for each value of OPTIMIZE
  523. // (above)? We separate out the compiler-optimization flags, above,
  524. // so we can compile certain files that give optimizers trouble (like
  525. // the output of lex and yacc) without them, but with all the other
  526. // relevant flags.
  527. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall -g
  528. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall -g $[OPTFLAGS]
  529. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[OPTFLAGS]
  530. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[OPTFLAGS]
  531. // What additional flags should be passed to both compilers when
  532. // building shared (relocatable) sources? Some architectures require
  533. // special support for this.
  534. #defer CFLAGS_SHARED -fPIC
  535. // How to generate a C or C++ executable from a collection of .o
  536. // files. $[target] is the name of the binary to generate, and
  537. // $[sources] is the list of .o files. $[libs] is a space-separated
  538. // list of dependent libraries, and $[lpath] is a space-separated list
  539. // of directories in which those libraries can be found.
  540. #defer LINK_BIN_C $[cc_ld] -o $[target] $[sources] $[flags] $[lpath:%=-L%] $[libs:%=-l%]\
  541. $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[frameworks]]
  542. #defer LINK_BIN_C++ $[cxx_ld]\
  543. -o $[target] $[sources]\
  544. $[flags]\
  545. $[lpath:%=-L%] $[libs:%=-l%]\
  546. $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[frameworks]]
  547. // How to generate a static C or C++ library. $[target] is the
  548. // name of the library to generate, and $[sources] is the list of .o
  549. // files that will go into the library.
  550. #if $[eq $[PLATFORM], osx]
  551. #defer STATIC_LIB_C libtool -static -o $[target] $[sources]
  552. #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources]
  553. #else
  554. #defer STATIC_LIB_C ar cru $[target] $[sources]
  555. #defer STATIC_LIB_C++ ar cru $[target] $[sources]
  556. #endif
  557. // How to run ranlib, if necessary, after generating a static library.
  558. // $[target] is the name of the library. Set this to the empty string
  559. // if ranlib is not necessary on your platform.
  560. #defer RANLIB ranlib $[target]
  561. // How to generate a shared C or C++ library. $[source] and $[target]
  562. // as above, and $[libs] is a space-separated list of dependent
  563. // libraries, and $[lpath] is a space-separated list of directories in
  564. // which those libraries can be found.
  565. #if $[eq $[PLATFORM], osx]
  566. #defer SHARED_LIB_C $[cc_ld] -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]]
  567. #defer SHARED_LIB_C++ $[cxx_ld] -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]]
  568. #else
  569. #defer SHARED_LIB_C $[cc_ld] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  570. #defer SHARED_LIB_C++ $[cxx_ld] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  571. #endif
  572. // How to install a data file or executable file. $[local] is the
  573. // local name of the file to install, and $[dest] is the name of the
  574. // directory to put it in.
  575. // On Unix systems, we strongly prefer using the install program to
  576. // install files. This has nice features like automatically setting
  577. // the permissions bits, and also is usually clever enough to install
  578. // a running program without crashing the running instance. However,
  579. // it doesn't understanding installing a program from a subdirectory,
  580. // so we have to cd into the source directory first.
  581. #defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] $[notdir $[local]] $[dest]/
  582. #defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] $[notdir $[local]] $[dest]/
  583. // Variable definitions for building with the Irix MIPSPro compiler.
  584. #if $[eq $[USE_COMPILER], MIPS]
  585. #define CC cc -n32 -mips3
  586. #define CXX CC -n32 -mips3
  587. // Turn off a few annoying warning messages.
  588. // 1174 - function 'blah' was declared but never used
  589. // 1201 - trailing comma is nonstandard.
  590. // 1209 - controlling expression is constant, e.g. if (0) { ... }
  591. // 1234 - access control not specified, 'public' by default
  592. // 1355 - extra ";" ignored
  593. // 1375 - destructor for base class is not virtual.
  594. // this one actually is bad. But we got alot of them from the classes
  595. // that we've derived from STL collections. Beware of this.
  596. // 3322 - omission of explicit type is nonstandard ("int" assumed)
  597. #define WOFF_LIST -woff 1174,1201,1209,1234,1355,1375,3322
  598. // Linker warnings
  599. // 85 - definition of SOMESYMBOL in SOMELIB preempts that of definition in
  600. // SOMEOTHERLIB.
  601. #define WOFF_LIST $[WOFF_LIST] -Wl,-LD_MSG:off=85
  602. #defer OPTFLAGS -O2 -OPT:Olimit=2500
  603. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] $[WOFF_LIST] -g
  604. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] $[WOFF_LIST]
  605. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[WOFF_LIST]
  606. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[WOFF_LIST]
  607. #defer CFLAGS_SHARED
  608. #defer STATIC_LIB_C $[CC] -ar -o $[target] $[sources]
  609. #defer STATIC_LIB_C++ $[CXX] -ar -o $[target] $[sources]
  610. #defer RANLIB
  611. #define SHARED_FLAGS -Wl,-none -Wl,-update_registry,$[TOPDIR]/so_locations
  612. #defer SHARED_LIB_C $[cc_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  613. #defer SHARED_LIB_C++ $[cxx_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  614. #endif
  615. //////////////////////////////////////////////////////////////////////
  616. // There are also some additional variables that control specific
  617. // compiler/platform features or characteristics, defined in the
  618. // platform specific file Config.platform.pp. Be sure to inspect
  619. // these variables for correctness too.
  620. //////////////////////////////////////////////////////////////////////