Debian Codegraph @

README

raw
1 How to build on various platforms.
2 A more up to date version of this may be found at
3 http://directory.fedora.redhat.com/wiki/BuildCoolKey
4
5
6 Linux/Unix
7 ---------------------------------------------------------------------------
8 Prerequisites
9
10 You will need the following packages installed (or equivalent for your OS):
11
12 * pcsc-lite-devel
13 * xlib-devel
14 * glibc
15 * gcc
16 * autoconf
17
18 Building
19
20 In the root directory run the following commands:
21
22 autoconf
23 ./configure
24 make
25
26 If you need to modify the Makefiles, automake 1.9.6 was used. Makefile.am is
27 included in the source.
28
29 Installing
30
31 In the root directory run:
32
33 make install
34
35 or
36
37 make install DEST=/my/destination/tree
38
39
40
41 Mac OS X
42 ---------------------------------------------------------------------------
43
44 CoolKey can be compiled as a universal binary on the Mac.
45
46 Prerequisites
47
48 * Intel or PPC Mac
49 * OS X Tiger
50 * Version 2.59 of autoconf
51 * XCode 2.2 and later
52 * Make sure the framework "/Developer/SDKs/MacOSX10.4u.sdk" is present
53
54 Building
55
56 1. checkout coolkey source
57 2. proceed to the coolkey directory
58 3. Type the following:
59
60 autoconf
61 ./configure --disable-dependency-tracking
62 make
63
64 If the autoconf step fails, an outdated version of autoconf may be installed.
65 Perform "autoconf --version" to make sure 2.59 is the version present.
66
67 As of right now, the above will build CoolKey dynamic libraries as only the
68 native binary of the build machine. For instance, performing this build on an
69 Intel Mac will build universal object files but leave the dynamic libraries as
70 Intel only. Until this problem can be resolved, the following can be done to
71 complete an actual universal binary build of everything.
72
73 After the configure step and prior to the actual Make, do the following:
74
75 1. edit the file "libtool". Be sure to back up the original copy.
76 2. search for lines with instances of the strings "archive_cmds" and
77 "module_expsym_cmds".
78 3. Between the strings "\$deplibs" and "\$compiler_flags",
79 place the following:
80
81 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
82
83 Example:
84
85 #Commands used to build and install a shared archive.
86 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs
87 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
88 \$compiler_flags -install_name \$rpath/\$soname \$verstring"
89
90
91 * At this point, performing a "make" will result in universal binary
92 versions of each dynamic library associated with CoolKey.
93
94 It is also possible to build the utility "pk11install" on the Mac. This
95 utility can be used to automatically install CoolKey into Mozilla browsers on
96 the user's system.
97
98 * Building "pk11install" will requre the configure script to be launched
99 with the following two environment variables:
100
101 NSS_CFLAGS=
102 NSS_LIBS=
103
104 * NSS_CFLAGS has to be set to the include paths of NSS and NSPR currently
105 installed on the system.
106 * NSS_LIBS has to be set to the search path of the NSS and NSPR shared
107 libraries.
108 * Example invocation:
109
110 ./configure --disable-dependency-tracking NSS_CFLAGS="-I /usr/local/include/nspr -I /usr/local/include/nss" NSS_LIBS="-L/usr/local/lib/nss" --enable-pkinstall
111 make
112
113 Installing
114
115 * After a successful build of CoolKey, the Makefile can be used to perform
116 a simple install of the software on the system if desired.
117
118 1. Within the build directory perform the following:
119
120 make install
121
122 * By default, everything will be placed in "/usr/local/lib" and
123 "/usr/local/lib/pkcs11".
124 * An alternate prefix directory, instead of "/usr/local" can be selected
125 at configure time as demonstrated below:
126
127 ./configure --prefix=/usr/local/CoolKey --disable-dependency-tracking
128
129 * In the above example the install will result in everything being located
130 in "/usr/local/CoolKey/lib" and "/usr/local/CoolKey/lib/pkcs11".
131
132 * If desired the following example demonstartes how to install everything
133 in an alternate base location:
134
135 make DESTDIR=/build/staging-area install
136
137 * The above will install the previous example in
138 "/build/staging/usr/local/CoolKey".
139
140
141
142 Windows
143 ---------------------------------------------------------------------------
144
145 Prerequisites
146
147 * Microsoft Visual C++ and Platform SDK: Install as normal.
148 Make sure INCLUDE and LIB are set appropriately. These are available at
149 (http://msdn.microsoft.com/visualc/)
150 * Cygwin: Install as normal. You'll need base, the shell, autoconf-2.5x,
151 make, cvs*... This can be downloaded at (http://www.cygwin.com)
152
153 * This may not be a full list. If you discover additional packages which are
154 needed please let us know, or update the wiki
155 (http://directory/fedora.redhat.com/wiki/BuildCoolKey).
156
157 * ZLib Download ZLib source an binaries from here (http://www.zlib.org)
158 1. Unzip into a known directory (like c:/zlib)
159 2. Set ZLIB_INCLUDE to the location of the include files
160 (e.g. c:/zlib/include)
161 3. Set ZLIB_LIB to the location of the export libraries
162 (e.g. c:/zlib/lib)
163 4. Make sure both zdll.lib and zlib1.dll are in the ZLIB_LIB directory
164
165 Building
166
167 Once everything is installed, start a cygwin shell.
168
169 1. checkout the coolkey source
170 2. Make sure the environment variables INCLUDE, LIB, ZLIB_INCLUDE, and
171 ZLIB_LIB are defined as described above in Prerequisites.
172 3. Make sure the Visual C++ tools are in your path.
173 4. In the root directory type:
174
175 autoconf-2.5x
176 ./configure
177 make
178
179 Installing
180
181 To build a distribution:
182
183 make install DESTDIR=C:/build/staging-area libdir=/libraries prefix=/sdk
184
185 To install on your local machine:
186
187 make install
188
189
190