5. Compiling CF programs

The CF programs are built using regular Makefiles. Install the development packages for YAZ, YAZ++, Metaproxy, Boost, GTK 2 and cf-xulrunner before compiling. On Debian/Ubuntu, the cf-dev package supplies the development dependencies; install build-essential for the compiler and make. Runtime libraries alone do not provide the required headers and SDK tools. debian/control contains the full package-build dependency list.

With the packaged Debian/Ubuntu SDK and tools, build the engine from the CF source root with:

     make -C engine/src PKG_CONFIG_PATH=/usr/cf-xulrunner/lib/pkgconfig \
         PYTHON_BIN=/usr/cf-xulrunner/bin/python2.7 \
         YAZ_CONFIG=/usr/bin/yaz-config MP_CONFIG=/usr/bin/metaproxy-config
    

This generates CF's IDL headers and type libraries and compiles the CF programs; it does not rebuild Gecko. CF embeds the private Mozilla library search path in its engine binary, so the packaged layout does not need an LD_LIBRARY_PATH workaround. For custom dependency locations, adjust the build settings described in Section 4, “Environment”.

The make process, when successful, builds a number of targets. The most important ones are:

cfrun

CF Engine runner utility which can be invoked from the command line.. It also has its own simple command line shell. Refer to cfrun(1) for more information.

cfmain

Engine child process embedding Gecko. It is installed as /usr/lib/cf/cfmain and launched by cfrun or the Metaproxy CF module. The cf-zserver package provides the Z39.50/SRU service through Metaproxy; see cf-zserver(8).

mp_module

Metaproxy module (shared Object / .so). This module is a plug-in for Metaproxy and exposes the CF as a Web service. See cf_webservice(8) for more information.

cfhello

"Hello World" application for CF.

all

The all target builds all working targets and is the default make target.

clean

The clean target removes all relevant files generated by a build process (programs, temporary files, etc).