-
Notifications
You must be signed in to change notification settings - Fork 327
steps
The compilation process takes place in 2 phases:
- the project generation
- the project compilation
This is the step where you choose what you want to include in your project and to compile in a second step. The faust compiler, the OSC and HTTP libraries are included by default but you can add (or remove) the faust libraries (static or dynamic versions). You can also choose the form of your project: a Makefile, an Xcode or Visual Studio project, or any of the generator provided by cmake on your platform.
You may think of this step as the definition of the targets that will be available from your project. Note that at this step, you also choose the faust backends that you want to include in the different components (compiler and faust libraries). See the backends section for more details.
Cmake provides support for a lot of development environments depending on you platform. To know what environments are supported, type cmake --help
and you'll get a list of the supported generators at the end of the help message.
By default, the Makefile
makes use of "Unix Makefiles" (or "MSYS Makefiles" on Windows). Thus when you type make
, it generates a Makefile
and then run a make
command using this Makefile. To avoid overwriting the existing makefile, the project is generated in a subfolder named faustdir
by default and created on the fly.
You can freely change these default settings make
and the FAUSTDIR and GENERATOR options, that control the subfolder name and the generator to use. For example:
$ make GENERATOR=Xcode
will generate an Xcode project in the faustdir
subfolder
$ make FAUSTDIR=macos GENERATOR=Xcode
will generate an Xcode project in the macos
subfolder
You can achieve similar results using direct cmake invocation e.g.:
$ mkdir macos
$ cd macos
$ cmake .. -G Xcode
Targets included into your projects are specified using a configuration file located in the targets
folder. The Makefile provides a TARGETS
option to control these settings. By default, TARGETS=regular.cmake
, which includes the faust compiler and the OSC and HTTPD static libraries.
You can freely customize these files or use your own settings file.
The makefile includes a special target to re-generate your project. It allows to change your backends, but can be also necessary to include new source files in your project (source files are scanned at project generation and are not described explicitely). Simply type:
$ make cmake [your optional options]
All the above options can be specified when running the cmake
target (apart the GENERATOR option that can't be changed at cmake level).
Equivalent call with cmake has the following form:
$ cd faustdir
$ cmake .. [optional cmake options]
-
make verbose
: activates the printing of the exact command that is run at each make step -
make silent
: reverts what make verbose did. -
make universal
: [macOS only] creates universal binaries (x86_64 and arm64) -
make native
: [macOS only] reverts native only binaries (default state).