Environment Variables§

bfg9000 reads from a number of environment variables. These are the primary way in which users can customize parts of a specific build, e.g. by changing the tools to use or adding compiler flags. Below is a full list of all the environment variables bfg9000 recognizes.

Compilation variables§

Generic§


CPPFLAGS§

Default: none

"C preprocessor flags"; command line arguments to pass to the compiler when compiling any C-family source file (C, C++, Objective C/C++).

C§


CC§

Default: cc (POSIX), cl (Windows)

The command to use when compiling C source files. Also the command to use with cc-style toolchains when linking object files whose source is in C.

CFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any C source file.

C++§


CXX§

Default: c++ (POSIX), cl (Windows)

The command to use when compiling C++ source files. Also the command to use with cc-style toolchains when linking object files whose source is in C++.

CXXFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any C++ source file.

Fortran§


FC§

Default: gfortran

The command to use when compiling Fortran source files. Also the command to use when linking object files whose source is in Fortran.

FFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any Fortran source file.

Java§


JAVAC§

Default: javac

The command to use when compiling Java source files.

JAVAFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any Java source file.

Lex§


LEX§

Default: lex

The command to use when building Lex source files.

LFLAGS§

Default: none

Command line arguments to pass to the compiler when building any Lex source file.

Objective C§


OBJC§

Default: cc

The command to use when compiling Objective C source files. Also the command to use with cc-style toolchains when linking object files whose source is in Objective C.

OBJCFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any Objective C source file.

Objective C++§


OBJCXX§

Default: c++

The command to use when compiling Objective C++ source files. Also the command to use with cc-style toolchains when linking object files whose source is in Objective C++.

OBJCXXFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any Objective C++ source file.

Qt MOC§


MOC§

Default: moc

The command to use when processing Qt meta-object macros.

MOCFLAGS§

Default: none

Command line arguments to pass to the compiler when processing Qt meta-object macros.

Qt QRC§


RCC§

Default: rcc

The command to use when building Qt .qrc files.

RCCFLAGS§

Default: none

Command line arguments to pass to the compiler when building Qt .qrc files.

Qt UI§


UIC§

Default: uic

The command to use when building Qt .ui files.

UICFLAGS§

Default: none

Command line arguments to pass to the compiler when building Qt .ui files. macros.

Scala§


SCALAC§

Default: scalac

The command to use when compiling Scala source files.

SCALAFLAGS§

Default: none

Command line arguments to pass to the compiler when compiling any Scala source file.

Yacc§


YACC§

Default: yacc

The command to use when building Yacc source files.

YFLAGS§

Default: none

Command line arguments to pass to the compiler when building any Yacc source file.

Linking variables§

Static linking§


AR§

Default: ar (POSIX), lib (Windows)

The command to use when creating (native) static libraries from object files (typically ar on POSIX and lib on Windows).

ARFLAGS§

Default: cru (POSIX)

The arguments to pass to the static library builder (specified in AR) for native libraries.

JAR§

Default: jar

The command to use when creating .jar files for JVM-based binaries.

JARFLAGS§

Default: cfm

The arugments to pass to the JAR builders when creating .jar files.

Dynamic linking§


LD§

Default: none (POSIX), link (Windows)

The command to use when linking shared libraries; when using a cc-like builder, this will be processed to infer the appropriate -fuse-ld flag for the linker.

LDFLAGS§

Default: none

Command line arguments to pass to the linker when linking an executable or shared library.

LDLIBS§

Default: none

Additional libraries to link into an executable or shared library. This is mainly useful for cases where a system library (e.g. the C++ Standard Library implementation) requires another library to be explicitly linked with it.

Execution variables§


JAVACMD§

Default: java

The command to use when running Java .class files or .jars. (Does not apply when building with GCJ.)

LUA§

Default: lua

The command to use when running Lua scripts.

PERL§

Default: perl

The command to use when running Perl scripts.

PYTHON§

Default: sys.executable

The command to use when running Python scripts. By default, this is the interpreter used to run bfg9000.

RUBY§

Default: ruby

The command to use when running Ruby scripts.

SCALACMD§

Default: scala

The command to use when running Scala .class files or .jars.

Packaging variables§


BOOST_ROOT§

Default: none

The root directory where Boost headers and libraries are stored (as $BOOST_ROOT/include and $BOOST_ROOT/lib, respectively).

BOOST_INCLUDEDIR§

Default: none

The root directory where Boost headers are stored. This takes precedence over BOOST_ROOT.

BOOST_LIBRARYDIR§

Default: none

The root directory where Boost libraries are stored. This takes precedence over BOOST_ROOT.

CLASSPATH§

Default: none

A list of additional directories to search for Java class files. On POSIX systems, this is delimited by :; on Windows, by ;.

CPATH§

Default: none

A list of additional directories to search for headers. On POSIX systems, this is delimited by :; on Windows, by ;.

INCLUDE§

Default: none

MSVC-only. A list of directories to search for headers, delimited by ;.

LIB§

Default: none

MSVC-only. A list of directories to search for system libraries, delimited by ;.

LIBRARY_PATH§

Default: none

A list of additional directories to search for system libraries. On POSIX systems, this is delimited by :; on Windows, by ;.

PATH§

Default: none

A list of directories to search for system executables. On POSIX systems, this is delimited by :; on Windows, by ;.

PATHEXT§

Default: none

Windows-only. A list of valid extensions for executable files under Windows, separated by ;.

PKG_CONFIG§

Default: pkg-config

The command to use when fetching pkg-config package information.

Command variables§


BFG9000§

Default: /path/to/bfg9000

The command to use when executing bfg9000 (e.g. when regenerating the build scripts because the list of source files has changed). This should only be necessary if you run bfg9000 from a wrapper script.

CP§

Default: cp -f (POSIX), cmd /c copy (Windows)

The command to use when creating symlinks.

DEPFIXER§

Default: /path/to/bfg9000-depfixer

The command to use when fixing up depfiles generated by your compiler for the Make backend. In general, you shouldn't need to touch this.

DOPPEL§

Default: doppel

The command to use when installing files and building source distributions. For more information about doppel, see its documentation.

Default: ln -f (POSIX), cmd /c mklink /H (Windows)

The command to use when creating hard links.

INSTALL_NAME_TOOL§

Default: install_name_tool

Darwin-only. The command to use when modifying the paths of the shared libraries linked to during installation.

MKDIR_P§

Default: mkdir -p

The command to use when making a directory tree. This is used both for installing whole directories of files and for creating build directories under the Make backend.

PATCHELF§

Default: patchelf

Linux-only. The command to use when patching an ELF file's rpath for installation.

RCCDEP§

Default: /path/to/bfg9000-rccdep

The command to use when generating depfiles for Qt's rcc tool. In general, you shouldn't need to touch this.

SETENV§

Default: /path/to/bfg9000-setenv

Windows-only. The command to use when setting temporary environment variables, similar to the POSIX env command. This is used when setting environment variables for tests.

Default: ln -sf (POSIX), cmd /c mklink (Windows)

The command to use when creating symlinks.

System variables§


DESTDIR§

Default: none

POSIX-only. A directory to prepend to the install location for the project, used in performing staged installs. For more information, see the GNU coding standards.

PLATFORM§

Default: Win32

Windows-only. The platform type to use when generating MSBuild files.

VISUALSTUDIOVERSION§

Default: 14.0

Windows-only. The version of Visual Studio to target when generating MSBuild files.