Build settings - Petewg/harbour-core GitHub Wiki

🔙

List of environment variables being used to build Harbour itself and/or applications.
They can been set using SET VARNAME=value syntax. All settings are optional and all settings are case-sensitive.

Environment variable Effect
HB_BUILD_VERBOSE=yes Default: no. Setting yes enables verbose build output. Redirect it to file by appending this to the build command: > log.txt 2>&1
HB_PLATFORM Override platform auto-detection
HB_COMPILER Override C compiler auto-detection. Set these only if auto-detection doesn't suit your purpose.
HB_BUILD_CONTRIBS=no [<lib>] Do not build any, or space separated <lib> list of, contrib packages. Please note that packages which are dependencies of other — enabled — packages will still be built, unless their dependents are disabled as well.
HB_BUILD_CONTRIBS=[<lib>] Build space separated <lib> list of contrib libraries. Build all if left empty (default).
HB_BUILD_STRIP=[all|bin|lib|no] Strip symbols and debug information from binaries. Default: no
HB_BUILD_3RDEXT=no Enable auto-detection of 3rd party components on default system locations. Default: yes
HB_BUILD_NOGPLLIB=yes Disable components dependent on GPL 3rd party code, to allow using Harbour for nonfree/proprietary projects. Default: no
HB_CCPATH=[<dir>/] Used with non-*nix gcc family compilers (and sunpro) to specify path to compiler/linker/archive tool to help them run from *nix hosts as cross-build tools. Ending slash must be added.
HB_CCPREFIX=[<prefix>] Used with gcc compiler family to specify compiler/linker/archive tool name prefix.
HB_CCSUFFIX=[<suffix>] Used with gcc/clang compiler families to specify compiler/linker tool name suffix — usually version number.
HB_INSTALL_PREFIX Target root directory to install Harbour files. On *nix systems the default is set to /usr/local/ or $(PREFIX) if specified, and /usr/local/harbour-<arch>-<comp> for cross-builds. It's always set to ./pkg/<arch>/<comp> when HB_BUILD_PKG is set to yes. On non-*nix systems, you must set it to a valid directory when using install. Use absolute paths only. You have to use path format native to your shell. E.g. to specify C:\dir on Windows.
HB_USER_PRGFLAGS User Harbour compiler options
HB_USER_CFLAGS User C compiler options
HB_USER_DCFLAGS User C compiler options (for dynamic libraries only)
HB_USER_RESFLAGS User resource compiler options (on win, wce, os2)
HB_USER_LDFLAGS User linker options for executables
HB_USER_AFLAGS User linker options for libraries
HB_USER_DFLAGS User linker options for dynamic libraries
HB_BUILD_DEBUG=yes Create debug build. Default: no
HB_BUILD_OPTIM=no Enable C compiler optimizations. Default: yes
HB_BUILD_PKG=yes Create release package. Default: no Requires clean install in root source dir.
HB_BUILD_CONTRIB_DYN=yes Create contrib dynamic libraries (in addition to static). Default: no, except Windows and darwin platforms, where it's yes.
HB_BUILD_3RD_DYN=yes Create dynamic libraries of vendored 3rd party libaries (in addition to static). Default: no
HB_BUILD_SHARED=yes Create Harbour executables in shared mode. Default: yes on non-*nix platforms that support is and on *nix when HB_INSTALL_PREFIX points to a system location, otherwise no.
HB_BUILD_PARTS=[all|compiler|lib] Build only specific part of Harbour.
HB_BUILD_NAME=[<name>] Create named build. This allows keeping multiple builds in parallel for any given platform/compiler. E.g. debug / release. In current implementation it's appended to compiler directory name, so all file-system/platform name rules and limits apply. (Back)slashes will be stripped from the name though.
HB_USER_LIBS=[<list>] Add space separated <list> of libs to link process. Lib names should be without extension and path. You only need this in special cases, like CodeGuard build with win/bcc.
HB_BUILD_LIBPATH Use extra library path when building contrib packages. It will be passed to hbmk2 via its -L option, after any other custom option.
HB_INSTALL_IMPLIB=no Copy import libraries created for external .dll dependencies to the library install directory in install build phase. Default: yes For Windows and OS/2 targets only. Please note that this feature doesn't work with all possible binary distributions of 3rd party packages. We test only the official/mainstream ones. Also note that the generated implibs will require .dlls compatible with the ones used at build time.
HB_INSTALL_3RDDYN=yes Copy dynamic libraries of external .dll dependencies to the dynamic library directory in install build phase. Default: no

🔙

⚠️ **GitHub.com Fallback** ⚠️