dev:makefile
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:makefile [2014/03/14 11:31] – [Packages] oschuett | dev:makefile [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
The CP2K Makefile automatically adopts to changes of the code base. | 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. | + | To add a file to the source tree, just create it. The Makefile will automatically discover it, compile it, and link it. Consequently, |
- | + | The file discovery is based on a simple | |
- | The file discovery is based on a simple naming convention: | + | * **.F files** are Fortran files. They are compiled into an object. They should |
- | * **.F files** are Fortran files. They are compiled into an object. They must contain either a '' | + | |
* **.f90 files** are included Fortran files. They are **not** compiled into an object. | * **.f90 files** are included Fortran files. They are **not** compiled into an object. | ||
* **.c files** are C-files. They are compiled into an object. | * **.c files** are C-files. They are compiled into an object. | ||
Line 13: | Line 12: | ||
* **.h files** are C-header files. They are included by .c or .cu files. They are **not** compiled into an object. | * **.h files** are C-header files. They are included by .c or .cu files. They are **not** compiled into an object. | ||
- | ===== Packages ===== | + | Furthermore, |
- | The code base is structured into directories. Every directory has to contain a file called '' | + | |
- | <code python> | + | |
- | { | + | |
- | " | + | |
- | " | + | |
- | } | + | |
- | </ | + | |
- | The entry '' | + | ===== Compiling Multiple Versions ===== |
- | ===== Compiling Multiple Version ===== | + | The Makefile allows to compile multiple |
- | The Makefile allows to compile multiple | + | < |
+ | $ make ARCH=Linux-x86-64-gfortran VERSION=" | ||
+ | </ | ||
+ | building only the main CP2K binary can be done as | ||
< | < | ||
- | $ make ARCH=Linux-x86-64-gfortran VERSION=" | + | $ make ARCH=Linux-x86-64-gfortran VERSION=" |
</ | </ | ||
dev/makefile.1394796680.txt.gz · Last modified: 2020/08/21 10:14 (external edit)