Rename interpretor to interpreter.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / documentation / faust-quick-reference-src / chapters / installation.tex
1 \chapter{Compiling and installing \faust}
3 The \faust source distribution \lstinline'faust-0.9.46.tar.gz' can be downloaded from sourceforge (\myurl{}).
5 \section{Organization of the distribution}
6 The first thing is to decompress the downloaded archive.
7 \begin{lstlisting}
8 tar xzf faust-0.9.46.tar.gz
9 \end{lstlisting}
11 The resulting \lstinline'faust-0.9.46/' folder should contain the following elements:
13 \begin{tabular}{ll}
14 \lstinline'architecture/' &\faust libraries and architecture files\\
15 \lstinline'benchmark' &tools to measure the efficiency of the generated code\\
16 \lstinline'compiler/' &sources of the \faust compiler\\
17 \lstinline'examples/' &examples of \faust programs\\
18 \lstinline'syntax-highlighting/'& support for syntax highlighting for several editors\\
19 \lstinline'documentation/' &\faust's documentation, including this manual\\
20 \lstinline'tools/' &tools to produce audio applications and plugins\\
21 \lstinline'COPYING' &license information\\
22 \lstinline'Makefile' &Makefile used to build and install \faust\\
23 \lstinline'README' &instructions on how to build and install \faust
24 \end{tabular}
26 \section{Compilation}
27 \faust has no dependencies outside standard libraries. Therefore the compilation should be straightforward. There is no configuration phase, to compile the \faust compiler simply do :
28 \begin{lstlisting}
29 cd faust-0.9.46/
30 make
31 \end{lstlisting}
33 If the compilation was successful you can test the compiler before installing it:
34 \begin{lstlisting}
35 [cd faust-0.9.46/]
36 ./compiler/faust -v
37 \end{lstlisting}
38 It should output:
39 \begin{lstlisting}
40 FAUST, DSP to C++ compiler, Version 0.9.46
41 Copyright (C) 2002-2012, GRAME - Centre...
42 \end{lstlisting}
44 Then you can also try to compile one of the examples :
45 \begin{lstlisting}
46 [cd faust-0.9.46/]
47 ./compiler/faust examples/noise.dsp
48 \end{lstlisting}
49 It should produce some C++ code on the standard output
51 \section{Installation}
52 You can install \faust with:
53 \begin{lstlisting}
54 [cd faust-0.9.46/]
55 sudo make install
56 \end{lstlisting}
57 or
58 \begin{lstlisting}
59 [cd faust-0.9.46/]
60 su
61 make install
62 \end{lstlisting}
63 depending on your system.
66 \section{Compilation of the examples}
67 Once \faust correctly installed, you can have a look at the provided examples in the \lstinline'examples/' folder. This folder contains a \lstinline'Makefile' with all the required instructions to build these examples for various \textit{architectures}\marginpar{An architecture file provides the code needed to connect a signal processor to the outside world. It typically defines the audio communications and user interface.}, either standalone audio applications or plugins.
69 The command \lstinline'make help' will list the available targets. Before using a specific target, make sure you have the appropriate development tools, libraries and headers installed. For example to compile the examples as ALSA applications with a GTK user interface do a \lstinline'make alsagtk'. This will create a \lstinline'alsagtkdir/' subfolder with all the binaries.