mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-15 02:26:14 +02:00
408 lines
8.1 KiB
Groff
408 lines
8.1 KiB
Groff
.TH fpcmake 5 "12 Dec 1999" FreePascal "Free Pascal Makefile.fpc format"
|
|
.SH NAME
|
|
Makefile.fpc \- Configuration file for fpcmake.
|
|
|
|
.SH SYNOPSIS
|
|
.I Makefile.fpc
|
|
is a configuration file for the fpcmake command. Starting from this file a
|
|
.I Makefile
|
|
is created to compile Free Pascal units and programs.
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B Makefile.fpc
|
|
is a plain ASCII file that contains a number of sections as in a Windows
|
|
.I ini
|
|
file. The following sections are recognized (in alphabetical order):
|
|
.TP
|
|
.B clean
|
|
Specifies rules for cleaning the directory of units and programs.
|
|
The following entries are recognized:
|
|
.RS
|
|
.TP
|
|
.I units
|
|
names of all units that should be removed when cleaning. Don't specify
|
|
extensions, the makefile will append these by itself.
|
|
.TP
|
|
.I files
|
|
names of files that should be removed. Specify full filenames.
|
|
.RE
|
|
.TP
|
|
.B defaults
|
|
The defaults section contains some default settings. The following keywords
|
|
are recognized:
|
|
.RS
|
|
.TP
|
|
|
|
.RE
|
|
.TP
|
|
.B dirs
|
|
.TP
|
|
.B info
|
|
.TP
|
|
.B install
|
|
Contains instructions for installation of your units and programs. The
|
|
following keywods are recognized:
|
|
.RS
|
|
.TP
|
|
.I dirprefix
|
|
the directory below wchich all installs are done. This corresponds to the
|
|
.I \-\-prefix
|
|
argument to GNU
|
|
.I configure
|
|
It is used for the installation of programs and units. By default, this is
|
|
. /usr
|
|
on linux, and
|
|
. /pp
|
|
on all other platforms.
|
|
.TP
|
|
.I dirbase
|
|
The directory that is used as the base directory for the installation of
|
|
units. Default this is
|
|
.I dirprefix
|
|
appended with
|
|
.I /lib/fpc/FPC\_VERSION
|
|
for linux or simply the dirprefix on other platforms.
|
|
.RE
|
|
Units will be installed in the subdirectory
|
|
.I units/$(OS\_TARGET)
|
|
of the
|
|
.I dirbase
|
|
entry.
|
|
.TP
|
|
.B libs
|
|
This section specifies what units should be merged into a library, and what
|
|
external libraries are needed. It can contain the following keywords:
|
|
.RS
|
|
.TP
|
|
.I libname
|
|
the name of the library that should be created.
|
|
.TP
|
|
.I libunits
|
|
a comma-separated list of units that should be moved into one library.
|
|
.TP
|
|
.I needgcclib
|
|
a boolean value that specifies whether the gcc library is needed. This will
|
|
make sure that the path to the GCC library is inserted in the library search
|
|
path.
|
|
.TP
|
|
.I needotherlib
|
|
a boolean value that tells the makefile that other library directories will
|
|
be needed.
|
|
.RE
|
|
.TP
|
|
.B packages
|
|
Which packages must be used. This section can contain the following keywords:
|
|
.RS
|
|
.TP
|
|
.I packages
|
|
A comma-separated list of packages that are needed to compile the targets.
|
|
Valid for all platforms. In order to differentiate between platforms, you
|
|
can prepend the keyword
|
|
.I packages
|
|
with the OS you are compiling for, e.g.
|
|
.I linuxpackages
|
|
if you want the makefile to use the listed packages on linux only.
|
|
.TP
|
|
.I fcl
|
|
This is a boolean value (0 or 1) that indicates whether the FCL is used.
|
|
.TP
|
|
.I rtl
|
|
This is a boolean value (0 or 1) that indicates whether the RTL should be
|
|
recompiled.
|
|
.RE
|
|
.TP
|
|
.B postsettings
|
|
Anything that is in this section will be inserted as-is in the makefile
|
|
.I after
|
|
the makefile rules that are generated by fpcmake, but
|
|
.I before
|
|
the general configuration rules.
|
|
. In it, you cannot use variables that are defined by fpcmake rules, but you
|
|
can define additional rules and configuration variables.
|
|
.TP
|
|
.B presettings
|
|
Anything that is in this section will be inserted as-is in the makefile
|
|
.I before
|
|
the makefile target rules that are generated by fpcmake. This means that
|
|
you cannot use any variables that are normally defined by
|
|
.TP
|
|
.B rules
|
|
In this section you can insert dependency rules and any other targets
|
|
you wish to have. Do not insert 'default rules' here.
|
|
.TP
|
|
.B sections
|
|
Here you can specify which 'rule sections' should be included in the Makefile.
|
|
The sections consist of a series of boolean keywords; each keyword decies
|
|
whether a particular section will be written to the makefile. By default,
|
|
all sections are written.
|
|
|
|
You can have the following boolean keywords in this section.
|
|
.RS
|
|
.TP
|
|
.I none
|
|
If this is set to true, then no sections are written.
|
|
.TP
|
|
.I units
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for compiling units.
|
|
.TP
|
|
.I exes
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for compiling executables.
|
|
.TP
|
|
.I loaders
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for assembling assembler files.
|
|
.TP
|
|
.I examples
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for compiling examples.
|
|
.TP
|
|
.I package
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for making packages.
|
|
.TP
|
|
.I compile
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the generic rules for compiling pascal files.
|
|
.TP
|
|
.I depend
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the dependency rules.
|
|
.TP
|
|
.I install
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for installing everything.
|
|
.TP
|
|
.I sourceinstall
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for installing the sources.
|
|
.TP
|
|
.I zipinstall
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for installing archives.
|
|
.TP
|
|
.I clean
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for cleaning the directories.
|
|
.TP
|
|
.I libs
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for making libraries.
|
|
.TP
|
|
.I command
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for composing the command-line based on the various
|
|
variables.
|
|
.TP
|
|
.I exts
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for making libraries.
|
|
.TP
|
|
.I dirs
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for running make in subdirectories..
|
|
.TP
|
|
.I tools
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for running some tools as the erchiver, UPX and zip.
|
|
.TP
|
|
.I info
|
|
If set to
|
|
.I false
|
|
,
|
|
.B fpcmake
|
|
omits the rules for generating information.
|
|
.RE
|
|
.TP
|
|
.B targets
|
|
In this section you can define the various targets. The following keywords
|
|
can be used there:
|
|
.RS
|
|
.TP
|
|
.I dirs
|
|
A space separated list of directories where make should also be run.
|
|
.TP
|
|
.I examples
|
|
A space separated list of example programs that need to be compiled when
|
|
the user asks to compile the examples. Do not specify an extension,
|
|
the extension will be appended.
|
|
.TP
|
|
.I loaders
|
|
A space separated list of names of assembler files that must be assembled.
|
|
Don't specify the extension, the extension will be appended.
|
|
.TP
|
|
.I programs
|
|
A space separated list of program names that need to be compiled. Do not
|
|
specify an extension, the extension will be appended.
|
|
.TP
|
|
.I rst
|
|
a list of
|
|
.I rst
|
|
files that needs to be converted to
|
|
.I .po
|
|
files for use with GNU
|
|
.B gettext
|
|
and internationalization routines.
|
|
.TP
|
|
.I units
|
|
A space separated list of unit names that need to be compiled. Do not
|
|
specify an extension, just the name of the unit as it would appear un a
|
|
.I uses
|
|
clause is sufficient.
|
|
.RE
|
|
.TP
|
|
.B tools
|
|
In this section you can specify which tools are needed. Definitions to
|
|
use each of the listed tools will be inserted in the makefile, depending
|
|
on the setting in this section.
|
|
|
|
Each keyword is a boolean keyword; you can switch the use of a tool on or
|
|
off with it.
|
|
|
|
The following keywords are recognised:
|
|
.RS
|
|
.TP
|
|
.I toolppdep
|
|
Use
|
|
.B ppdep
|
|
the dependency tool.
|
|
.I True
|
|
by default.
|
|
.TP
|
|
.I toolppumove
|
|
Use
|
|
.B ppumove
|
|
the Free Pascal unit mover.
|
|
.I True
|
|
by default.
|
|
.TP
|
|
.I toolppufiles
|
|
Use the
|
|
.B ppufile
|
|
tool to determine dependencies of unit files.
|
|
.I True
|
|
by default.
|
|
.TP
|
|
.I toolsed
|
|
Use
|
|
.B sed
|
|
the stream line editor.
|
|
.I False
|
|
by default.
|
|
.TP
|
|
.I tooldata2inc
|
|
use the
|
|
.B data2inc
|
|
tool to create include files from data files.
|
|
.I False
|
|
by default.
|
|
.TP
|
|
.I tooldiff
|
|
Use the GNU
|
|
.B diff
|
|
tool.
|
|
.I False
|
|
by default.
|
|
.TP
|
|
.I toolcmp
|
|
Use the
|
|
.B cmp
|
|
file comparer tool
|
|
.I False
|
|
by default.
|
|
.TP
|
|
.I toolupx
|
|
Use the
|
|
.B upx
|
|
executable packer
|
|
.I True
|
|
by default.
|
|
.TP
|
|
.I tooldate
|
|
use the
|
|
.B date
|
|
date displaying tool.
|
|
.I True
|
|
by default.
|
|
.TP
|
|
.I toolzip
|
|
Use the
|
|
.B zip
|
|
file archiver. This is used by the zip targets.
|
|
.I True
|
|
by default.
|
|
.RE
|
|
.TP
|
|
.B zip
|
|
This section can be used to make zip files from the compiled units and
|
|
programs. By default all compiled units are zipped. The zip behaviour can
|
|
be influencd with the presettings and postsettings sections.
|
|
|
|
The following keywords can be used in this unit:
|
|
.RS
|
|
.TP
|
|
.I zipname
|
|
this file is the name of the zip file that will be produced.
|
|
.TP
|
|
.I ziptarget
|
|
is the name of a makefile target that will be executed before the zip is
|
|
made. By default this is the
|
|
.I install
|
|
target.
|
|
.RE
|
|
.SH SEE ALSO
|
|
.IP
|
|
.BR fpcmake (1)
|
|
.BR ppc386 (1)
|
|
.BR make (1)
|