FB build configuration options



The FB makefile aswell as the compiler/rtlib/gfxlib2 source code offers some configuration options. If you build FB by using the FB makefile, then it makes sense to use the FB makefile's configuration options. If you build FB by compiling the sources manually (without using the FB makefile), then of course you can only use the source code configuration options, and you are responsible for putting the FB setup together properly yourself.

The compiler and rtlib/gfxlib2 source code both handle some #defines which allow for some configuration. For example, #defining ENABLE_STANDALONE when building the compiler (by specifying -d ENABLE_STANDALONE on the fbc command line) will adjust the compiler for a standalone setup. As another example, #defining DISABLE_FFI when building the rtlib (by specifying -DDISABLE_FFI on the gcc command line) will cause the rtlib to be built without using the libffi headers (ffi.h). This disables ThreadCall support in the rtlib, but can be useful if you do not have libffi.

When using the FB makefile, you can set some variables on the make command line or inside config.mk that affect how the makefile will invoke the fbc/gcc compilers and what directory layout it will use for the FB setup. This includes cases where the makefile will automatically pass the configuration options on to the compiler/rtlib/gfxlib2 source code. For example, specifying ENABLE_STANDALONE=1 to the FB makefile causes it to use -d ENABLE_STANDALONE when building the new compiler (to make it standalone) and to put the newly built compiler and libraries into the standalone directory layout.

FB makefile commands




FB makefile configuration

The following variables are intended to be set on the make command line or inside a file called config.mk next to the FB makefile which is read in by the FB makefile. config.mk is useful for setting variables in a permanent way such that you do not have to specify them manually everytime when invoking make.

Make command line example:

$ make CFLAGS='-O2 -g'


config.mk example:

CFLAGS = -O2 -g

















Compiler source code configuration (FBFLAGS)









-d FBFORKID="name"
This makes the compiler set a custom value for __FB_BUILD_FORK_ID__

rtlib and gfxlib2 source code configuration (CFLAGS)









See also:
Back to FreeBASIC Developer Information

Back to Table of Contents
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode