Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
make -f Makefile.manual test
make -f Makefile.manual clean
env:
FYPPFLAGS: "-DMAXRANK=4"
ADD_FYPPFLAGS: "-DMAXRANK=4"

intel-build:
runs-on: ${{ matrix.os }}
Expand Down
6 changes: 4 additions & 2 deletions Makefile.manual
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

FC ?= gfortran
FFLAGS ?= -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all
FYPPFLAGS ?=
ADD_FYPPFLAGS ?=

VERSION := $(subst ., ,$(file < VERSION))
FYPPFLAGS += \
VERSION_FYPPFLAGS += \
-DPROJECT_VERSION_MAJOR=$(word 1,$(VERSION)) \
-DPROJECT_VERSION_MINOR=$(word 2,$(VERSION)) \
-DPROJECT_VERSION_PATCH=$(word 3,$(VERSION))

FYPPFLAGS := $(ADD_FYPPFLAGS) $(VERSION_FYPPFLAGS)

export FC
export FFLAGS
export FYPPFLAGS
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ Alternatively, you can build using provided Makefiles:
make -f Makefile.manual
```

You can limit the maximum rank by setting ``-DMAXRANK=<num>`` in the ``FYPPFLAGS`` environment variable (which can reduce the compilation time):
You can limit the maximum rank by setting ``-DMAXRANK=<num>`` in the ``ADD_FYPPFLAGS`` environment variable (which can reduce the compilation time):

```sh
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
make -f Makefile.manual ADD_FYPPFLAGS=-DMAXRANK=4
```

You can also specify the compiler and compiler-flags by setting the ``FC`` and ``FFLAGS`` environmental variables. Among other things, this facilitates use of compiler optimizations that are not specified in the Makefile.manual defaults.
```sh
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4 FC=gfortran FFLAGS="-O3 -flto"
make -f Makefile.manual ADD_FYPPFLAGS=-DMAXRANK=4 FC=gfortran FFLAGS="-O3 -flto"
```

### Build with [fortran-lang/fpm](https://github.com/fortran-lang/fpm)
Expand Down