SILC Runtime Toolkit 1.2 Beta 1
[runtime.git] / lib / doc / building.html
1 <big><b>Building the Toolkit</b></big>
2
3 <br />&nbsp;<br />
4 SILC Runtime Toolkit works on various platforms, such as on several Unix 
5 systems and on Windows.  Building of the Toolkit on some platform may 
6 differ from the other.  This document describes how to build the Toolkit 
7 from the sources, to create linkable libraries and binaries, on all 
8 platforms the Toolkit support.
9
10 <br />&nbsp;<br />
11 The building instructions for all platforms are also included in the Toolkit
12 package.  Please refer to the INSTALL file for general building instructions
13 for Unix systems, README.WIN32 for building on Windows systems, and
14 README.MACOSX for building on Mac OS X.
15
16 <br />&nbsp;<br />
17 <li><a href="#unix">Building on Unix & Linux</a><br />
18 <li><a href="#windows">Building on Windows</a><br />
19 <li><a href="#macosx">Building on Mac OS X</a>
20 <li><a href="#symbian">Building on Symbian OS</a>
21
22 <br />&nbsp;<br />&nbsp;<br />
23 <b><a name="unix"></a>Building on Unix & Linux</b>
24
25 <br />&nbsp;<br />
26 On Unix systems both statically and dynamically linkable libraries are 
27 built by default.
28
29 <br />&nbsp;<br />
30 To build Toolkit on Unix systems, give commands:
31
32 <br />&nbsp;<br />
33 <tt>
34 ./configure<br />
35 make
36 </tt>
37
38 <br />&nbsp;<br />
39 On some systems you may need to give "gmake" command instead of "make".  The
40 ./configure can take several options as arguments.  To see them all give
41 command:
42
43 <br />&nbsp;<br />
44 <tt>./configure --help</tt>
45
46 <br />&nbsp;<br />
47 The most important configuration options you may consider to use are:
48
49 <br />&nbsp;<br />
50 <tt>--enable-debug</tt>
51
52 <br />&nbsp;<br />
53 If you would like to enable the debugging for the compiled binaries
54 you can give this option to the `configure'.  It is recommended to use
55 this option when you are doing development with Toolkit.  It is helpful
56 to enable run-time debugging.
57
58 <br />&nbsp;<br />
59 <tt>--with-iconv[=DIR]</tt>
60
61 <br />&nbsp;<br />
62 If your system doesn't provide iconv() function in its native libraries
63 (usually libc) or if this function is broken (e.g. older Solaris systems),
64 you may want to use libiconv instead.  The DIR is the upper path in your
65 system which contains lib/ and include/ for libiconv (e.g. /usr/local).
66
67 <br />&nbsp;<br />
68 <tt>--without-pthreads</tt>
69
70 <br />&nbsp;<br />
71 If you do not want to compile the programs with POSIX multi-threads support
72 you can give --without-pthreads option.  This will disable the SILC Thread
73 API and SILC Mutex API.  Furthermore if SILC Thread API is used when this
74 option is used, the routines work, but do not work in threads (are run
75 in the calling process and can block the process).
76
77 <br />&nbsp;<br />
78 <tt>--disable-asm</tt>
79
80 <br />&nbsp;<br />
81 If you have trouble compiling the assembler optimized code in the
82 package or does not want to use them, you can give the --disable-asm
83 option to the `configure' script.  This will assure that assembler
84 optimized code is not compiled in.
85
86 <br />&nbsp;<br />
87 <tt>--enable-ipv6</tt>
88
89 <br />&nbsp;<br />
90 The `configure' will attempt to check for IPv6 support in your system.
91 However, if it fails, but you still want to compile in the IPv6 support
92 you can give --enable-ipv6 option to force the IPv6 support.
93
94 <br />&nbsp;<br />
95 <tt>--disable-cpu-optimizations</tt>
96
97 <br />&nbsp;<br />
98 By default the configure script will attempt to detect the type of your 
99 CPU and enable any features specific to your CPU that could optimize the 
100 performance of the Toolkit.  If you are creating binary package that 
101 should work on any CPU (and not only your CPU) you should diable these 
102 optimizations.  If you compile it for yourself only, keeping the 
103 optimizations enabled is recommended.
104
105 <br />&nbsp;<br />
106 After compilation you can install the Toolkit into your system by giving
107 the command:
108
109 <br />&nbsp;<br />
110 <tt>make install</tt>
111
112
113 <br />&nbsp;<br />&nbsp;<br />
114 <b><a name="windows"></a>Building on Windows</b>
115
116 <br />&nbsp;<br />
117 The Toolkit can be compiled several different ways on Windows.  However,
118 this document describes the method to build the Toolkit to produce native
119 Win32 binaries.  The Toolkit package can also be compiled on Cygwin and
120 MinGW.  For these systems please refer to the README.WIN32 file in the
121 Toolkit package.
122
123 <br />&nbsp;<br />
124 The Toolkit package includes ready MSVC++ Workspace files, that will
125 automatically compile the Toolkit.  The MSVC++ workspace and project files
126 resides in the win32/ subdirectory of the Toolkit package.  The `srt.dsw'
127 file is the workspace file that automatically supports compiling the Toolkit
128 and to generate the SILC Runtime DLL (libsrt.dll).  You may also compile 
129 debug version by selecteing the Debug compilation method.
130
131 <br />&nbsp;<br />&nbsp;<br />
132 <b><a name="macosx"></a>Building on Mac OS X</b>
133
134 <br />&nbsp;<br />
135 Building the Toolkit on Mac OS X is almost identical on compiling on Unix
136 system.  The reason for this is that the Mac OS X is Unix based operating
137 system.  To build the Toolkit on Mac OS X, give the following commands:
138
139 <br />&nbsp;<br />
140 <tt>
141 setenv CFLAGS -no-cpp-precomp<br />
142 ./configure powerpc<br />
143 make
144 </tt>
145
146 <br />&nbsp;<br />
147 The ./configure can take several options as arguments.  To see them all give
148 command:
149
150 <br />&nbsp;<br />
151 <tt>./configure --help</tt>
152
153 <br />&nbsp;<br />
154 To compile, give:
155
156 <br />&nbsp;<br />
157 <tt>
158 make
159 </tt>
160
161 <br />&nbsp;<br />
162 After compilation you can install the Toolkit into your system by giving
163 the command:
164
165 <br />&nbsp;<br />
166 <tt>make install</tt>
167
168 <br />&nbsp;<br />&nbsp;<br />
169 <b><a name="symbian"></a>Building on Symbian OS</b>
170
171 <br />&nbsp;<br />
172 The build environment for Symbian OS requires Carbide.c++ and MS Windows.
173
174 <br />&nbsp;<br />
175 Download the freely available Carbide.c++ from Nokia at
176 <a href="http://forum.nokia.com">http://forum.nokia.com</a>.  The exact
177 hyperlink location changes often, so it is not referenced here.  It is
178 usually under "Tools and SDKs" link.
179
180 <br />&nbsp;<br />
181 After installation a web browser is opened automatically by the
182 Carbide.c++ installer.  Follow its instructions by installing the Perl,
183 CTags and the SDK.  Perl and the SDK are required, but CTags is
184 optional and if necessary can be omitted.
185
186 <br />&nbsp;<br />
187 The Toolkit is generic C and C++ code and should work with any
188 SDK.  If you don't have SDK already installed, install the latest
189 version you can find.  The links to SDKs are found in the Carbide.c++
190 instructions after installation.  If you already have SDK in your
191 system, you should use that.
192
193 <br />&nbsp;<br />
194 After installation import the Toolkit project to Carbide.c++ from the
195 symbian/ subdirectory in the Toolkit package.
196
197 <br />&nbsp;<br />
198 Please read the README.SYMBIAN from the SILC Runtime Toolkit package for 
199 complete building instructions.