|
@@ -626,7 +626,10 @@ for a configuration file \file{fpc.cfg} in the following places:
|
|
\item The current directory.
|
|
\item The current directory.
|
|
\item In your home directory, it looks for \file{.fpc.cfg}.
|
|
\item In your home directory, it looks for \file{.fpc.cfg}.
|
|
\item The directory specified in the environment variable
|
|
\item The directory specified in the environment variable
|
|
-\var{PPC\_CONFIG\_PATH}, and if it's not set under \file{/etc}.
|
|
|
|
|
|
+\var{PPC\_CONFIG\_PATH}, and if it is not set, it will look in the
|
|
|
|
+\file{etc} directory above the compiler directory. (for instance, if the
|
|
|
|
+compiler is in \file{/usr/local/bin}, it will look in \file{/usr/local/etc})
|
|
|
|
+\item In the directory \file{/etc}.
|
|
\end{enumerate}
|
|
\end{enumerate}
|
|
\item Under all other OSes:
|
|
\item Under all other OSes:
|
|
\begin{enumerate}
|
|
\begin{enumerate}
|
|
@@ -724,93 +727,6 @@ Not only is it possible to compile a shared library under \windows and
|
|
\linux, but also it is possible to take existing units and put them
|
|
\linux, but also it is possible to take existing units and put them
|
|
together in 1 static or shared library (using the \file{ppumove} tool)
|
|
together in 1 static or shared library (using the \file{ppumove} tool)
|
|
|
|
|
|
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
-% Creating an executable for GO32V1, PMODE/DJ targets
|
|
|
|
-\section{Creating an executable for GO32V1 and PMODE/DJ targets}
|
|
|
|
-\label{go32v1}
|
|
|
|
-
|
|
|
|
-The GO32V1 platform is officially no longer supported, so this section
|
|
|
|
-is of interest only to people who wish to make go32V1 binaries anyway.
|
|
|
|
-
|
|
|
|
-%
|
|
|
|
-% GO32V1
|
|
|
|
-%
|
|
|
|
-\subsection{GO32V1}
|
|
|
|
-When compiling under \dos, GO32V2 is the default target. However, if you use
|
|
|
|
-go32V1 (using the \var{-TGO32V1} switch), the
|
|
|
|
-compilation process leaves you with a file which you cannot execute right away.
|
|
|
|
-There are 2 things you can do when compiling has finished.
|
|
|
|
-
|
|
|
|
-The first thing is to use the \dos extender from D.J. Delorie to execute
|
|
|
|
-your program :
|
|
|
|
-\begin{verbatim}
|
|
|
|
- go32 prog
|
|
|
|
-\end{verbatim}
|
|
|
|
-This is fine for testing, but if you want to use a program regularly, it
|
|
|
|
-would be easier if you could just type the program name, i.e.
|
|
|
|
-\begin{verbatim}
|
|
|
|
- prog
|
|
|
|
-\end{verbatim}
|
|
|
|
-This can be accomplished by making a \dos executable of your compiled program.
|
|
|
|
-
|
|
|
|
-There two ways to create a \dos executable (under \dos only):
|
|
|
|
-\begin{enumerate}
|
|
|
|
-\item if the \file{GO32.EXE} is already
|
|
|
|
-installed on the computers where the program should run, you must
|
|
|
|
-only copy a program called \file{STUB.EXE} at the begin of
|
|
|
|
-the AOUT file. This is accomplished with the \file{AOUT2EXE.EXE} program.
|
|
|
|
-which comes with the compiler:
|
|
|
|
-\begin{verbatim}
|
|
|
|
-AOUT2EXE PROG
|
|
|
|
-\end{verbatim}
|
|
|
|
-and you get a \dos executable which loads the \file{GO32.EXE} automatically.
|
|
|
|
-the \file{GO32.EXE} executable must be in current directory or be
|
|
|
|
-in a directory in the \var{PATH} variable.
|
|
|
|
-\item
|
|
|
|
-The second way to create a \dos executable is to put
|
|
|
|
-\file{GO32.EXE} at the beginning of the \file{AOUT} file. To do this, at the
|
|
|
|
-command prompt, type :
|
|
|
|
-\begin{verbatim}
|
|
|
|
-COPY /B GO32.EXE+PROG PROG.EXE
|
|
|
|
-\end{verbatim}
|
|
|
|
-(assuming \fpc created a file called \file{PROG}, of course.)
|
|
|
|
-This becomes then a stand-alone executable for \dos, which doesn't need the
|
|
|
|
-\file{GO32.EXE} on the machine where it should run.
|
|
|
|
-\end{enumerate}
|
|
|
|
-
|
|
|
|
-%
|
|
|
|
-%
|
|
|
|
-
|
|
|
|
-% PMODE/DJ
|
|
|
|
-\subsection{PMODE/DJ}
|
|
|
|
-You can also use the PMODE/DJ extender to run your \fpc applications.
|
|
|
|
-To make an executable which works with the PMODE extender, you can simply
|
|
|
|
-create an GO32V2 executable (the default), and then convert it to a PMODE
|
|
|
|
-executable with the following two extra commands:
|
|
|
|
-\begin{enumerate}
|
|
|
|
-\item First, strip the GO32V2 header of the executable:
|
|
|
|
-\begin{verbatim}
|
|
|
|
-EXE2COFF PROG.EXE
|
|
|
|
-\end{verbatim}
|
|
|
|
-(we suppose that \file{PROG.EXE} is the program generated by the compilation
|
|
|
|
-process.
|
|
|
|
-\item Secondly, add the PMODE stub:
|
|
|
|
-\begin{verbatim}
|
|
|
|
-COPY /B PMODSTUB.EXE+PROG PROG.EXE
|
|
|
|
-\end{verbatim}
|
|
|
|
-If the \file{PMODSTUB.EXE} file isn't in your local directory, you need to
|
|
|
|
-supply the whole path to it.
|
|
|
|
-\end{enumerate}
|
|
|
|
-
|
|
|
|
-That's it. No additional steps are needed to create a PMODE extender
|
|
|
|
-executable.
|
|
|
|
-
|
|
|
|
-Be aware, though, that the PMODE extender doesn't support virtual memory, so
|
|
|
|
-if you're short on memory, you may run unto trouble. Also, officially there
|
|
|
|
-is not support for the PMODE/DJ extender. It just happens that the compiler
|
|
|
|
-and some of the programs it generates, run under this extender too.
|
|
|
|
-
|
|
|
|
-
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
% Reducing the size of your program
|
|
% Reducing the size of your program
|
|
\section{Reducing the size of your program}
|
|
\section{Reducing the size of your program}
|
|
@@ -1484,18 +1400,17 @@ To avoid having to edit your configuration files too often,
|
|
the compiler allows you to specify the following variables in
|
|
the compiler allows you to specify the following variables in
|
|
the paths that you feed to the compiler:
|
|
the paths that you feed to the compiler:
|
|
\begin{description}
|
|
\begin{description}
|
|
-\item[FPCVER] is replaced by the compiler's full version string.
|
|
|
|
|
|
+\item[FPCFULLVERSION] is replaced by the compiler's version string.
|
|
|
|
+\item[FPCVERSION] is replaced by the compiler's version string.
|
|
\item[FPCDATE] is replaced by the compiler's date.
|
|
\item[FPCDATE] is replaced by the compiler's date.
|
|
-\item[FPCTARGET] is replaced by the compiler's target CPU
|
|
|
|
-(deprecated).
|
|
|
|
|
|
+\item[FPCTARGET] is replaced by the compiler's target (combination of CPU-OS)
|
|
\item[FPCCPU] is also replaced by the compiler's target CPU.
|
|
\item[FPCCPU] is also replaced by the compiler's target CPU.
|
|
-\item[TARGET] is replaced by the compiler's target OS (deprecated).
|
|
|
|
\item[FPCOS] is replaced by the compiler's target OS.
|
|
\item[FPCOS] is replaced by the compiler's target OS.
|
|
\end{description}
|
|
\end{description}
|
|
To have these variables subsituted, just insert them with a \var{\$}
|
|
To have these variables subsituted, just insert them with a \var{\$}
|
|
prepended, as follows:
|
|
prepended, as follows:
|
|
\begin{verbatim}
|
|
\begin{verbatim}
|
|
--Fu/usr/lib/fpc/$FPCVER/rtl/$FPCOS
|
|
|
|
|
|
+-Fu/usr/lib/fpc/$FPCVERSION/rtl/$FPCOS
|
|
\end{verbatim}
|
|
\end{verbatim}
|
|
This is equivalent to
|
|
This is equivalent to
|
|
\begin{verbatim}
|
|
\begin{verbatim}
|