local.sh.example
# This is an example site-level customization file for cado-nfs. It is
# the recommended way of setting parameters to the build system. The same
# effect can be achieved with environment variables.
#
# This file is sourced as a bourne shell script within the build process
# (by scripts/call_cmake.sh, precisely). Therefore, all variables setting
# must obey the normal quoting construct for shell variables, e.g.
# CFLAGS="-g -O2"
# Note also that for the same reason, you may use conditional variable
# setting in the syntax recognized by most shells, which is
# : ${CFLAGS:="-g -O2"}
# This means ``set CFLAGS to "-g -O2" unless it is already set to something
# (by an environment variable, that is).
#
# The flags recognized by the build process are a restrictive list. Don't
# even hope for something to be recognized if it's neither documented
# here nor mentioned in any of the scripts/call_cmake.sh or
# */CMakeLists.txt files.
# It is perfectly normal to leave most values undefined here, as it is
# hoped that the default settings work correctly. The intent of the
# variable settings here is to accomodate special needs.
#
# Setting a variable to an empty value or leaving it unset are equivalent
# here.
#
# Example values are given for all flags. The first example corresponds
# to the default setting.
############################################################
# build_tree: where do the object files go.
#
# Example values:
# build_tree="${up_path}build/`hostname`"
# build_tree="${up_path}build/`uname -m`"
# build_tree=/tmp/cado-nfs-build
#
# up_path, amongst other variables, is defined from the caller script
# which is scripts/call_cmake.sh.
#
# build_tree must be set unconditionally (that is, in contrast to the
# other variables, you can't do : ${build_tree:=blah blah blah)
############################################################
# CC: C Compiler
#
# Example values:
# CC=
# CC=gcc
# CC=/usr/local/bin/gcc
# CC=icc
# CC="$HOME/bin/cc"
#
# The user is advised against setting $CC as a path + some switches, such
# as "gcc -m64". This may or may not work.
############################################################
# CXX: C++ Compiler (cado-nfs contains a few C++ programs)
#
# Example values:
# CXX=
# CXX=/usr/local/bin/g++
############################################################
# CFLAGS: Flags for compiling C programs
#
# Example values:
# CFLAGS=-O2
# CFLAGS="-O3 -g -fkeep-inline-functions"
# CFLAGS=-g
# CFLAGS="-O2 -DNDEBUG"
#
# Note: the default value of CFLAGS is "-O2 -DNDEBUG". If you want to enable
# the ASSERT() tests, define CFLAGS=-O2.
#
# Note that some flags, and some compile-time definitions are added
# anyway and cannot be overridden. For example, one cannot remove
# -std=c99 for CFLAGS if GNU C is being used, because its use is
# mandatory.
############################################################
# CXXFLAGS: Flags for compiling C++ programs
#
# Example values:
# CXXFLAGS=-O2
# CXXFLAGS=-g
# CXXFLAGS="-O2 -DNDEBUG"
# CXXFLAGS="-O3 -funroll-loops -DNDEBUG"
# CXXFLAGS="-O3 -funroll-loops -DNDEBUG -Wno-empty-body"
#
# Important note: CXXFLAGS lives totally independently of CFLAGS.
# Therefore if some flag is relevant to both, you have to set both.
############################################################
# PREFIX: Installation path
#
# Example values:
# PREFIX=<path-to-source-tree>/installed
# PREFIX=/usr/local/cado
#
# This is for ``make install'', and using ``make install'' is not
# recommended. While an install procedure is sort of present, it is not
# tested. Therefore it cannot be expected to work.
############################################################
# CADO_VERSION_STRING: set package version
#
# This is relevant only for the development tree. It is documented here
# for completeness, but cado-nfs tarballs lack the scripts which
# understand this variable.
############################################################
# GF2X_CONFIGURE_FLAGS: pass flags to gf2x's ./configure script.
#
# Example values:
# GF2X_CONFIGURE_FLAGS="--silent --disable-shared"
############################################################
# GMP: prefix to installed GMP, or path to built GMP source tree.
#
# Example values:
# GMP=
# GMP=/usr/local/gmp-5.1.0
# GMP=$HOME/gmp-5.1.0
#
# It does not matter whether $GMP points to the ``prefix'' where some GMP
# version has been installed (with make install), or whether $GMP points
# to a built source tree. The build system is supposed to correctly
# locate include files and libraries in both cases. However, to
# accomodate special configurations, one may also use the two extra
# variables:
#
# GMP_LIBDIR=/some/directory
# GMP_INCDIR=/some/directory
############################################################
# MPI: Whether to use MPI (Message Passing Interface) or not
#
# Example values:
# MPI=0
# MPI=1
# MPI=/usr/local/mpich2-1.0.8p1/
# MPI=/usr/local/openmpi-1.3.0/
# MPI=$HOME/mpich2-1.0.8p1
#
# Some cado-nfs programs can work with MPI. To build MPI-enabled tools,
# set $MPI to 1. The default value is unset, which effectively disables
# MPI (and activate stubs for the corresponding functions).
#
# Setting $MPI to 1 means to enable an MPI build, using the system-level
# default MPI compiler (the one pointed to by `which mpicc`).
#
# Setting $MPI to a path instructs the build process to look for the
# compiler $MPI/mpicc, or $MPI/bin/mpicc.
#
# Note that in any case, for the MPI build to be enabled, it is necessary
# for an MPI C compiler AND an MPI C++ compiler AND an mpiexec program to
# be found.
#
# ``MPI=1'', ``MPI=yes'', ``MPI=on'', are equivalent.
# ``MPI=0'', ``MPI=no'', ``MPI=off'', are equivalent.