mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- add to wmakeFunctions to ensure it works even without 'make' being
installed. Exit immediately after -show-api for consistency with
-version.
foamEtcFile:
- drop warnings for some old (pre-v1812) defunct options
and simply flag as unknown options.
- handle -version, --version as equivalent to -show-api
110 lines
2.8 KiB
Plaintext
110 lines
2.8 KiB
Plaintext
#----------------------------*- makefile-gmake -*------------------------------
|
|
# ========= |
|
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
# \\ / O peration |
|
|
# \\ / A nd | www.openfoam.com
|
|
# \\/ M anipulation |
|
|
#------------------------------------------------------------------------------
|
|
# Copyright (C) 2019-2021 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))"
|
|
|
|
# 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))"
|
|
|
|
#------------------------------------------------------------------------------
|