CopperSpice Overview  1.5.1
Build Configuration

The Makefiles used to build CopperSpice or your application are not written by hand. Rather, they are generated from templates using Autotools or CMake.

Autoconf is a program used to generate the configure script from a template named configure.ac. When the configure script is run it will check all the characteristics of the host system and generate the appropriate makefiles from Makefile.in templates. The following sections provide information on what can be passed to the configure script.

Using CMake to build is very similar. For an example of the CMake build process refer to the CMake files associated with the KitchenSink or DoxyPress projects.

Changing CXXFLAGS

There are many places where you will need to change the configuration of CopperSpice or your application and then rebuild. The initial tendency is to pass the parameters to make from the command line. This does not work as expected. Autotools will use only the passed values and override the settings created by configure.

You may want to modify the CXXFLAGS and adjust the "-O" variable. This controls the overall level of optimization. The best way to change this variable is to create a file like config-cs and pass the changes when running configure. This will preserve all of the other configure settings and only change the one variable.

The following example changes the "-O" variable and the prefix. The prefix is the location where the compiled files will be located.

../cs/configure CXXFLAGS="-O2" -prefix $HOME/cs_lib

To run configure using the config-cs file, use the following command.

./config-cs


Building on Windows 32

On most computers Windows 32 simply does not have enough resources to build the CsWebkit library. When building CopperSpice from source on Windows XP 32-bit you may need to disable building WebKit. Pass the –disable-webkit directive to configure or add this to your config-cs file.

Thankfully it is possible to build CsWebkit on a 64-bit system for a 32-bit system. Pass the "-m32" parameter to the configure script. The following is a sample script used on Vista 64-bit to compile CopperSpice for XP 32-bit.

../cs/configure CXXFLAGS="-m32 -Os" CFLAGS="-m32 -Os" LDFLAGS="-m32" --prefix=/z/cs_lib

After CopperSpice has been built and installed on a Windows 64-bit computer, copy the following two files to your CS install folder on the 32-bit computer. In this example z:\cs_lib is the CS install location. Alternatively, copy the entire CopperSpice build to the 32-bit computer.

CS Filename Path
libCsWebKit1-0.dll z:\cs_lib\bin
libCsWebKit1.dll.a z:\cs_lib\lib


Building Postgres

For information about the configure options used to build the client SQL libraries, refer to Building SQL Drivers.