User Tools

Site Tools


dev:makefile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:makefile [2014/03/14 11:22] oschuettdev:makefile [2026/01/08 13:28] (current) – removed oschuett
Line 1: Line 1:
-====== Makefile ====== 
- 
-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. 
- 
- 
-The file discovery is based on a simple naming convention: 
-  * **.F files** are Fortran files. They are compiled into an object. They must contain either a ''MODULE'' or a ''PROGRAM''. 
-  * **.f90 files** are included Fortran files. They are **not** compiled into an object. 
-  * **.c files** are C-files. They are compiled into an object. 
-  * **.cu files** are Cuda-C-files. They are compiled into an object using Nvidia's ''nvcc'' 
-  * **.h files** are C-header files. They are included by .c or .cu files. They are **not** compiled into an object. 
- 
-===== Packages ===== 
-The code base is structured into directories. Every directory has to contain a files called ''PACKAGE'' . A typical ''PACKAGE'' looks like this: 
-<code python> 
-{ 
-"description": "Smart process pinning", 
-"requires": ("../common", "../dbcsr", "../machine", ) 
-} 
-</code> 
- 
-The entry ''requires''  list all the directories on which the code in the current directory may depend upon. This means, modules in the current directory may only use modules from the listed directories. The requirements between directories must **not** have cycles. 
- 
-===== Compiling Multiple Version ===== 
-The Makefile allows to compile multiple version in parallel: 
-<code> 
-$ make ARCH=Linux-x86-64-gfortran VERSION="sopt sdb popt pdbg" 
-</code> 
  
dev/makefile.1394796153.txt.gz · Last modified: (external edit)