- eg, for partially incomplete systems (without libz devel header) ENH: clearer binding of dummy Pstream in OpenFOAM/Make/options - link of dummy stub Pstream now contingent on linking libOpenFOAM as well. This makes the purpose slightly clearer ENH: cleaner option naming/handling in wmake script - allow special purpose -no-openfoam option. Eg, compiling test programs without OpenFOAM and Pstream libraries but using the rest of the wmake system. ENH: add +openmp support into WM_COMPILE_CONTROL (#2633) - this adds compile/link flags for openmp. For single-use, can also use 'wmake -openmp'. If both +openmp and ~openmp are specified in WM_COMPILE_CONTROL the ~openmp will have priority. This is actually done indirectly since ~openmp will set empty COMP_OPENMP, LINK_OPENMP internal variables, which the +openmp then adds to the c++FLAGS and linkexe targets (ie, won't actually add anything). ENH: add +ccache or ccache=... support into WM_COMPILE_CONTROL (#2633) - with the first version (+ccache), simply use ccache from the path without any extra options. - with the second version (ccache=...), can be more specific about what is called. Using "+ccache" is identical to "ccache=ccache", but the later could be used in other ways. For example, ccache=/strange/install/path/ccache ccache=</path/my-tooling --option> Have the choice of unquoted, single or double quoted or '< >' quoted STYLE: relocate FOAM_EXTRA_LDFLAGS in general makefile - removes clutter for different linkers (eg, gold, mold, ldd) making it easier to extend for other linkers. STYLE: protect makefile checks with 'strip' function
121 lines
3.0 KiB
Plaintext
121 lines
3.0 KiB
Plaintext
#----------------------------*- makefile-gmake -*------------------------------
|
|
# ========= |
|
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
# \\ / O peration |
|
|
# \\ / A nd | www.openfoam.com
|
|
# \\/ M anipulation |
|
|
#------------------------------------------------------------------------------
|
|
# Copyright (C) 2019-2022 OpenCFD Ltd.
|
|
#------------------------------------------------------------------------------
|
|
# License
|
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
|
#
|
|
# File
|
|
# wmake/makefiles/info
|
|
#
|
|
# Description
|
|
# Makefile to generate information.
|
|
# Used by wmake -show-*
|
|
#
|
|
#------------------------------------------------------------------------------
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Use POSIX shell
|
|
#------------------------------------------------------------------------------
|
|
|
|
SHELL = /bin/sh
|
|
|
|
#------------------------------------------------------------------------------
|
|
# No default suffix rules used
|
|
#------------------------------------------------------------------------------
|
|
|
|
.SUFFIXES:
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Some default values
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Shared library extension (with '.' separator)
|
|
EXT_SO = .so
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Compilation rules
|
|
#------------------------------------------------------------------------------
|
|
|
|
GENERAL_RULES = $(WM_DIR)/rules/General
|
|
include $(GENERAL_RULES)/general
|
|
include $(GENERAL_RULES)/mpi-rules
|
|
|
|
# Commands
|
|
COMPILE_C := $(strip $(cc) $(cFLAGS))
|
|
COMPILE_CXX := $(strip $(CC) $(c++FLAGS))
|
|
|
|
#------------------------------------------------------------------------------
|
|
# Display information
|
|
#------------------------------------------------------------------------------
|
|
|
|
# Extract WM_VERSION = OPENFOAM=<digits>
|
|
.PHONY: api
|
|
api:
|
|
@echo "$(lastword $(subst =, ,$(WM_VERSION)))"
|
|
|
|
.PHONY: ext-so
|
|
ext-so:
|
|
@echo "$(EXT_SO)"
|
|
|
|
.PHONY: compile-c
|
|
compile-c:
|
|
@echo "$(COMPILE_C)"
|
|
|
|
.PHONY: compile-cxx
|
|
compile-cxx:
|
|
@echo "$(COMPILE_CXX)"
|
|
|
|
.PHONY: c
|
|
c:
|
|
@echo "$(firstword $(cc))"
|
|
|
|
.PHONY: cxx
|
|
cxx:
|
|
@echo "$(firstword $(CC))"
|
|
|
|
.PHONY: cflags
|
|
cflags:
|
|
@echo "$(wordlist 2,$(words $(COMPILE_C)), $(COMPILE_C))"
|
|
|
|
.PHONY: cxxflags
|
|
cxxflags:
|
|
@echo "$(wordlist 2,$(words $(COMPILE_CXX)), $(COMPILE_CXX))"
|
|
|
|
.PHONY: cflags-arch
|
|
cflags-arch:
|
|
@echo "$(strip $(cARCH))"
|
|
|
|
.PHONY: cxxflags-arch
|
|
cxxflags-arch:
|
|
@echo "$(strip $(c++ARCH))"
|
|
|
|
.PHONY: openmp-compile
|
|
openmp-compile:
|
|
@echo "$(strip $(COMP_OPENMP))"
|
|
|
|
.PHONY: openmp-link
|
|
openmp-link:
|
|
@echo "$(strip $(LINK_OPENMP))"
|
|
|
|
.PHONY: openmp
|
|
openmp: openmp-compile
|
|
|
|
# Like openmpi mpicc --showme:compile
|
|
.PHONY: mpi-compile
|
|
mpi-compile:
|
|
@echo "$(strip $(PINC))"
|
|
|
|
# Like openmpi mpicc --showme:link
|
|
.PHONY: mpi-link
|
|
mpi-link:
|
|
@echo "$(strip $(PLIBS))"
|
|
|
|
#------------------------------------------------------------------------------
|