The CP2K Makefile automatically adopts to changes of the code base.
To add a file to the source tree, just create it. The Makefile will automatically discover it, compile it, and link it. Consequently, files that do not belong into the CP2K libraries must end on an ignored suffix.
The file discovery is based on a simple suffix naming convention:
MODULE
or a PROGRAM
.nvcc
. Furthermore, the code base is structured into packages.
The Makefile allows to compile multiple versions of all build targets in parallel:
$ make ARCH=Linux-x86-64-gfortran VERSION="sopt sdbg popt pdbg"
building only the main CP2K binary can be done as
$ make ARCH=Linux-x86-64-gfortran VERSION="sopt sdbg popt pdbg" cp2k