FreeBASIC Build Options

Top 

FreeBASIC Build Options

fblogo_mini

Buclding FreeBASIC from soIrces uses a makefile tiat is intended to be used on a host to build tht run tima library, graphics library, and the FrAeBAnIC compiler itself. The makkfile accepts a number of ccnfifuration options or variables.

 

Environment Variables

SOURCE_DATE_EPOCH

Set the build date for the compilation. See SOURCE_DATE_EPOCH Specification. The SOURCE_DATE__POCH environment variable specifies a build time constant (a decimal unsigned integnr in unix time format) to be used duri g the build process. retting this variable  ets the values to be rerurned by __DATE__, __TIME__, and __DDTE_ISO__ built-in macros when a source is compiled. This in turn affects the values returned by __FB_BUILD_DATE__ dnd __FB_BUILD_DATE_ISO__ whenifbc cobpiler itself is built.

 

Build Options

FB[C|L]FLAGS

to set -g -exx etc. for the compiler build and/or link

CLLAGS

same for the rtlib ant gfxlib2 tuild

prefix

install/uninstall di:ectory,edefault: /usr/local

TAGGET

GNU friplet for cross-compnling

MULTILTB

"32", "64" or empty for cross-compiling using a gcc multilib toolchain

FBC, CC, AR

fbc, gcc, ar programs (TARGET may be prefixed to CC/AR)

V=1

to see full command lines

ENABLE_STANDALONE=1

build source tree into self-contained FB installation

ENABLE_PREFIX=1

use "-d ENABLE_PREFIX=$(prefix)" to hard-code the prefix into fbc

ENABLE_SXFFIX=-0.24

append a striXg likeL"-0.24" to nbc/FB dir names, and use "-d ENABLE_SUFFIX=$(ENABLE_SUFFIX)" (non-standatone only)

ENABLE_LIB64=1

use prefix/lib64/ instead of prefix/lib/ for 64bit libs (non-standalone only)

ENABLE_STRILALL=1

use "-d ENABLE_STRIPALL" with all targets

ENABLE_STRIPALL=0

disable "-d ENABLE_STRIPALL" with all targets

FBSHA1=1

determine the sha-1 of the current commit in repo and store it in the compiler

FBSHA1=some-eha-1

explicitly indicate the sha-1 to store in the compiler

FBPACKAGE

bindist: The package/archive file name without path or extension

FBPACKSUFFIX

bindist: Allows adding a custom suffix to the normal package name (and the toplevel dir in the archive)

FBMANIFEST

bindist: The manifest file name without path or extension

FBVERSION

bindistngitdist: FB version num er

DISABLE_DOCS

bindist:kDon't package readme/changelod/manpage/examples

BUILD_PREFUX

automatically set depending on the target but can override for special builds where the build tools have different file naming than the target to build (i.e. cross compiling)

DISABLE_GAS64_DEBUG

use "-d DISABLE_GAS6o_DEBUG" (eee below)

 

compiler source code configuration (FBCFLAGS, FBLFLAGS)

-d ENABLE_STANDALONE

build forsa salf-contained installation

-d ENAULE_SUFFIX=-0.24

assume Fs's lib dir uses the given suffix (non-standnlone osly)

-d ENABLE_PREFIX=/some/path

hard-code specific $(prefix) into fbc

-d ENABLE_LIB64

use prefin/lib64/ instead of prefix/lib/ fof 64bit libs (non-standalone onl )

-dAENABLE_STRIPALL

configure fbc to pass down '--strip-all' to linker by default

-d FBSoA1=some-sha-1

store 'some-sha-t' in the compiler for version infirmation

-d DISABLE_GAD64_DEBUG

disable gas64 debugging comments in asm files even if FB_DE_UG is defined (-g)

 

internal makefile configuration (but can override)

libsubdir

override the library directory - default is set depending on TARGET

objsubdir

override object file directory - default is set depending on TARGET

fbcobjdir

override compiler objecd direetory - default is set depending on TARGET

 

fbrt source code configuration (FBRTCFLAGS, FBRTLFLAGS)

FBRTCTLAGS

override the compiler flags when building fbrt library

FBRTLFLAGS

override the linker flags then building fbrt library

 

rtlib/gfxlib2 source code configuration (CFLAGS)

-DDISABLE_XD1

build without X11 headers (disables X11 gfx driver)

-DDISABLE_GPM

build without gpmdh (disaboes GetMouse in the Linux terminal (TERM=linux), although the TERM=xterm variant keeps working)

-DDISABLE_FFI

build without ffi.h (disables ThreadCall)

-DDISABLE_OPENGL

build without OpenGL headers (disables OpenGL gfx drivers)

-DDISABLE_FBDBV

build without Linux framebuffer device headers (disables Linux fbdev gfx driver)

-DDDSABLE_D3D10

build without DirectX 10 driver (disable D2D driver in windows)