EXEEXT introduces to solve Cygwin problems
[fw/sdcc] / doc / sdccman.lyx
index a5117d201ec5ce25ee7b6268f24aa733c4665177..fa87ad1d8642e9069c0f7363415bd50dbefffa25 100644 (file)
@@ -330,39 +330,163 @@ If you can think of some more, please send them to the list.
 Installation
 \layout Subsection
 
-Install paths
+Configure Options
 \layout Standard
 
-The install paths and default search paths are defined when running 'configure'.
- The defaults can be overriden by
+The install paths, search paths and other options are defined when running
+ 'configure'.
+ The defaults can be overriden by:
+\layout List
+\labelwidthstring 00.00.0000
+
+---prefix see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+---exec_prefix see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+---bindir see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+---datadir see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+docdir environment variable, see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+include_dir_suffix environment variable, see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+lib_dir_suffix environment variable, see tabel below
+\layout List
+\labelwidthstring 00.00.0000
+
+sdccconf_h_dir_separator environment variable, either / or 
+\backslash 
+
+\backslash 
+ makes sense here.
+ This character will only be used in sdccconf.h; don't forget it's a C-header,
+ therefore a double-backslash is needed there.
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-mcs51-port Excludes the Intel mcs51 port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-gbz80-port Excludes the Gameboy gbz80 port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-z80-port Excludes the z80 port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-avr-port Excludes the AVR port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-ds390-port Excludes the DS390 port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-pic-port Excludes the PIC port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-xa51-port Excludes the XA51 port
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-ucsim Disables configuring and building of ucsim
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-device-lib-build Disables automatically building device libraries
+\layout List
+\labelwidthstring 00.00.0000
+
+---disable-packihx Disables building packihx
+\layout List
+\labelwidthstring 00.00.0000
+
+---enable-libgc Use the Bohem memory allocator.
+ Lower runtime footprint.
 \layout Standard
 
-...
- TBA
+Furthermore the environment variables CC, CFLAGS, ...
+ the tools and their arguments can be influenced.
+ Please see `configure ---help` and the man/info pages of `configure` for
+ details.
+\newline 
+
+\newline 
+The names of the standard libraries STD_LIB, STD_INT_LIB, STD_LONG_LIB,
+ STD_FP_LIB, STD_DS390_LIB, STD_XA51_LIB and the environment variables SDCC_DIR_
+NAME, SDCC_INCLUDE_NAME, SDCC_LIB_NAME are defined by `configure` too.
+ At the moment it's not possible to change the default settings (it was
+ simply never required.
 \newline 
 
 \newline 
-These configure variables are compiled into the binaries, and can only be
+These configure options are compiled into the binaries, and can only be
  changed by rerunning 'configure' and recompiling SDCC.
- The configure variables are written in 
+ The configure options are written in 
 \emph on 
 italics
 \emph default 
- to distinguish them from run time variables (see next section).
+ to distinguish them from run time environment variables (see section search
+ paths).
 \newline 
 
 \newline 
-The defaults are:
+The settings for 
+\begin_inset Quotes sld
+\end_inset 
+
+Win32 builds
+\begin_inset Quotes srd
+\end_inset 
+
+ are used by the SDCC team to build the official Win32 binaries.
+ The SDCC team uses Mingw32 to build the official Windows binaries, because
+ it's
+\layout Enumerate
+
+open source, 
+\layout Enumerate
+
+a gcc compiler and last but not least
+\layout Enumerate
+
+the binaries can be built by cross compiling on Sourceforge's compile farm.
+\layout Standard
+
+See the examples, how to pass the Win32 settings to 'configure'.
+ The other Win32 builds using Borland, VC or whatever don't use 'configure',
+ but a header file sdcc_vc_in.h is the same as sdccconf.h built by 'configure'
+ for Win32.
+\newline 
+
+\newline 
+These defaults are:
 \newline 
 
 \newline 
 
 \begin_inset  Tabular
-<lyxtabular version="3" rows="7" columns="3">
+<lyxtabular version="3" rows="8" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -377,7 +501,7 @@ Variable
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -385,7 +509,7 @@ Variable
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -427,7 +551,7 @@ sdcc
 
 
 \emph on 
-DATADIR
+EXEC_PREFIX
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -438,8 +562,6 @@ DATADIR
 
 \emph on 
 $PREFIX
-\emph default 
-/share/sdcc
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -461,7 +583,7 @@ $PREFIX
 
 
 \emph on 
-BIN_DIR_SUFFIX
+BINDIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -469,7 +591,11 @@ BIN_DIR_SUFFIX
 
 \layout Standard
 
-bin
+
+\emph on 
+$EXECPREFIX
+\emph default 
+/bin
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -477,6 +603,12 @@ bin
 
 \layout Standard
 
+
+\emph on 
+$EXECPREFIX
+\emph default 
+
+\backslash 
 bin
 \end_inset 
 </cell>
@@ -489,7 +621,7 @@ bin
 
 
 \emph on 
-SEARCH_SUFFIX
+DATADIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -497,7 +629,45 @@ SEARCH_SUFFIX
 
 \layout Standard
 
-share/sdcc
+
+\emph on 
+$PREFIX
+\emph default 
+/share
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+$PREFIX
+\end_inset 
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+DOCDIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+$DATADIR
+\emph default 
+/sdcc/doc
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -505,6 +675,13 @@ share/sdcc
 
 \layout Standard
 
+
+\emph on 
+$DATADIR
+\emph default 
+
+\backslash 
+doc
 \end_inset 
 </cell>
 </row>
@@ -524,7 +701,7 @@ INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-include
+sdcc/include
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -552,45 +729,484 @@ LIB_DIR_SUFFIX
 
 \layout Standard
 
+sdcc/lib
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
 lib
 \end_inset 
 </cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\newline 
+
+\newline 
+
+\newline 
+'configure' also computes relative paths.
+ This is needed for full relocatability of a binary package and to complete
+ search paths (see section search paths below):
+\newline 
+\newline 
+
+\begin_inset  Tabular
+<lyxtabular version="3" rows="4" columns="3">
+<features>
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Variable (computed)
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+default
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+Win32 builds
+\end_inset 
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+BIN2DATA_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+../share
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+..
+\backslash 
+
+\end_inset 
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+PREFIX2BIN_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+bin
+\end_inset 
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+
+\emph on 
+PREFIX2DATA_DIR
+\end_inset 
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\layout Standard
+
+share/sdcc
+\end_inset 
+</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
-\layout Standard
+\layout Standard
+
+\end_inset 
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset 
+
+
+\newline 
+
+\newline 
+Examples:
+\layout LyX-Code
+
+./configure
+\layout LyX-Code
+
+./configure ---prefix=
+\begin_inset Quotes srd
+\end_inset 
+
+/usr/bin
+\begin_inset Quotes srd
+\end_inset 
+
+ ---datadir=
+\begin_inset Quotes srd
+\end_inset 
+
+/usr/share
+\begin_inset Quotes srd
+\end_inset 
+
+
+\layout LyX-Code
+
+./configure ---disable-avr-port ---disable-xa51-port
+\layout Standard
+
+To crosscompile on linux for Mingw32 (see also 'sdcc/support/scripts/sdcc_mingw3
+2'):
+\layout LyX-Code
+
+./configure 
+\backslash 
+
+\layout LyX-Code
+
+  CC=
+\begin_inset Quotes srd
+\end_inset 
+
+i586-mingw32msvc-gcc
+\begin_inset Quotes srd
+\end_inset 
+
+ CXX=
+\begin_inset Quotes srd
+\end_inset 
+
+i586-mingw32msvc-g++
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  RANLIB=
+\begin_inset Quotes srd
+\end_inset 
+
+i586-mingw32msvc-ranlib
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  STRIP=
+\begin_inset Quotes srd
+\end_inset 
+
+i586-mingw32msvc-strip
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  ---prefix=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  ---datadir=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  docdir=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc/doc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  include_dir_suffix=
+\begin_inset Quotes srd
+\end_inset 
+
+include
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  lib_dir_suffix=
+\begin_inset Quotes srd
+\end_inset 
+
+lib
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  sdccconf_h_dir_separator=
+\begin_inset Quotes srd
+\end_inset 
+
+
+\backslash 
+
+\backslash 
+
+\backslash 
+
+\backslash 
+
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  ---disable-device-lib-build 
+\backslash 
+
+\layout LyX-Code
+
+  ---disable-ucsim 
+\backslash 
+
+\layout LyX-Code
+
+  ---host=i586-mingw32msvc ---build=unknown-unknown-linux-gnu
+\layout Standard
+
+To 
+\begin_inset Quotes sld
+\end_inset 
+
+cross
+\begin_inset Quotes srd
+\end_inset 
+
+compile on Cygwin for Mingw32(see also sdcc/support/scripts/sdcc_cygwin_mingw32)
+:
+\layout LyX-Code
+
+./configure -C 
+\backslash 
+
+\layout LyX-Code
+
+  CFLAGS=
+\begin_inset Quotes srd
+\end_inset 
+
+-mno-cygwin -O2
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  LDFLAGS=
+\begin_inset Quotes srd
+\end_inset 
+
+-mno-cygwin
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  ---prefix=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  ---datadir=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  docdir=
+\begin_inset Quotes srd
+\end_inset 
+
+/sdcc/doc
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  include_dir_suffix=
+\begin_inset Quotes srd
+\end_inset 
+
+include
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
+
+  lib_dir_suffix=
+\begin_inset Quotes srd
+\end_inset 
+
+lib
+\begin_inset Quotes srd
+\end_inset 
+
+\backslash 
+
+\layout LyX-Code
 
-lib
+  sdccconf_h_dir_separator=
+\begin_inset Quotes srd
 \end_inset 
-</cell>
-</row>
-</lyxtabular>
 
-\end_inset 
 
+\backslash 
 
-\newline 
+\backslash 
 
-\newline 
-Cygwin is handled like a *nix, Mingw32 however belongs to the Win32 builds.
- The SDCC team uses Mingw32 to build the official Windows binaries, because
- it's
-\layout Enumerate
+\backslash 
 
-open source, 
-\layout Enumerate
+\backslash 
 
-a gcc compiler and last but not least
-\layout Enumerate
+\begin_inset Quotes srd
+\end_inset 
 
-the binaries can be built by cross compiling on Sourceforge's compile farm.
+\backslash 
+
+\layout LyX-Code
+
+  ---disable-ucsim
 \layout Standard
 
-The other Win32 builds using Borland, VC or whatever don't use 'configure',
- but they (hopefully) use the default Win32 paths.
-\newline 
+'configure' is quite slow on Cygwin (at least on windows before Win2000/XP).
+ The option '--C' turns on caching, which gives a little bit extra speed.
+ However if options are changed, it can be necessary to delete the config.cache
+ file.
+\layout Subsection
+
+Install paths
+\layout Standard
 
-\newline 
 1.
  Binary files (preprocessor, assembler and linker)
 \layout Standard
@@ -599,9 +1215,9 @@ The other Win32 builds using Borland, VC or whatever don't use 'configure',
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -616,7 +1232,7 @@ Path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -624,7 +1240,7 @@ Path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -636,7 +1252,7 @@ Win32 default
 
 
 \emph on 
-$PREFIX/$BIN_DIR_SUFFIX
+$EXEC_PREFIX
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -676,9 +1292,9 @@ bin
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.6in">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.6in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -693,7 +1309,7 @@ Path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -701,7 +1317,7 @@ Path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -760,9 +1376,9 @@ model
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -777,7 +1393,7 @@ Path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -785,7 +1401,7 @@ Path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -837,9 +1453,9 @@ lib
 \begin_inset  Tabular
 <lyxtabular version="3" rows="2" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -854,7 +1470,7 @@ Path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -862,7 +1478,7 @@ Path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -874,9 +1490,7 @@ Win32 default
 
 
 \emph on 
-$DATADIR/
-\emph default 
-doc
+$DOCDIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -905,9 +1519,19 @@ doc
 \end_inset 
 
 
+\newline 
+
+\newline 
+The install paths can still be changed during `make install` with e.g.:
+\layout LyX-Code
+
+make install prefix=$(HOME)/local/sdcc
+\layout Standard
+
+Of course this doesn't change the search paths compiled into the binaries.
 \layout Subsection
 
-Search paths
+Search Paths
 \layout Standard
 
 Some search paths or parts of them are determined by configure variables
@@ -916,7 +1540,7 @@ Some search paths or parts of them are determined by configure variables
 italics
 \emph default 
 , see section above).
Other search paths are determined by environment variables during runtime.
Further search paths are determined by environment variables during runtime.
  
 \newline 
 The paths searched when running the compiler are as follows (the first catch
@@ -931,9 +1555,9 @@ The paths searched when running the compiler are as follows (the first catch
 \begin_inset  Tabular
 <lyxtabular version="3" rows="4" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" width="0pt">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" width="0in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -948,7 +1572,7 @@ Search path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -956,7 +1580,7 @@ Search path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -968,7 +1592,7 @@ Win32 default
 
 $SDCC_HOME/
 \emph on 
-$BIN_DIR_SUFFIX
+$PPREFIX2BIN_DIR
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -1057,9 +1681,9 @@ $PATH
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" width="1.5in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="block" valignment="top" leftline="true" width="1.5in">
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -1074,7 +1698,7 @@ Search path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1082,7 +1706,7 @@ Search path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -1118,7 +1742,7 @@ Win32 default
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@@ -1126,7 +1750,7 @@ $SDCC_INCLUDE_PATH
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1134,7 +1758,7 @@ $SDCC_INCLUDE_PATH
 
 \layout Standard
 
-$SDCC_INCLUDE_PATH
+$SDCC_INCLUDE
 \end_inset 
 </cell>
 </row>
@@ -1148,7 +1772,7 @@ $SDCC_HOME/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
 \newline 
 $INCLUDE_DIR_SUFFIX
 \end_inset 
@@ -1158,7 +1782,7 @@ $INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-$SDCC_HOME/
+$SDCC_ HOME/
 \newline 
 share/sdcc/
 \newline 
@@ -1182,11 +1806,11 @@ include
 
 \layout Standard
 
-path(argv[0])/../
+path(argv[0])/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
 \emph default 
 
 \newline 
@@ -1200,7 +1824,49 @@ $INCLUDE_DIR_SUFFIX
 
 \layout Standard
 
-(not on *nix)
+path(argv[0])/
+\newline 
+../sdcc/include
+\newline 
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+\SpecialChar ~
+
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1287,9 +1953,9 @@ model
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="left" valignment="top" leftline="true" width="1.7in">
+<column alignment="block" valignment="top" leftline="true" width="1.7in">
 <column alignment="left" valignment="top" leftline="true" width="1.2in">
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="1.2in">
+<column alignment="block" valignment="top" leftline="true" rightline="true" width="1.2in">
 <row topline="true" bottomline="true">
 <cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -1304,7 +1970,7 @@ Search path
 
 \layout Standard
 
-*nix default
+default
 \end_inset 
 </cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@@ -1312,7 +1978,7 @@ Search path
 
 \layout Standard
 
-Win32 default
+Win32 builds
 \end_inset 
 </cell>
 </row>
@@ -1348,7 +2014,7 @@ Win32 default
 
 \layout Standard
 
-$SDCC_LIB_PATH/
+$SDCC_LIB/
 \newline 
 
 \emph on 
@@ -1360,7 +2026,7 @@ $SDCC_LIB_PATH/
 
 \layout Standard
 
-$SDCC_LIB_PATH/
+$SDCC_LIB/
 \newline 
 
 \emph on 
@@ -1372,7 +2038,7 @@ $SDCC_LIB_PATH/
 
 \layout Standard
 
-$SDCC_LIB_PATH
+$SDCC_LIB
 \backslash 
 
 \newline 
@@ -1392,7 +2058,7 @@ $SDCC_HOME/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$PREFIX2DATA_DIR/
 \newline 
 $LIB_DIR_SUFFIX/<model>
 \end_inset 
@@ -1434,12 +2100,16 @@ lib
 
 \layout Standard
 
-path(argv[0]/../
+path(argv[0])/
 \newline 
 
 \emph on 
-$SEARCH_SUFFIX/
+$BIN2DATADIR/
+\emph default 
+
 \newline 
+
+\emph on 
 $LIB_DIR_SUFFIX/<model>
 \end_inset 
 </cell>
@@ -1448,7 +2118,11 @@ $LIB_DIR_SUFFIX/<model>
 
 \layout Standard
 
-(not on *nix)
+path(argv[0])/
+\newline 
+../sdcc/lib/
+\emph on 
+<model>
 \newline 
 \SpecialChar ~
 \SpecialChar ~
@@ -1488,6 +2162,7 @@ $LIB_DIR_SUFFIX/<model>
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
+\SpecialChar ~
 
 \end_inset 
 </cell>
@@ -1496,22 +2171,18 @@ $LIB_DIR_SUFFIX/<model>
 
 \layout Standard
 
-path(argv[0]
+path(argv[0])
 \backslash 
+
+\newline 
 ..
 \backslash 
 lib
 \backslash 
 
 \emph on 
-
-\newline 
 <model>
 \newline 
-
-\emph default 
-\SpecialChar ~
-\SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
 \SpecialChar ~
@@ -1592,7 +2263,7 @@ lib/
 
 \layout Comment
 
-Don't delete any of the stray spaces in the table line 5 without checking
+Don't delete any of the stray spaces in the table above without checking
  the HTML output (last line)!
 \layout Standard
 
@@ -1602,7 +2273,10 @@ Don't delete any of the stray spaces in the table line 5 without checking
 The option ---nostdlib disables the last two search paths.
 \layout Subsection
 
-Linux and other gcc-based systems (cygwin, mingw32, osx)
+Building SDCC
+\layout Subsubsection
+
+Building SDCC on Linux
 \layout Enumerate
 
 
@@ -1696,9 +2370,37 @@ Type
 \series default 
  This copies the binary executables, the include files, the libraries and
  the documentation to the install directories.
-\layout Subsection
+\layout Subsubsection
 
-Windows 
+Building SDCC on OSX 2.x
+\layout Standard
+
+Follow the instruction for Linux.
+\newline 
+
+\newline 
+On OSX 2.x it was reported, that the default gcc (version 3.1 20020420 (prerelease
+)) fails to compile SDCC.
+ Fortunately there's also gcc 2.9.x installed, which works fine.
+ This compiler can be selected by running 'configure' with:
+\layout LyX-Code
+
+./configure CC=gcc2 CXX=g++2
+\layout Subsubsection
+
+Crosscompiling SDCC on Linux for Windows
+\layout Standard
+
+With the Mingw32 gcc crosscompiler it's easy to compile SDCC for Win32.
+ See section 'Configure Options'.
+\layout Subsubsection
+
+Building SDCC on Windows 
+\layout Standard
+
+With the exception of Cygwin the SDCC binaries uCsim and sdcdb can't be
+ built on Windows.
+ They use Unix-sockets, which are not available on Win32.
 \layout Subsubsection
 
 Windows Install Using a Binary Package
@@ -1710,28 +2412,14 @@ Download the binary package and unpack it using your favorite unpacking
  An example directory structure after unpacking the mingw32 package is:
  c:
 \backslash 
-usr
-\backslash 
-local
+sdcc
 \backslash 
 bin for the executables, c:
 \backslash 
-usr
-\backslash 
-local
-\backslash 
-share
-\backslash 
 sdcc
 \backslash 
 include and c:
 \backslash 
-usr
-\backslash 
-local
-\backslash 
-share
-\backslash 
 sdcc
 \backslash 
 lib for the include and libraries.
@@ -1741,14 +2429,152 @@ Adjust your environment variable PATH to include the location of the bin
  directory or start sdcc using the full path.
 \layout Subsubsection
 
-Windows Install Using Cygwin and Mingw32
+Building SDCC using Cygwin and Mingw32
 \layout Standard
 
-Follow the instruction in 
-\series bold 
-Linux and other gcc-based systems
-\series default 
+For building and installing a Cygwin executable follow the instructions
+ for Linux.
+\newline 
+
+\newline 
+On Cygwin a 
+\begin_inset Quotes sld
+\end_inset 
+
+native
+\begin_inset Quotes srd
+\end_inset 
+
+ Win32-binary can be built, which will not need the Cygwin-DLL.
+ For the necessary 'configure' options see section 'configure options' or
+ the script 'sdcc/support/scripts/sdcc_cygwinmingw32'.
+\newline 
+
+\newline 
+In order to install Cygwin on Windows download setup.exe from 
+\begin_inset LatexCommand \url[www.cygwin.com]{http://www.cygwin.com/}
+
+\end_inset 
+
 .
+ Run it, set the 
+\begin_inset Quotes sld
+\end_inset 
+
+default text file type
+\begin_inset Quotes srd
+\end_inset 
+
+ to 
+\begin_inset Quotes sld
+\end_inset 
+
+unix
+\begin_inset Quotes srd
+\end_inset 
+
+ and download/install at least the following packages.
+ Some packages are selected by default, others will be automatically selected
+ because of dependencies with the manually selected packages.
+ Never deselect these packages!
+\layout Itemize
+
+flex
+\layout Itemize
+
+bison
+\layout Itemize
+
+gcc ; version 3.x is fine, no need to use the old 2.9x
+\layout Itemize
+
+binutils ; selected with gcc
+\layout Itemize
+
+make
+\layout Itemize
+
+rxvt ; a nice console, which makes life much easier under windoze (see below)
+\layout Itemize
+
+man ; not really needed for building SDCC, but you'll miss it sooner or
+ later
+\layout Itemize
+
+less ; not really needed for building SDCC, but you'll miss it sooner or
+ later
+\layout Itemize
+
+cvs ; only if you use CVS access
+\layout Standard
+
+If you want to develop something you'll need:
+\layout Itemize
+
+python ; for the regression tests
+\layout Itemize
+
+gdb ; the gnu debugger, together with the nice GUI 
+\begin_inset Quotes sld
+\end_inset 
+
+insight
+\begin_inset Quotes srd
+\end_inset 
+
+
+\layout Itemize
+
+openssh ; to access the CF or commit changes
+\layout Itemize
+
+autoconf and autoconf-devel ; if you want to fight with 'configure', don't
+ use autoconf-stable!
+\layout Standard
+
+rxvt is a nice console with history.
+ Replace in your cygwin.bat the line
+\layout LyX-Code
+
+bash --login -i 
+\layout Standard
+
+with (one line):
+\layout LyX-Code
+
+rxvt -sl 1000 -fn "Lucida Console-12" -sr -cr red
+\layout LyX-Code
+
+     -bg black -fg white -geometry 100x65 -e bash --login
+\layout Standard
+
+Text selected with the mouse is automatically copied to the clipboard, pasting
+ works with shift-insert.
+\newline 
+
+\newline 
+The other good tip is to make sure you have no //c/-style paths anywhere,
+ use /cygdrive/c/ instead.
+ Using // invokes a network lookup which is very slow.
+ If you think 
+\begin_inset Quotes sld
+\end_inset 
+
+cygdrive
+\begin_inset Quotes srd
+\end_inset 
+
+ is too long, you can change it with e.g.
+\layout LyX-Code
+
+mount -s -u -c /mnt
+\layout Standard
+
+SDCC sources use the unix line ending LF.
+ Life is much easier, if you store the source tree on a drive, which is
+ mount in binary mode.
+ And use an editor which can handle LF-only line endings.
+ Make sure not to commit files with windows line endings.
 \layout Subsubsection
 
 Windows Install Using Microsoft Visual C++ 6.0/NET
@@ -1969,6 +2795,13 @@ del /s *.obj *.lib *.rul
  from the sdcc directory.
 \layout Subsection
 
+Building the Documentation
+\layout Standard
+
+...
+ coming soon
+\layout Subsection
+
 Testing out the SDCC Compiler
 \layout Standard
 
@@ -2157,7 +2990,7 @@ SDCC does not build correctly.
 
 A thing to try is starting from scratch by unpacking the .tgz source package
  again in an empty directory.
- Confure it like:
+ Configure it like:
 \newline 
 
 \newline 
@@ -3448,7 +4281,16 @@ cyclomatic complexity
 ---i-code-in-asm
 \series default 
  Include i-codes in the asm file.
- Looks like noise but is most helpfull for debugging the compiler itself.
+ Sounds like noise but is most helpfull for debugging the compiler itself.
+\layout List
+\labelwidthstring 00.00.0000
+
+
+\series bold 
+---less-pedantic
+\series default 
+ Disable some of the more pedantic warnings (jwk burps: please be more specific
+ here, please!)
 \layout Subsubsection
 
 Intermediate Dump Options
@@ -3605,33 +4447,13 @@ TMPDIR
 
 
 \series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_BIN_PATH)
-\series default 
- Path, see 
-\begin_inset Quotes sld
-\end_inset 
-
-2.1 Install and search paths
-\begin_inset Quotes srd
-\end_inset 
-
-.
-\layout List
-\labelwidthstring 00.00.0000
-
-
-\series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_INCLUDE_PATH)
+SDCC_HOME
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -3641,15 +4463,13 @@ SDCC_INCLUDE_PATH)
 
 
 \series bold 
-(coming\SpecialChar ~
-soon:\SpecialChar ~
-SDCC_LIB_PATH)
+SDCC_INCLUDE
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -3659,17 +4479,13 @@ SDCC_LIB_PATH)
 
 
 \series bold 
-SDCCDIR\SpecialChar ~
-(soon\SpecialChar ~
-replaced\SpecialChar ~
-by:\SpecialChar ~
-SDCCPATH)
+SDCC_LIB
 \series default 
  Path, see 
 \begin_inset Quotes sld
 \end_inset 
 
-2.1 Install and search paths
+2.3 Install and search paths
 \begin_inset Quotes srd
 \end_inset 
 
@@ -4165,9 +4981,9 @@ Interrupt Numbers and the corresponding address & descriptions for the Standard
 \begin_inset  Tabular
 <lyxtabular version="3" rows="6" columns="3">
 <features>
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" width="0pt">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" width="0in">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0in">
 <row topline="true" bottomline="true">
 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
@@ -6745,15 +7561,17 @@ Pragmas
 \layout Standard
 
 SDCC supports the following #pragma directives.
- This directives are applicable only at a function level.
 \layout Itemize
 
-SAVE - this will save all the current options.
+SAVE - this will save all current options to the SAVE/RESTORE stack.
+ See RESTORE.
 \layout Itemize
 
-RESTORE - will restore the saved options from the last save.
- Note that SAVES & RESTOREs cannot be nested.
- SDCC uses the same buffer to save the options each time a SAVE is called.
+RESTORE - will restore saved options from the last save.
+ SAVEs & RESTOREs can be nested.
+ SDCC uses a SAVE/RESTORE stack: SAVE pushes current options to the stack,
+ RESTORE pulls current options from the stack.
+ See SAVE.
 \layout Itemize
 
 NOGCSE - will stop global subexpression elimination.
@@ -6770,6 +7588,10 @@ NOOVERLAY - the compiler will not overlay the parameters and local variables
  of a function.
 \layout Itemize
 
+LESS_PEDANTIC - the compiler will not warn you anymore for obvious mistakes,
+ you'r on your own now ;-(
+\layout Itemize
+
 NOLOOPREVERSE - Will not do loop reversal optimization
 \layout Itemize
 
@@ -6794,18 +7616,18 @@ CALLEE-SAVES function1[,function2[,function3...]] - The compiler by default
  uses a caller saves convention for register saving across function calls,
  however this can cause unneccessary register pushing & popping when calling
  small functions from larger functions.
- This option can be used to switch the register saving convention for the
- function names specified.
+ This option can be used to switch off the register saving convention for
the function names specified.
  The compiler will not save registers when calling these functions, extra
- code will be generated at the entry & exit for these functions to save
- & restore the registers used by these functions, this can SUBSTANTIALLY
+ code need to be manually inserted at the entry & exit for these functions
to save & restore the registers used by these functions, this can SUBSTANTIALLY
  reduce code & improve run time performance of the generated code.
- In future the compiler (with interprocedural analysis) will be able to
- determine the appropriate scheme to use for each function call.
+ In the future the compiler (with interprocedural analysis) may be able
to determine the appropriate scheme to use for each function call.
  If ---callee-saves command line option is used, the function names specified
  in #pragma\SpecialChar ~
-CALLEE-SAVES is appended to the list of functions specified inthe
- command line.
+CALLEE-SAVES is appended to the list of functions specified in
the command line.
 \layout Standard
 
 The pragma's are intended to be used to turn-off certain optimizations which