Building:SCons

From FIFE development wiki
Jump to: navigation, search

Build Targets

  • fife-shared - Creates a shared library (.so on Linux and .dll on Windows). This build target is not supported yet and should not be used
  • fife-static - Creates a static library (.a on Linux and .lib on Windows). This build target is not supported yet and should not be used
  • fife-python - Generates the swig wrappers and creates a python library. This is the default build target
  • fife-swig - Generates the swig wrappers
  • fife - This is an alias that build fife-shared, fife-static, fife-python and fife-swig
  • projects - Creates all the project files (code-blocks windows, code-blocks linux, msvc, msvc9)
  • ext - (LINUX ONLY) Builds guichan in the <FIFE>/ext directory.
  • docs - Builds the doxygen documents (requires doxygen to be installed)

Install Targets

NOTE: None of these targets install the demos or tools!

  • install-shared - Copies the shared library to the default location (c:\fife\lib on Windows, /usr/local/lib on linux and darwin)
  • install-static - Copies the static library to the default location (c:\fife\lib on Windows, /usr/local/lib on linux and darwin)
  • install-python - Copies the python library, fife.py and the FIFE extensions to the users Python site-packages directory. NOTE: installs to the version of Python that scons was called with)
  • install-dev - Copies the shared, static and FIFE header files to the default install locations
  • install-all - This is an alias that calls install-shared, install-static, install-python and install-dev

Environment Variables

  • SWIG - Set this environment variable to the swig executable you wish to use (if you do not wish to use the one found in PATH)
  • CXXFLAGS - If this is set it will override the default CXXFLAGS specified in SConstruct.

Other Options

  • --enable-debug - Builds the debug version of the binaries
  • --disable-opengl - Disable OpenGL support
  • --disable-zip - Disable ZIP archive support
  • --disable-log - Disable engine logging support
  • --enable-rend-camzone - Enables camera zone renderer
  • --enable-rend-grid - Enables camera grid renderer
  • --enable-profile - Build with profiling information
  • --prefix=DIR - installation prefix
  • --python-prefix=DIR - Python module installation prefix
  • --lib-dir=DIR - Specifies where to install the static and shared fife lib, this is appended to prefix
  • DESTDIR=DIR - This is prepended to prefix and python-prefix
  • CXXFLAGS=FLAGS - If this is set it will override the default CXXFLAGS specified in SConstruct.

Cleaning

To clean a release build:

 scons -c

To clean a debug build:

 scons -c --enable-debug

To do a "distclean" and remove the scons cache and other misc scons files type:

 scons -c distclean

Example Usage

Build the release python binaries with logging disabled and install them (along with the extensions) to /destdir/python/fife:

 scons DESTDIR=/destdir --python-prefix=/python --disable-log install-python