1 |
Platform configuration files for the SCons based build system |
2 |
------------------------------------------------------------- |
3 |
|
4 |
<platform>_<##>.cfg |
5 |
-------------- |
6 |
|
7 |
The <platform>_<##>.cfg files in this directory are used to determine |
8 |
the right settings, libraries, source files etc. on the platform |
9 |
where you are building Radiance. The build system will select the |
10 |
appropriate file automatically. |
11 |
|
12 |
If your platform isn't supported yet, then you can create a new |
13 |
file with an appropriat name (SCons should tell you what it |
14 |
expects). Usually, you will start by copying the file of the most |
15 |
similar supported platform, and then make the necessary changes. |
16 |
|
17 |
On unix based platforms without a specific config file, the file |
18 |
"posix_<##>.cfg" will be used (which may or may not work well enough). |
19 |
|
20 |
As of this writing, the following platforms are included where the |
21 |
numbers 32 and 64 indicate 32 bit or 64 bit systems rspectively. |
22 |
(although not all of them have been tested very recently): |
23 |
|
24 |
* Linux_32.cfg Linux |
25 |
* Linux_63.cfg Linux |
26 |
* FreeBSD_32.cfg FreeBSD unix |
27 |
* FreeBSD_64.cfg FreeBSD unix |
28 |
* Darwin_64.cfg Macintosh OS-X |
29 |
* Darwin_32.cfg Macintosh OS-X |
30 |
* posix_64.cfg default for unknown Unix systems |
31 |
* posix_32.cfg default for unknown Unix systems |
32 |
* Windows_64.cfg Microsoft Windows with Visual C/C++ |
33 |
* Windows_32.cfg Microsoft Windows with Visual C/C++ |
34 |
* mingw_64.cfg MingW on MS Windows http://www.mingw.org/ |
35 |
* mingw_32.cfg MingW on MS Windows http://www.mingw.org/ |
36 |
|
37 |
The configuration for 32 bit and 64 bit architecture of the |
38 |
same platform will typically be very similar, with just some |
39 |
compiler flags indicating the different target. |
40 |
|
41 |
|
42 |
<platform>_custom.cfg |
43 |
--------------------- |
44 |
|
45 |
If you want to experiment with changes to the downloaded file, then |
46 |
you can create a copy named <platform>_custom.cfg, and make your |
47 |
changes there. If such a file exists, then it will be used in |
48 |
place of the original. |
49 |
|
50 |
|
51 |
Contents and format |
52 |
------------------- |
53 |
|
54 |
Any text starting with a hash character (#) until the end of the |
55 |
line is ignored as a comment. |
56 |
|
57 |
A config file consists of several sections, each of which is |
58 |
introduced by a keyword in brackets. |
59 |
Within each section, a configuration directive starts with a |
60 |
keyword and a colon, followed by the data assigned to that keyword. |
61 |
|
62 |
|
63 |
Sections |
64 |
-------- |
65 |
|
66 |
[install] # directories where to install the software |
67 |
[build] # compile and link instructions for production builds |
68 |
[debug] # compile and link instructions for debug builds |
69 |
[code] # code compatibility configuration |
70 |
|
71 |
|
72 |
Install section |
73 |
--------------- |
74 |
|
75 |
Values in this section may refer to environment variables, in the |
76 |
form {VARNAME}. On Windows the variable names must be given in |
77 |
all uppercase. |
78 |
|
79 |
# The root directory of the Radiance installation |
80 |
# The second example reflects the installation standard on Windows. |
81 |
RAD_BASEDIR: /opt/radiance |
82 |
RAD_BASEDIR: {PROGRAMFILES}/radiance |
83 |
|
84 |
# The following are relative to RAD_BASEDIR! |
85 |
# The directory for executables |
86 |
RAD_BINDIR: bin |
87 |
|
88 |
# The directory for support files (.cal, .pic, .fnt, etc.) |
89 |
RAD_RLIBDIR: share/lib |
90 |
|
91 |
# The directory for the man pages |
92 |
RAD_MANDIR: share/man |
93 |
|
94 |
|
95 |
Debug and Build sections |
96 |
------------------------ |
97 |
|
98 |
The same keywords can (and usually will) be used in both, but |
99 |
their assigned values will often differ. |
100 |
|
101 |
# The compiler to use (example: Gnu gcc) |
102 |
CC: gcc |
103 |
|
104 |
# The directories for system header files (not normally needed). |
105 |
CPPPATH: |
106 |
|
107 |
# Symbols to define for the preprocessor (example for Mingw) |
108 |
# The symbol "RT_WINPROC" enables the use of our custom popen |
109 |
# routine, which allows for pipelining, backslash-newline |
110 |
# escapes, and some more functionality without the need for |
111 |
# a unix shell. |
112 |
CPPDEFINES: freebsd HDSUF=.exe RT_WINPROC |
113 |
|
114 |
# Flags for the C preprocessor (example for gcc) |
115 |
CPPFLAGS: -O2 -Wall -Wno-uninitialized |
116 |
|
117 |
# Flags for the C compiler (example for debug build with gcc) |
118 |
CCFLAGS: -pg |
119 |
|
120 |
# The directories for system libraries (not normally needed) |
121 |
LIBPATH: |
122 |
|
123 |
# Flags for the linker (example for debug build on Windows) |
124 |
LINKFLAGS: /DEBUG /INCREMENTAL:NO |
125 |
|
126 |
# Flags specific to ezxml.c (example for cygwin/mingw) |
127 |
EZXML_CPPDEFINES: EZXML_NOMMAP |
128 |
|
129 |
# Where to find an installed libtiff and its include files |
130 |
# (Not needed when on a standard search path) |
131 |
# If no libtiff is found here or on the standard paths, then |
132 |
# the executables "normtiff" and "ra_tiff" won't be built. |
133 |
TIFFLIB: |
134 |
TIFFINCLUDE: |
135 |
|
136 |
|
137 |
The Code section |
138 |
---------------- |
139 |
|
140 |
# There should be no need to edit this section in existing |
141 |
# config files. If you create a new file for a yet untested |
142 |
# platform, you may need to ask on the dev-list what will |
143 |
# work here. |
144 |
|
145 |
RAD_COMPAT: # theoretically obsolete (src/common/strcmp.c) |
146 |
RAD_MATHCOMPAT: # erf.c floating point error function |
147 |
RAD_ARGSCOMPAT: # fixargv0.c for Windows |
148 |
RAD_NETCOMPAT: # [win_]netproc.c for ranimate |
149 |
RAD_MLIB: # usually 'm', or any fastlib available |
150 |
RAD_SOCKETLIB: # ws_2_32 on Windows (VC links it automatically) |
151 |
RAD_PROCESS: # our process abstraction and win_popen() |
152 |
RAD_PCALLS: # more custom process abstraction |
153 |
|
154 |
|
155 |
|