This directory provides the user with an example of using CLAM for her own programs. So it is ment to be copied somewhere out of CLAM dir tree and it will be ready to compile with a little adjustment in one file

How to set up your own programs using CLAM

This chapter is a little tutorial for setting up an example application using CLAM and its build system. In first place we're going to compile a given simple application --very straight. And in second place we're going to go through all possible customizations in the build settings that the user might need to set up more complicated projects.

An out-of-the-box example

Following this steps you'll get an application which performs an FFT of a random generated audio and stores its spectral equivalent in a file in XML

  1. Copy this directory structure (compiling_against_CLAM_example) somehere outside the CLAM dir tree. We recommend to place it just in the same level as the CLAM root. (in the same parent dir)
    Note that this directory, apart from the .cxx file with a main function, contains a subdir named build/ with the configuration files necessary to use the automatic CLAM build
    Hint: in linux, cp -ar <src> <dst> copies a directory recursively
  2. Edit the build/clam-location.cfg and change CLAM_PATH so it points to the CLAM dir --maybe you'll find that this value is already properly set.
  3. At this point we need to have srcdeps already compiled. How to do this is explained in this section [?] of the documentation.
  4. Now our way forks depending on the choosed compiler

Hopefully we've been able to run the example and play with spectral data in XML. From here we'll see how to customize the build options and to create more complex projects

Customizing your project

Here we're going to go through the things you should know when setting your own project that compiles against CLAM and using its automatic build system.

First of all, we assume that you allready have created a root directory for your project

That's it, hopefully you are compiling your project agains CLAM, without dealing in manualy finding the CLAM sources it needs.

Remember to see the Build System chapter in CLAM documentation for further details.