52ba44b75e0bbe6307aeffe97aae7f52d692a33f
[crypto.git] / lib / doc / building.html
1 <big><b>Building the Toolkit</b></big>
2
3 <br />&nbsp;<br />
4 SILC Toolkit works on various platforms, such as on several Unix systems and 
5 on Windows.  Building of the Toolkit on some platform may differ from the
6 other.  This document describes how to build the Toolkit from the sources,
7 to create linkable libraries and binaries, on all platforms the Toolkit
8 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
21 <br />&nbsp;<br />&nbsp;<br />
22 <b><a name="unix"></a>Building on Unix & Linux</b>
23
24 <br />&nbsp;<br />
25 Building the Toolkit on Unix will produce binaries of all libraries, and
26 SILC Client and SILC Server.  The Toolkit package includes also Client and
27 Server as an example applications, and they are compiled automatically.
28 The libraries are compiled to provide staticly linkable libraries.  Two
29 libraries are produced: libsilc.a and libsilcclient.a.  The libsilc.a includes
30 everything else except the Client library.  The libsilcclient.a includes
31 only the Client library.
32
33 <br />&nbsp;<br />
34 To build Toolkit on Unix systems, give commands:
35
36 <br />&nbsp;<br />
37 <tt>
38 ./configure<br />
39 make
40 </tt>
41
42 <br />&nbsp;<br />
43 On some systems you may need to give "gmake" command instead of "make".  The
44 ./configure can take several options as arguments.  To see them all give
45 command:
46
47 <br />&nbsp;<br />
48 <tt>./configure --help</tt>
49
50 <br />&nbsp;<br />
51 The most important configuration options you may consider to use are:
52
53 <br />&nbsp;<br />
54 <tt>--enable-debug</tt>
55
56 <br />&nbsp;<br />
57 If you would like to enable the debugging for the compiled binaries
58 you can give this option to the `configure'.  It is recommended to use
59 this option when you are doing development with Toolkit.  It is helpful
60 to enable run-time debugging.
61
62 <br />&nbsp;<br />
63 <tt>--with-gmp=PATH</tt>
64
65 <br />&nbsp;<br />
66 If you wish to use GMP library for arbitrary precision arithmetic
67 library instead of using the MPI library included in the package, you can
68 give the --with-gmp=PATH option to the `configure'.  The PATH is the path
69 to the GMP library in your system.
70
71 <br />&nbsp;<br />
72 <tt>--without-irssi</tt><br />
73 <tt>--without-silcd</tt>
74
75 <br />&nbsp;<br />
76 By default the SILC Toolkit will also build the Irssi SILC client and
77 the SILC Server which use the SILC Toolkit as well.  If you do not
78 wish to compile these applications you can give --without-irssi to
79 not compile Irssi SILC client (irssi/ directory) and/or --without-silcd
80 to not compile SILC Server (silcd/ directory).  Other applications
81 the Toolkit does not build automatically.
82
83 <br />&nbsp;<br />
84 <tt>--disable-asm</tt>
85
86 <br />&nbsp;<br />
87 If you have trouble compiling the assembler optimized code in the
88 package or does not want to use them, you can give the --disable-asm
89 option to the `configure' script.  This will assure that assembler
90 optimized code is not compiled in.
91
92 <br />&nbsp;<br />
93 <tt>--disable-threads</tt>
94
95 <br />&nbsp;<br />
96 If you do not want to compile the programs with multi threads support
97 you can give --disable-threads option.  This will disable the SILC Thread
98 API and SILC Mutex API.  Furthermore if SILC Thread API is used when this
99 option is used, the routines work, but do not work in threads (are run
100 in the calling process and can block the process).
101
102 <br />&nbsp;<br />
103 <tt>--enable-ipv6</tt>
104
105 <br />&nbsp;<br />
106 The `configure' will attempt to check for IPv6 support in your system.
107 However, if it fails, but you still want to compile in the IPv6 support
108 you can give --enable-ipv6 option to force the IPv6 support.
109
110 <br />&nbsp;<br />
111 After compilation you can install the Toolkit into your system by giving
112 the command:
113
114 <br />&nbsp;<br />
115 <tt>make install</tt>
116
117
118 <br />&nbsp;<br />&nbsp;<br />
119 <b><a name="windows"></a>Building on Windows</b>
120
121 <br />&nbsp;<br />
122 The Toolkit can be compiled several different ways on Windows.  However,
123 this document describes the method to build the Toolkit to produce native
124 Win32 binaries.  The Toolkit package can also be compiled on Cygwin and
125 MinGW.  For these systems please refer to the README.WIN32 file in the
126 Toolkit package.
127
128 <br />&nbsp;<br />
129 The Toolkit package includes ready MSVC++ Workspace files, that will 
130 automatically compile the Toolkit.  The MSVC++ workspace and project files
131 resides in the win32/ subdirectory of the Toolkit package.  The `silc.dsw'
132 file is the workspace file that automatically supports compiling the Toolkit
133 and to generate the SILC Core DLL and SILC Client DLL libraries.
134
135 <br />&nbsp;<br />
136 The SILC Core DLL is named as libsilc and will generate libsilc.dll, and
137 the SILC Client DLL is named as libsilcclient and will generate
138 libsilcclient.dll.  Both of the projects also automatically generates
139 libsilc.lib and libsilcclient.lib import libraries that may be used to
140 link against a client application.
141
142 <br />&nbsp;<br />
143 Generally you do not need to do any specific settings to compile the
144 Toolkit.  However, you must compile the libsilc before compiling the
145 libsilclient, since the SILC Client DLL depends on the SILC Core DLL.
146 You may compile the DLLs as either Release or Debug version.  Just select
147 the preferred method of compilation.  The Debug version will compile the
148 SILC Toolkit with run-time debugging support, which is recommended when
149 doing development with the Toolkit.
150
151 <br />&nbsp;<br />&nbsp;<br />
152 <b><a name="macosx"></a>Building on Mac OS X</b>
153
154 <br />&nbsp;<br />
155 Building the Toolkit on Mac OS X is almost identical on compiling on Unix
156 system.  The reason for this is that the Mac OS X is Unix based operating
157 system.  To build the Toolkit on Mac OS X, give the following commands:
158
159 <br />&nbsp;<br />
160 <tt>
161 setenv CFLAGS -no-cpp-precomp<br />
162 ./configure powerpc<br />
163 make
164 </tt>
165
166 <br />&nbsp;<br />
167 The ./configure can take several options as arguments.  To see them all give
168 command:
169
170 <br />&nbsp;<br />
171 <tt>./configure --help</tt>
172
173 <br />&nbsp;<br />
174 If you do not want to compile the applications, or they do not compile on
175 your system, you can also choose to compile only the libraries, and skip
176 all applications.  In this case, before giving the "make" command, go
177 to the lib/ subdirectory, and give "make" command there:
178
179 <br />&nbsp;<br />
180 <tt>
181 cd lib/<br />
182 make
183 </tt>
184
185 <br />&nbsp;<br />
186 After compilation you can install the Toolkit into your system by giving
187 the command:
188
189 <br />&nbsp;<br />
190 <tt>make install</tt>