Skip to content

Move common.mk include into Makefile template; trim legacy fragments#51

Open
alex-robinson wants to merge 1 commit into
mainfrom
feat/common-mk-in-template
Open

Move common.mk include into Makefile template; trim legacy fragments#51
alex-robinson wants to merge 1 commit into
mainfrom
feat/common-mk-in-template

Conversation

@alex-robinson
Copy link
Copy Markdown
Member

The reorganization below will make it easier to keep the legacy config.py method and configme install method in sync with each other - there was a bit of redundancy until now.

The Makefile template now includes config/common.mk directly, after the <COMPILER_CONFIGURATION> placeholder. Per-host fragments under config/ are trimmed to compiler + machine bits only (FC, NETCDF wiring, FFLAGS / FFLAGS_OPENMP, DFLAGS_*, plus any per-host override such as macbook's LFLAGS_EXTRA= to disable -Wl,-zmuldefs). The shared dependency wiring (FESMUTILS, FFTW, openmp swap, LFLAGS) now lives only in common.mk.

The split between FFLAGS (default) and FFLAGS_OPENMP (delta) replaces the in-fragment ifeq ($(openmp), 1) ... endif blocks that previously redefined FFLAGS wholesale; common.mk does the append in one place.

The Makefile template now `include`s config/common.mk directly, after the
<COMPILER_CONFIGURATION> placeholder. Per-host fragments under config/
are trimmed to compiler + machine bits only (FC, NETCDF wiring, FFLAGS /
FFLAGS_OPENMP, DFLAGS_*, plus any per-host override such as macbook's
LFLAGS_EXTRA= to disable -Wl,-zmuldefs). The shared dependency wiring
(FESMUTILS, FFTW, openmp swap, LFLAGS) now lives only in common.mk.

The split between FFLAGS (default) and FFLAGS_OPENMP (delta) replaces
the in-fragment `ifeq ($(openmp), 1) ... endif` blocks that previously
redefined FFLAGS wholesale; common.mk does the append in one place.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants