mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
- When compiling additional modules or user code, we need more control
for the installation locations beyond the usual FOAM_USER_LIBBIN,
FOAM_SITE_LIBBIN, FOAM_LIBBIN, and wish to have these values be
modifiable without editing files.
- provide wmake rules for handling standard defaults:
* GENERAL_RULES/module-path-user
* GENERAL_RULES/module-path-group
* GENERAL_RULES/module-path-project
which are incorporated as follows:
Make/options:
include $(GENERAL_RULES)/module-path-user
Make/files:
LIB = $(FOAM_MODULE_LIBBIN)/libMyLibrary
By default these would compile into FOAM_USER_{APPBIN,LIBBIN} but
could be adjusted at compilation time. For example,
```
wmake -module-prefix=/path/my-install-location
```
Or
```
./Allwmake -module-prefix=/path/my-install-location
./Allwmake -prefix=/path/my-install-location
```
Or
```
FOAM_MODULE_PREFIX=/path/my-install-location ./Allwmake
```
ENH: add -no-recursion option for AllwmakeParseArguments
- more descriptive naming than the -fromWmake option (still supported)
- remove wmake/scripts/wmake.{cmake,wmake}-args since the -prefix
handling and -no-recursion is now directly handled by AllwmakeParseArguments
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
# ----------------------------------------------------------------------------
|
|
# Set defaults for FOAM_MODULE_APPBIN, FOAM_MODULE_LIBBIN
|
|
# based on FOAM_MODULE_PREFIX
|
|
#
|
|
# FOAM_MODULE_APPBIN ?= FOAM_MODULE_PREFIX/bin
|
|
# FOAM_MODULE_LIBBIN ?= FOAM_MODULE_PREFIX/iib
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
# When compiling additional modules or user code, we need flexibility for
|
|
# the installation locations. The project directories may be read-only etc.
|
|
#
|
|
# For this purpose, introduce three additional make variables:
|
|
#
|
|
# - FOAM_MODULE_PREFIX - default is unset
|
|
# - FOAM_MODULE_APPBIN - default is $(FOAM_MODULE_PREFIX)/bin
|
|
# - FOAM_MODULE_LIBBIN - default is $(FOAM_MODULE_PREFIX)/lib
|
|
#
|
|
# The developer may have an intended default location for a particular module.
|
|
#
|
|
# For default location 'user':
|
|
# Make/options: include $(GENERAL_RULES)/module-path-user
|
|
# Make/files: LIB = $(FOAM_MODULE_LIBBIN)/libXYZ
|
|
#
|
|
# For default location 'group':
|
|
# Make/options: include $(GENERAL_RULES)/module-path-group
|
|
# Make/files: LIB = $(FOAM_MODULE_LIBBIN)/libXYZ
|
|
#
|
|
# For default location 'project' (openfoam):
|
|
# Make/options: include $(GENERAL_RULES)/module-path-project
|
|
# Make/files: LIB = $(FOAM_MODULE_LIBBIN)/libXYZ
|
|
#
|
|
#
|
|
# The module-path-{user,group,project} rules should include module-path-prefix
|
|
# first.
|
|
#
|
|
# ----------------------------------------------------------------------------
|
|
|
|
ifeq (,$(strip $(FOAM_MODULE_APPBIN)))
|
|
ifneq (,$(strip $(FOAM_MODULE_PREFIX)))
|
|
FOAM_MODULE_APPBIN = $(strip $(FOAM_MODULE_PREFIX))/bin
|
|
endif
|
|
endif
|
|
|
|
ifeq (,$(strip $(FOAM_MODULE_LIBBIN)))
|
|
ifneq (,$(strip $(FOAM_MODULE_PREFIX)))
|
|
FOAM_MODULE_LIBBIN = $(strip $(FOAM_MODULE_PREFIX))/lib
|
|
endif
|
|
endif
|
|
|
|
# ---------------------------------------------------------------------------
|