Skip to content

C/C++

Build with Flox

Not only can you develop your software with Flox, but you can build it as well. See the builds concept page for more details.

Autotools

Since autotools isn't specific to C, this example will also work for any project using autotools. Since the output of the build must be copied to the $out directory, you must set the install prefix to $out.

[build.myproject]
command = '''
  ./configure --prefix=$out
  make
  make install
'''

CMake

Doing a CMake build looks much the same as autotools.

[build.myproject]
command = '''
  cmake -DCMAKE_INSTALL_PREFIX=$out
  make
  make install PREFIX=$out
'''