fpcmake(5)
π fpcmake(5) β the Free Pascal Makefile.fpc format π
okay bestie, sit down, hydrate, and let's talk about Makefile.fpc, the moment of the build system. this whole page is your group chat lore for how Free Pascal projects describe themselves to fpcmake.
β¨ NAME β¨
Makefile.fpc β the configuration file for fpcmake. that's the whole assignment. iconic behavior honestly. π
π¦ SYNOPSIS π¦
Makefile.fpc is a configuration file for the fpcmake command. starting from this file, a Makefile gets created to compile Free Pascal units and programs. like, you write the little config, it cooks up the whole makefile. main character energy fr fr. β¨
πΈ DESCRIPTION πΈ
Makefile.fpc is a plain ASCII file that contains a bunch of sections, exactly like a Windows ini file. no cap, same vibe. π
The following sections are recognized (in alphabetical order, because we're organized queens):
π§Ό clean
Specifies rules for cleaning the directory of units and programs. The following entries are recognized:
unitsβ names of all units that should be removed when cleaning. Don't specify extensions, the makefile will append these by itself. she knows what to do πfilesβ names of files that should be removed. Specify full filenames. yes, the whole path, don't be shy.
π«Ά defaults
The defaults section contains some default settings. The following keywords are recognized:
dirsinfo
(and they each get their own little heading below, alphabetically, because that's how the list rolls π)
π dirs
listed as a recognized section in the alphabetical lineup. the original doesn't spill more tea about it here, and neither will I. π
π¬ info
also hanging out in the alphabetical section list. that's all we've got on this one in the source. π
π¦ install
Contains instructions for installation of your units and programs. The following keywords are recognized:
dirprefixβ the directory below which all installs are done. This corresponds to the--prefixargument to GNU configure. It is used for the installation of programs and units. By default, this is/usron linux, and/ppon all other platforms. (note the platform split, bestie β linux girlies get/usr)dirbaseβ the directory that is used as the base directory for the installation of units. By default this isdirprefixappended with/lib/fpc/FPC_VERSIONfor linux, or simply thedirprefixon other platforms.
Units will be installed in the subdirectoryunits/$(OS_TARGET)of thedirbaseentry. π¦
π libs
This section specifies what units should be merged into a library, and what external libraries are needed. It can contain the following keywords:
libnameβ the name of the library that should be created.libunitsβ a comma-separated list of units that should be moved into one library.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. π₯needotherlibβ a boolean value that tells the makefile that other library directories will be needed.
π§ packages
Which packages must be used. This section can contain the following keywords:
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 keywordpackageswith the OS you are compiling for, e.g.linuxpackagesif you want the makefile to use the listed packages on linux only. platform-specific packaging, we love to see itfclβ this is a boolean value (0or1) that indicates whether the FCL is used.rtlβ this is a boolean value (0or1) that indicates whether the RTL should be recompiled.
β¬οΈ postsettings
Anything that is in this section will be inserted as-is in the makefile after the makefile rules that are generated by fpcmake, but 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. so like, you can add stuff, you just can't lean on the generated vars. π
β¬οΈ presettings
Anything that is in this section will be inserted as-is in the makefile before the makefile target rules that are generated by fpcmake.
This means that you cannot use any variables that are normally defined byβ¦ and the sentence just kinda trails off there in the original, bestie, I'm not gonna lie to you. π
π rules
In this section you can insert dependency rules and any other targets you wish to have.
Do not insert 'default rules' here. seriously. don't. periodt. π
ποΈ 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 decides 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:
noneβ if this is set totrue, then no sections are written.unitsβ if set tofalse,fpcmakeomits the rules for compiling units.exesβ if set tofalse,fpcmakeomits the rules for compiling executables.loadersβ if set tofalse,fpcmakeomits the rules for assembling assembler files.examplesβ if set tofalse,fpcmakeomits the rules for compiling examples.packageβ if set tofalse,fpcmakeomits the rules for making packages.compileβ if set tofalse,fpcmakeomits the generic rules for compiling pascal files.dependβ if set tofalse,fpcmakeomits the dependency rules.installβ if set tofalse,fpcmakeomits the rules for installing everything.sourceinstallβ if set tofalse,fpcmakeomits the rules for installing the sources.zipinstallβ if set tofalse,fpcmakeomits the rules for installing archives.cleanβ if set tofalse,fpcmakeomits the rules for cleaning the directories.libsβ if set tofalse,fpcmakeomits the rules for making libraries.commandβ if set tofalse,fpcmakeomits the rules for composing the command-line based on the various variables.extsβ if set tofalse,fpcmakeomits the rules for making libraries. (yes bestie, that's literally what it says, same words aslibsπ)dirsβ if set tofalse,fpcmakeomits the rules for running make in subdirectories..toolsβ if set tofalse,fpcmakeomits the rules for running some tools as the erchiver, UPX and zip.infoβ if set tofalse,fpcmakeomits the rules for generating information.
π― targets
In this section you can define the various targets. The following keywords can be used there:
dirsβ a space separated list of directories where make should also be run.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. β¨loadersβ a space separated list of names of assembler files that must be assembled. Don't specify the extension, the extension will be appended.programsβ a space separated list of program names that need to be compiled. Do not specify an extension, the extension will be appended.rstβ a list of rst files that needs to be converted to.pofiles for use with GNU gettext and internationalization routines. π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 uses clause is sufficient.
π οΈ 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:
toolppdepβ useppdep, the dependency tool. True by default.toolppumoveβ useppumove, the Free Pascal unit mover. True by default.toolppufilesβ use theppufiletool to determine dependencies of unit files. True by default.toolsedβ usesed, the stream line editor. False by default.tooldata2incβ use thedata2inctool to create include files from data files. False by default.tooldiffβ use the GNUdifftool. False by default.toolcmpβ use thecmpfile comparer tool. False by default.toolupxβ use theupxexecutable packer. True by default.tooldateβ use thedatedate displaying tool. True by default.toolzipβ use thezipfile archiver. This is used by the zip targets. True by default.
π€ 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 influenced with the presettings and postsettings sections. π¦
The following keywords can be used in this section:
zipnameβ this file is the name of the zip file that will be produced.ziptargetβ is the name of a makefile target that will be executed before the zip is made. By default this is theinstalltarget.
π SEE ALSO π
and that's the whole page, bestie. go forth and build. π«Ά
π this was FreePascal, dated 12 Dec 1999. old-school, still slaying, no cap. π mwah, good luck with your makefiles β you've got this, and I'm obsessed with you. πβ¨π
π¦ where this page comes from
- arch rolling: fpc 3.2.2-11 Β· GPL AND LGPL AND custom
- epel 10: fpc 3.2.2-20.el10_1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- epel 9: fpc 3.2.2-10.el9 Β· GPLv2+ and LGPLv2+ with exceptions
- fedora 43: fpc 3.2.2-20.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 43: fpc 3.2.2-20.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 44: fpc 3.2.4~rc1-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- fedora 44: fpc 3.2.4~rc1-3.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later WITH Independent-modules-exception
- nixos 26.05: fpc 3.2.2
- nixos 26.05: lazarus-gtk2 4.4-0
- nixos 26.05: lazarus-qt5 4.4-0
- nixos 26.05: lazarus-qt6 4.4-0
- nixpkgs unstable: fpc 3.2.2
- nixpkgs unstable: lazarus-cocoa 4.8-0
- nixpkgs unstable: lazarus-gtk3 4.8-0
- nixpkgs unstable: lazarus-qt5 4.8-0
- nixpkgs unstable: lazarus-qt6 4.8-0
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: fpc 3.2.2-bp160.1.35 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms