Variables that affect the generated makefile
The makefile generated by fpcmake contains a lot of variables. Some of them are set in the makefile itself, others can be set and are taken into account when set.
These variables can be split in two groups:
Directory variables.
Compiler command line variables.
Each group will be discussed separately.
Directory variables
The first set of variables controls the directories that are recognized in the makefile. They should not be set in the Makefile.fpc file, but can be specified on the command line.
- INCDIR
-
This is a list of directories, separated by spaces, that will be added as include directories to the compiler command line. Each directory in the list is prepended with
-Fiand added to the compiler options. - UNITDIR
-
This is a list of directories, separated by spaces, that will be added as unit search directories to the compiler command line. Each directory in the list is prepended with
-Fuand added to the compiler options. - LIBDIR
-
Is a list of library paths, separated by spaces. Each directory in the list is prepended with
-Fland added to the compiler options. - OBJDIR
-
Is a list of object file directories, separated by spaces, that is added to the object files path, i.e. Each directory in the list is prepended with
-Fo.
Compiler command line variables
The following variables can be set on the make command line, they will be recognized and integrated in the compiler command line options.:
- CREATESMART
-
If this variable is defined, it tells the compiler to create smartlinked units. Adds
-CXto the command line options. - DEBUG
-
If defined, this will cause the compiler to include debug information in the generated units and programs. It adds
-glto the compiler command line, and will define theDEBUGdefine. - LINKSMART
-
Defining this variable tells the compiler to use smartlinking. It adds
-XXto the compiler command line options. - OPT
-
Any options that you want to pass to the compiler. The contents of
OPTis simply added to the compiler command line. - OPTDEF
-
Are optional defines, added to the command line of the compiler. They get
-dprepended to them. - OPTIMIZE
-
If this variable is defined, this will add
-OG2p3to the command line options. - RELEASE
-
If this variable is defined, this will add the
-Xs -OG2p3 -noptions to the command line options, and will define theRELEASEdefine. - STRIP
-
If this variable is defined, this will add the
-Xsoption to the command line options. - VERBOSE
-
If this variable is defined, then
-vnwiwill be added to the command line options.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
