]> git.gag.com Git - fw/openocd/blob - doc/INSTALL.txt
3732035f8ec2e644d59598e61273245186a44de5
[fw/openocd] / doc / INSTALL.txt
1 TODO!!! this should be merged into openocd.texi!!!\r
2 \r
3 \r
4 Prerequisites\r
5 =============\r
6 \r
7 When building with support for FTDI FT2232 based devices, you need at least\r
8 one of the following libraries:\r
9 \r
10 - libftdi (http://www.intra2net.com/opensource/ftdi/)\r
11 - libftd2xx (http://www.ftdichip.com/Drivers/D2XX.htm)\r
12 \r
13 On Windows, you need either Cygwin or MinGW, but compilation for MinGW is also\r
14 possible using a Cygwin host.\r
15 \r
16 Basic Installation\r
17 ==================\r
18 \r
19    OpenOCD is distributed without autotools generated files, i.e. without a \r
20 configure script. Run ./bootstrap in the openocd directory to have all\r
21 necessary files generated.\r
22 \r
23    You have to explicitly enable desired JTAG interfaces during configure:\r
24 \r
25 ./configure --enable-parport --enable-ft2232-libftdi (OR  --enable-ft2232-ftd2xx) \\r
26             --enable-amtjtagaccel\r
27 \r
28    Under Windows/Cygwin, only the ftd2xx driver is supported for FT2232 based\r
29 devices. You have to specify the location of the FTDI driver package with the\r
30 --with-ftd2xx=/full/path/name option.\r
31 \r
32 Under Linux you can choose to build the parport driver with support for\r
33 /dev/parportN instead of the default access with direct port I/O using\r
34 --enable-parport_ppdev. This has the advantage of running OpenOCD without root\r
35 privileges at the expense of a slight performance decrease. This is also\r
36 available on FreeBSD using PPI, but the naming of the devices is different.\r
37 \r
38 Generic installation instructions\r
39 =================================\r
40 \r
41    These are generic installation instructions.\r
42 \r
43    The `configure' shell script attempts to guess correct values for\r
44 various system-dependent variables used during compilation.  It uses\r
45 those values to create a `Makefile' in each directory of the package.\r
46 It may also create one or more `.h' files containing system-dependent\r
47 definitions.  Finally, it creates a shell script `config.status' that\r
48 you can run in the future to recreate the current configuration, a file\r
49 `config.cache' that saves the results of its tests to speed up\r
50 reconfiguring, and a file `config.log' containing compiler output\r
51 (useful mainly for debugging `configure').\r
52 \r
53    If you need to do unusual things to compile the package, please try\r
54 to figure out how `configure' could check whether to do them, and mail\r
55 diffs or instructions to the address given in the `README' so they can\r
56 be considered for the next release.  If at some point `config.cache'\r
57 contains results you don't want to keep, you may remove or edit it.\r
58 \r
59    The file `configure.in' is used to create `configure' by a program\r
60 called `autoconf'.  You only need `configure.in' if you want to change\r
61 it or regenerate `configure' using a newer version of `autoconf'.\r
62 \r
63 The simplest way to compile this package is:\r
64 \r
65   1. `cd' to the directory containing the package's source code and type\r
66      `./configure' to configure the package for your system.  If you're\r
67      using `csh' on an old version of System V, you might need to type\r
68      `sh ./configure' instead to prevent `csh' from trying to execute\r
69      `configure' itself.\r
70 \r
71      Running `configure' takes a while.  While running, it prints some\r
72      messages telling which features it is checking for.\r
73 \r
74   2. Type `make' to compile the package.\r
75 \r
76   3. Type `make install' to install the programs and any data files and\r
77      documentation.\r
78 \r
79   4. You can remove the program binaries and object files from the\r
80      source code directory by typing `make clean'.  \r
81 \r
82 Compilers and Options\r
83 =====================\r
84 \r
85    Some systems require unusual options for compilation or linking that\r
86 the `configure' script does not know about.  You can give `configure'\r
87 initial values for variables by setting them in the environment.  Using\r
88 a Bourne-compatible shell, you can do that on the command line like\r
89 this:\r
90      CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure\r
91 \r
92 Or on systems that have the `env' program, you can do it like this:\r
93      env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure\r
94 \r
95 Compiling For Multiple Architectures\r
96 ====================================\r
97 \r
98    You can compile the package for more than one kind of computer at the\r
99 same time, by placing the object files for each architecture in their\r
100 own directory.  To do this, you must use a version of `make' that\r
101 supports the `VPATH' variable, such as GNU `make'.  `cd' to the\r
102 directory where you want the object files and executables to go and run\r
103 the `configure' script.  `configure' automatically checks for the\r
104 source code in the directory that `configure' is in and in `..'.\r
105 \r
106    If you have to use a `make' that does not supports the `VPATH'\r
107 variable, you have to compile the package for one architecture at a time\r
108 in the source code directory.  After you have installed the package for\r
109 one architecture, use `make distclean' before reconfiguring for another\r
110 architecture.\r
111 \r
112 Installation Names\r
113 ==================\r
114 \r
115    By default, `make install' will install the package's files in\r
116 `/usr/local/bin', `/usr/local/man', etc.  You can specify an\r
117 installation prefix other than `/usr/local' by giving `configure' the\r
118 option `--prefix=PATH'.\r
119 \r
120    You can specify separate installation prefixes for\r
121 architecture-specific files and architecture-independent files.  If you\r
122 give `configure' the option `--exec-prefix=PATH', the package will use\r
123 PATH as the prefix for installing programs and libraries.\r
124 Documentation and other data files will still use the regular prefix.\r
125 \r
126    If the package supports it, you can cause programs to be installed\r
127 with an extra prefix or suffix on their names by giving `configure' the\r
128 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.\r
129 \r
130 Optional Features\r
131 =================\r
132 \r
133    Some packages pay attention to `--enable-FEATURE' options to\r
134 `configure', where FEATURE indicates an optional part of the package.\r
135 They may also pay attention to `--with-PACKAGE' options, where PACKAGE\r
136 is something like `gnu-as' or `x' (for the X Window System).  The\r
137 `README' should mention any `--enable-' and `--with-' options that the\r
138 package recognizes.\r
139 \r
140    For packages that use the X Window System, `configure' can usually\r
141 find the X include and library files automatically, but if it doesn't,\r
142 you can use the `configure' options `--x-includes=DIR' and\r
143 `--x-libraries=DIR' to specify their locations.\r
144 \r
145 Specifying the System Type\r
146 ==========================\r
147 \r
148    There may be some features `configure' can not figure out\r
149 automatically, but needs to determine by the type of host the package\r
150 will run on.  Usually `configure' can figure that out, but if it prints\r
151 a message saying it can not guess the host type, give it the\r
152 `--host=TYPE' option.  TYPE can either be a short name for the system\r
153 type, such as `sun4', or a canonical name with three fields:\r
154      CPU-COMPANY-SYSTEM\r
155 \r
156 See the file `config.sub' for the possible values of each field.  If\r
157 `config.sub' isn't included in this package, then this package doesn't\r
158 need to know the host type.\r
159 \r
160    If you are building compiler tools for cross-compiling, you can also\r
161 use the `--target=TYPE' option to select the type of system they will\r
162 produce code for and the `--build=TYPE' option to select the type of\r
163 system on which you are compiling the package.\r
164 \r
165 Sharing Defaults\r
166 ================\r
167 \r
168    If you want to set default values for `configure' scripts to share,\r
169 you can create a site shell script called `config.site' that gives\r
170 default values for variables like `CC', `cache_file', and `prefix'.\r
171 `configure' looks for `PREFIX/share/config.site' if it exists, then\r
172 `PREFIX/etc/config.site' if it exists.  Or, you can set the\r
173 `CONFIG_SITE' environment variable to the location of the site script.\r
174 A warning: not all `configure' scripts look for a site script.\r
175 \r
176 Operation Controls\r
177 ==================\r
178 \r
179    `configure' recognizes the following options to control how it\r
180 operates.\r
181 \r
182 `--cache-file=FILE'\r
183      Use and save the results of the tests in FILE instead of\r
184      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for\r
185      debugging `configure'.\r
186 \r
187 `--help'\r
188      Print a summary of the options to `configure', and exit.\r
189 \r
190 `--quiet'\r
191 `--silent'\r
192 `-q'\r
193      Do not print messages saying which checks are being made.\r
194 \r
195 `--srcdir=DIR'\r
196      Look for the package's source code in directory DIR.  Usually\r
197      `configure' can determine that directory automatically.\r
198 \r
199 `--version'\r
200      Print the version of Autoconf used to generate the `configure'\r
201      script, and exit.\r
202 \r
203 `configure' also accepts some other, not widely useful, options.\r
204 \r