Config.pp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. //
  2. // 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. //
  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 makefiles suitable for building on Windows platforms
  54. // (e.g. Windows NT, Windows 2000) using the Microsoft Visual C++
  55. // command-line compiler and Microsoft nmake.
  56. // gmsvc - Generate makefiles similar to the above, using Microsoft
  57. // Visual C++, but uses the Cygwin-supplied GNU make
  58. // instead of Microsoft nmake. This is potentially
  59. // faster if you have multiple CPU's, since it supports
  60. // distributed make. It's a tiny bit slower if you're
  61. // not taking advantage of distributed make, because of
  62. // the overhead associated with Cygwin fork() calls.
  63. #if $[eq $[PLATFORM],Win32]
  64. #define BUILD_TYPE gmsvc
  65. #else
  66. #define BUILD_TYPE unix
  67. #endif
  68. // What is the default install directory for all trees in the Panda
  69. // suite? You may also override this for a particular tree by
  70. // defining a variable name like DTOOL_INSTALL or PANDA_INSTALL. This
  71. // variable will have no effect when you are using the cttools to
  72. // control your attachment to the trees; in this case, the install
  73. // directory for each tree will by default be the root of the tree
  74. // itself (although this may be overridden).
  75. #define INSTALL_DIR /usr/local/panda
  76. // What level of compiler optimization/debug symbols should we build?
  77. // The various optimize levels are defined as follows:
  78. //
  79. // 1 - No compiler optimizations, full debug symbols
  80. // 2 - Full compiler optimizations, full debug symbols
  81. // (if the compiler supports this)
  82. // 3 - Full compiler optimizations, no debug symbols
  83. // 4 - Full optimizations, no debug symbols, and asserts removed
  84. //
  85. // NOTE: In the following, to indicate "yes" to a yes/no question,
  86. // define the variable to be a nonempty string. To indicate "no",
  87. // define the variable to be an empty string.
  88. // Many of the HAVE_* variables are defined in terms of expressions
  89. // based on the paths and library names, etc., defined above. These
  90. // are defined using the "defer" command, so that they are not
  91. // evaluated right away, giving the user an opportunity to redefine
  92. // the variables they depend on, or to redefine the HAVE_* variables
  93. // themselves (you can explicitly define a HAVE_* variable to some
  94. // nonempty string to force the package to be marked as installed).
  95. // Do you want to generate a Python-callable interrogate interface?
  96. // This is only necessary if you plan to make calls into Panda from a
  97. // program written in Python. This is done only if HAVE_PYTHON,
  98. // below, is also true.
  99. #define INTERROGATE_PYTHON_INTERFACE 1
  100. // Do you want to generate a C-callable interrogate interface? This
  101. // generates an interface similar to the Python interface above, with
  102. // a C calling convention. It should be useful for most other kinds
  103. // of scripting language; the VR Studio used to use this to make calls
  104. // into Panda from Squeak. This is not presently used by any VR
  105. // Studio code.
  106. #define INTERROGATE_C_INTERFACE
  107. // Do you even want to build interrogate at all? This is the program
  108. // that reads our C++ source files and generates one of the above
  109. // interfaces. If you won't be building the interfaces, you don't
  110. // need the program.
  111. #defer HAVE_INTERROGATE $[or $[INTERROGATE_PYTHON_INTERFACE],$[INTERROGATE_C_INTERFACE]]
  112. // What additional options should be passed to interrogate when
  113. // generating either of the above two interfaces? Generally, you
  114. // probably don't want to mess with this.
  115. #define INTERROGATE_OPTIONS -fnames -string -refcount -assert
  116. // What's the name of the interrogate binary to run? The default
  117. // specified is the one that is built as part of DTOOL. If you have a
  118. // prebuilt binary standing by (for instance, one built opt4), specify
  119. // its name instead.
  120. #define INTERROGATE interrogate
  121. #define INTERROGATE_MODULE interrogate_module
  122. // Is Python installed, and should Python interfaces be generated? If
  123. // Python is installed, which directory is it in? (If the directory
  124. // is someplace standard like /usr/include, you may leave it blank.)
  125. #define PYTHON_IPATH /usr/local/include/python1.6
  126. #define PYTHON_LPATH
  127. #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]]
  128. // Do you want to enable the "in_interpreter" global variable? This
  129. // will enable some callbacks, particularly the MemoryUsage object, to
  130. // know whether they were called from Python code (or other high-level
  131. // show code) and react accordingly, generally for debugging
  132. // purporses. It adds a bit of runtime overhead, and isn't usually
  133. // useful unless we're building a debug tree anyway. The default is
  134. // to enable it only for optimize levels 1 and 2.
  135. #defer TRACK_IN_INTERPRETER $[<= $[OPTIMIZE], 2]
  136. // Do you want to compile in support for pipelining? This enables
  137. // setting and accessing multiple different copies of frame-specific
  138. // data stored in nodes, etc. At the moment, Panda cannot actually
  139. // take advantage of this support to do anything useful, but
  140. // eventually this will enable multi-stage pipelining of the render
  141. // process, as well as potentially remote rendering using a
  142. // distributed scene graph. For now, we enable this when building
  143. // optimize 1 only, since turning this on does perform some additional
  144. // sanity checks, but doesn't do anything else useful other than
  145. // increase run-time overhead.
  146. #define DO_PIPELINING $[<= $[OPTIMIZE], 1]
  147. // Is NSPR installed, and where? This is the Netscape Portable
  148. // Runtime library, downloadable as part of the Mozilla package from
  149. // mozilla.org. It provides portable threading and networking
  150. // services to Panda. Panda should compile without it, although
  151. // without any threading or networking capabilities; eventually,
  152. // native support for these capabilities may be added for certain
  153. // platforms. See also HAVE_IPC and HAVE_NET.
  154. #define NSPR_IPATH /usr/include/nspr
  155. #define NSPR_LPATH
  156. #define NSPR_LIBS nspr4
  157. #defer HAVE_NSPR $[libtest $[NSPR_LPATH],$[NSPR_LIBS]]
  158. // Is a third-party STL library installed, and where? This is only
  159. // necessary if the default include and link lines that come with the
  160. // compiler don't provide adequate STL support. At least some form of
  161. // STL is absolutely required in order to build Panda.
  162. #define STL_IPATH
  163. #define STL_LPATH
  164. #define STL_CFLAGS
  165. #define STL_LIBS
  166. // Is Crypto++ installed, and where?
  167. #define CRYPTO_IPATH /usr/include/crypto++
  168. #define CRYPTO_LPATH /usr/lib
  169. #define CRYPTO_LIBS cryptlib
  170. #defer HAVE_CRYPTO $[libtest $[CRYPTO_LPATH],$[CRYPTO_LIBS]]
  171. // Is libjpeg installed, and where?
  172. #define JPEG_IPATH
  173. #define JPEG_LPATH
  174. #define JPEG_LIBS jpeg
  175. #defer HAVE_JPEG $[libtest $[JPEG_LPATH],$[JPEG_LIBS]]
  176. // Is libtiff installed, and where?
  177. #define TIFF_IPATH
  178. #define TIFF_LPATH
  179. #define TIFF_LIBS tiff
  180. #defer HAVE_TIFF $[libtest $[TIFF_LPATH],$[TIFF_LIBS]]
  181. // Is libfftw installed, and where?
  182. #define FFTW_IPATH /usr/local/include
  183. #define FFTW_LPATH /usr/local/lib
  184. #define FFTW_LIBS rfftw fftw
  185. #defer HAVE_FFTW $[libtest $[FFTW_LPATH],$[FFTW_LIBS]]
  186. // Is NURBS++ installed, and where?
  187. #define NURBSPP_IPATH /usr/local/include/nurbs++
  188. #define NURBSPP_LPATH /usr/local/lib
  189. #define NURBSPP_LIBS nurbsf matrixN matrixI matrix
  190. #defer HAVE_NURBSPP $[libtest $[NURBSPP_LPATH],$[NURBSPP_LIBS]]
  191. // Is VRPN installed, and where?
  192. #define VRPN_IPATH
  193. #define VRPN_LPATH
  194. #define VRPN_LIBS
  195. #defer HAVE_VRPN $[libtest $[VRPN_LPATH],$[VRPN_LIBS]]
  196. // Is ZLIB installed, and where?
  197. #define ZLIB_IPATH
  198. #define ZLIB_LPATH
  199. #define ZLIB_LIBS z
  200. #defer HAVE_ZLIB $[libtest $[ZLIB_LPATH],$[ZLIB_LIBS]]
  201. // Is the sox libst library installed, and where?
  202. #define SOXST_IPATH
  203. #define SOXST_LPATH
  204. #define SOXST_LIBS st
  205. #defer HAVE_SOXST $[libtest $[SOXST_LPATH],$[SOXST_LIBS]]
  206. // Is OpenGL installed, and where? This should include libGL as well
  207. // as libGLU, if they are in different places.
  208. #defer GL_IPATH
  209. #defer GL_LPATH /usr/X11R6/lib
  210. #defer GL_LIBS GL GLU
  211. #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
  212. // How about GLX?
  213. #define GLX_IPATH
  214. #define GLX_LPATH
  215. #defer HAVE_GLX $[HAVE_GL]
  216. // Glut?
  217. #define GLUT_IPATH
  218. #define GLUT_LPATH
  219. #define GLUT_LIBS glut
  220. #defer HAVE_GLUT $[libtest $[GLUT_LPATH],$[GLUT_LIBS]]
  221. // Should we try to build the WGL interface?
  222. #define HAVE_WGL $[eq $[PLATFORM],Win32]
  223. // Should we try to build the SGI-specific glxdisplay?
  224. #define HAVE_SGIGL $[eq $[PLATFORM],Irix]
  225. // Is DirectX available, and should we try to build with it?
  226. #define DX_IPATH
  227. #define DX_LPATH
  228. #define DX_LIBS
  229. #defer HAVE_DX $[libtest $[DX_LPATH],$[DX_LIBS]]
  230. // Do you want to build the Renderman interface?
  231. #define HAVE_RIB
  232. // Is Mikmod installed? How should we run the libmikmod-config program?
  233. #define MIKMOD_CONFIG libmikmod-config
  234. #defer HAVE_MIKMOD $[bintest $[MIKMOD_CONFIG]]
  235. // Do you want to build in support for threading (inter-process
  236. // control)? What additional libraries are required? Currently, this
  237. // requires NSPR to compile correctly.
  238. #define IPC_IPATH
  239. #define IPC_LPATH
  240. #define IPC_LIBS
  241. #defer HAVE_IPC $[HAVE_NSPR]
  242. // Do you want to build the network interface? What additional libraries
  243. // are required? Currently, this requires NSPR.
  244. #define NET_IPATH
  245. #define NET_LPATH
  246. #if $[eq $[PLATFORM],Win32]
  247. #define NET_LIBS wsock32.lib
  248. #else
  249. #define NET_LIBS
  250. #endif
  251. #defer HAVE_NET $[HAVE_NSPR]
  252. // Do you want to build the PStats interface, for graphical run-time
  253. // performance statistics? This requires NET to be available. By
  254. // default, we don't build PStats when OPTIMIZE = 4, although this is
  255. // possible.
  256. #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]]
  257. // Do you want to include the "debug" and "spam" Notify messages?
  258. // Normally, these are stripped out when we build with OPTIMIZE = 4, but
  259. // sometimes it's useful to keep them around. Redefine this in your
  260. // own Config.pp to achieve that.
  261. #defer NOTIFY_DEBUG $[< $[OPTIMIZE], 4]
  262. // Do you want to build the audio interface?
  263. #define HAVE_AUDIO 1
  264. // Info for the RAD game tools, Miles Sound System
  265. // note this may be overwritten in wintools Config.pp
  266. #define RAD_MSS_IPATH /usr/include/Miles6/include
  267. #define RAD_MSS_LPATH /usr/lib/Miles6/lib/win
  268. #define RAD_MSS_LIBS Mss32
  269. #defer HAVE_RAD_MSS $[libtest $[RAD_MSS_LPATH],$[RAD_MSS_LIBS]]
  270. // Is Gtk-- installed? How should we run the gtkmm-config program?
  271. // This matters only to programs in PANDATOOL.
  272. #define GTKMM_CONFIG gtkmm-config
  273. #defer HAVE_GTKMM $[bintest $[GTKMM_CONFIG]]
  274. // Do we have Freetype 2.0 (or better)? If available, this package is
  275. // used to generate dynamic in-the-world text from font files.
  276. // On Unix, freetype comes with the freetype-config executable, which
  277. // tells us where to look for the various files. On Windows, we need to
  278. // supply this information explicitly.
  279. #define FREETYPE_CONFIG freetype-config
  280. #defer HAVE_FREETYPE $[bintest $[FREETYPE_CONFIG]]
  281. #define FREETYPE_CFLAGS
  282. #define FREETYPE_IPATH
  283. #define FREETYPE_LPATH
  284. #define FREETYPE_LIBS
  285. // Is Maya installed? This matters only to programs in PANDATOOL.
  286. #define MAYA_LOCATION /usr/aw/maya3.0
  287. #defer HAVE_MAYA $[isdir $[MAYA_LOCATION]]
  288. // Define this to generate static libraries and executables, rather than
  289. // dynamic libraries.
  290. //#define LINK_ALL_STATIC yes
  291. // Define this to export the templates from the DLL. This is only
  292. // meaningful if LINK_ALL_STATIC is not defined, and we are building
  293. // on Windows. Some Windows compilers may not support this syntax.
  294. #defer EXPORT_TEMPLATES yes
  295. // Define this to explicitly link in the various external drivers, which
  296. // are normally separate, as part of the Panda library.
  297. //#define LINK_IN_GL yes
  298. //#define LINK_IN_DX yes
  299. //#define LINK_IN_EGG yes
  300. //#define LINK_IN_PHYSICS yes
  301. // Define USE_COMPILER to switch the particular compiler that should
  302. // be used. A handful of tokens are recognized, depending on BUILD_TYPE.
  303. // This may also be further customized within Global.$[BUILD_TYPE].pp.
  304. // If BUILD_TYPE is "unix", this may be one of:
  305. // GCC (gcc/g++)
  306. // MIPS (Irix MIPSPro compiler)
  307. //
  308. // If BUILD_TYPE is "msvc" or "gmsvc", this may be one of:
  309. // MSVC (Microsoft Visual C++ 6.0)
  310. // MSVC7 (Microsoft Visual C++ 7.0)
  311. // BOUNDS (BoundsChecker)
  312. // INTEL (Intel C/C++ compiler)
  313. #if $[eq $[PLATFORM], Win32]
  314. #if $[eq $[USE_COMPILER],]
  315. #define USE_COMPILER MSVC
  316. #endif
  317. #elif $[eq $[PLATFORM], Irix]
  318. #define USE_COMPILER MIPS
  319. #elif $[eq $[PLATFORM], Linux]
  320. #define USE_COMPILER GCC
  321. #endif
  322. ///////////////////////////////////////////////////////////////////////
  323. // The following variables are meaningful when BUILD_TYPE is "unix" or
  324. // "msvc". They define a few environmental things.
  325. //////////////////////////////////////////////////////////////////////
  326. // How to invoke bison and flex. Panda takes advantage of some
  327. // bison/flex features, and therefore specifically requires bison and
  328. // flex, not some other versions of yacc and lex. You can build Panda
  329. // without having bison or flex, but only if you obtained Panda from a
  330. // tarball or zip archive that included the source files generated by
  331. // bison and flex, and only if you do not modify any bison or flex
  332. // sources.
  333. #defer BISON bison
  334. #defer FLEX flex
  335. // How to invoke sed. A handful of make rules use this. Since some
  336. // platforms (specifically, non-Unix platforms like Windows) don't
  337. // have any kind of sed, ppremake performs some limited sed-like
  338. // functions. The default is to use ppremake in this capacity. In
  339. // this variable, $[source] is the name of the file to read, $[target]
  340. // is the name of the file to generate, and $[script] is the one-line
  341. // sed script to run.
  342. #defer SED ppremake -s '$[script]' <$[source] >$[target]
  343. // What directory name (within each source directory) should the .o
  344. // (or .obj) files be written to, for both shared and static sources?
  345. // In general, it is safe to define these to be the same. However,
  346. // don't define these to be '.', or you will be very sad the next time
  347. // you run 'make clean'.
  348. //#defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]$[USE_COMPILER]
  349. #defer ODIR Opt$[OPTIMIZE]-$[PLATFORM]
  350. #defer ODIR_SHARED $[ODIR]
  351. #defer ODIR_STATIC $[ODIR]
  352. ///////////////////////////////////////////////////////////////////////
  353. // The following variables are only meaningful when BUILD_TYPE is
  354. // "unix". These define the commands to invoke the compiler, linker,
  355. // etc.
  356. //////////////////////////////////////////////////////////////////////
  357. // How to invoke the C and C++ compilers.
  358. #if $[eq $[USE_COMPILER], GCC]
  359. #define CC gcc
  360. #define CXX g++
  361. // gcc might run into template limits on some parts of Panda.
  362. #define C++FLAGS_GEN -ftemplate-depth-20
  363. #else
  364. #define CC cc
  365. #define CXX CC
  366. #endif
  367. // How to compile a C or C++ file into a .o file. $[target] is the
  368. // name of the .o file, $[source] is the name of the source file,
  369. // $[ipath] is a space-separated list of directories to search for
  370. // include files, and $[flags] is a list of additional flags to pass
  371. // to the compiler.
  372. #defer COMPILE_C $[CC] $[CFLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  373. #defer COMPILE_C++ $[CXX] $[C++FLAGS_GEN] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
  374. // What flags should be passed to both C and C++ compilers to enable
  375. // compiler optimizations? This will be supplied when OPTIMIZE
  376. // (above) is set to 2, 3, or 4.
  377. #defer OPTFLAGS -O2
  378. // What define variables should be passed to the compilers for each
  379. // value of OPTIMIZE? We separate this so we can pass these same
  380. // options to interrogate, guaranteeing that the correct interfaces
  381. // are generated. Do not include -D here; that will be supplied
  382. // automatically.
  383. #defer CDEFINES_OPT1 _DEBUG
  384. #defer CDEFINES_OPT2 _DEBUG
  385. #defer CDEFINES_OPT3
  386. #defer CDEFINES_OPT4 NDEBUG
  387. // What additional flags should be passed for each value of OPTIMIZE
  388. // (above)? We separate out the compiler-optimization flags, above,
  389. // so we can compile certain files that give optimizers trouble (like
  390. // the output of lex and yacc) without them, but with all the other
  391. // relevant flags.
  392. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall -g
  393. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall -g
  394. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%]
  395. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%]
  396. // What additional flags should be passed to both compilers when
  397. // building shared (relocatable) sources? Some architectures require
  398. // special support for this.
  399. #defer CFLAGS_SHARED -fPIC
  400. // How to generate a C or C++ executable from a collection of .o
  401. // files. $[target] is the name of the binary to generate, and
  402. // $[sources] is the list of .o files. $[libs] is a space-separated
  403. // list of dependent libraries, and $[lpath] is a space-separated list
  404. // of directories in which those libraries can be found.
  405. #defer LINK_BIN_C $[CC] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  406. #defer LINK_BIN_C++ $[CXX] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  407. // How to generate a static C or C++ library. $[target] is the
  408. // name of the library to generate, and $[sources] is the list of .o
  409. // files that will go into the library.
  410. #defer STATIC_LIB_C ar cru $[target] $[sources]
  411. #defer STATIC_LIB_C++ ar cru $[target] $[sources]
  412. // How to run ranlib, if necessary, after generating a static library.
  413. // $[target] is the name of the library. Set this to the empty string
  414. // if ranlib is not necessary on your platform.
  415. #defer RANLIB ranlib $[target]
  416. // How to generate a shared C or C++ library. $[source] and $[target]
  417. // as above, and $[libs] is a space-separated list of dependent
  418. // libraries, and $[lpath] is a space-separated list of directories in
  419. // which those libraries can be found.
  420. #defer SHARED_LIB_C $[CC] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  421. #defer SHARED_LIB_C++ $[CXX] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  422. // How to install a data file or executable file. $[local] is the
  423. // local name of the file to install, and $[dest] is the name of the
  424. // directory to put it in.
  425. #defer INSTALL install -m 666 $[local] $[dest]
  426. #defer INSTALL_PROG install -m 777 $[local] $[dest]
  427. // Variable definitions for building with the Irix MIPSPro compiler.
  428. #if $[eq $[USE_COMPILER], MIPS]
  429. #define CC cc -n32 -mips3
  430. #define CXX CC -n32 -mips3
  431. // Turn off a few annoying warning messages.
  432. // 1174 - function 'blah' was declared but never used
  433. // 1201 - trailing comma is nonstandard.
  434. // 1209 - controlling expression is constant, e.g. if (0) { ... }
  435. // 1234 - access control not specified, 'public' by default
  436. // 1355 - extra ";" ignored
  437. // 1375 - destructor for base class is not virtual.
  438. // this one actually is bad. But we got alot of them from the classes
  439. // that we've derived from STL collections. Beware of this.
  440. // 3322 - omission of explicit type is nonstandard ("int" assumed)
  441. #define WOFF_LIST -woff 1174,1201,1209,1234,1355,1375,3322
  442. // Linker warnings
  443. // 85 - definition of SOMESYMBOL in SOMELIB preempts that of definition in
  444. // SOMEOTHERLIB.
  445. #define WOFF_LIST $[WOFF_LIST] -Wl,-LD_MSG:off=85
  446. #defer OPTFLAGS -O2 -OPT:Olimit=2500
  447. #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] $[WOFF_LIST] -g
  448. #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] $[WOFF_LIST]
  449. #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[WOFF_LIST]
  450. #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[WOFF_LIST]
  451. #defer CFLAGS_SHARED
  452. #defer STATIC_LIB_C $[CC] -ar -o $[target] $[sources]
  453. #defer STATIC_LIB_C++ $[CXX] -ar -o $[target] $[sources]
  454. #defer RANLIB
  455. #define SHARED_FLAGS -Wl,-none -Wl,-update_registry,$[TOPDIR]/so_locations
  456. #defer SHARED_LIB_C $[CC] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  457. #defer SHARED_LIB_C++ $[CXX] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  458. #endif
  459. //////////////////////////////////////////////////////////////////////
  460. // There are also some additional variables that control specific
  461. // compiler/platform features or characteristics, defined in the
  462. // platform specific file Config.platform.pp. Be sure to inspect
  463. // these variables for correctness too.
  464. //////////////////////////////////////////////////////////////////////