From 246ca7c162520e2efce6ee5aa56959776f518f71 Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Fri, 24 Feb 2023 13:19:11 +0100 Subject: [PATCH] doc: updated readme Signed-off-by: Nick Papior --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c308199..3db5dad 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,15 @@ To link fdict to your program the following can be used in a `Makefile` FDICT_LIBS = -L$(FDICT_PATH) -lfdict FDICT_INC = -I$(FDICT_PATH) +For parent programs that uses `fdict` there are 2 ways of knowing which `fdict` +version one is using: + +1. A simple header file (like C-preprocessor statements), this information + is found in `fdict.inc` +2. A `fypp` compatible include file which contains library version and + which data types are included in the built library, see the file `fdict.fypp` + + The file `fdict.inc` may be included in projects which exposes the following definitions: @@ -52,10 +61,18 @@ definitions: _FDICT_PATCH_ 0 _FDICT_VERSION_ 0.9.0 -which may be used in functional codes to utilize the correct interfaces. This is mainly meant as a feature usable when the fdict interface and e.g. modules change names. +Alternatively the `fdict.fypp` inclusion file exposes variables such as: +- the library version numbers (as above) +- which data-types are enabled +- the number of ranks for each kind + +The `fdict.fypp` file is handy when you are already relying on `fypp` +whereas the regular `fdict.inc` header files are easy to use in standard +fortran source compilation. + #### Controlling interfaces ####