Commit Graph

11 Commits

Author SHA1 Message Date
1156a55669 wmake/makefiles/files: Updated comments 2020-12-11 07:51:52 +00:00
a918deda09 wmake/makefiles/files: Preserve the indentation of the source file lines in Make/files 2020-12-10 08:24:28 +00:00
848ec1cd97 wmake: Simplified and standardised the Make/files files
cpp is no longer used to pre-process Make/files files allowing standard make '#'
syntax for comments, 'ifdef', 'ifndef' conditionals etc.  This is make possible
by automatically pre-pending SOURCE += to each of the source file names in
Make/files.

The list of source files compile can be specified either as a simple list of
files in Make/files e.g.

    # Note: fileMonitor assumes inotify by default. Compile with -DFOAM_USE_STAT
    # to use stat (=timestamps) instead of inotify
    fileMonitor.C

    ifdef SunOS64
        dummyPrintStack.C
    else
        printStack.C
    endif

    LIB = $(FOAM_LIBBIN)/libOSspecific

or

or directly as the SOURCE entry which is used in the Makefile:

    SOURCE = \
        adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
        adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
        adjointShapeOptimizationFoam.C

    EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In either form make syntax for comments and conditionals is supported.
2020-12-10 08:09:49 +00:00
30e6e02d29 wmake: Removed the cpp processing of the Make/options file
so that it can be included directly into the wmake Makefile to allow full
support of gmake syntax, variables, functions etc.

The Make/files file handled in the same manner as the Make/options file if it
contains the SOURCE entry otherwise it is first processed by cpp for backward
compatibility.
2020-12-09 13:35:14 +00:00
ff766fe6ac wmake: Added support for gmake directives in Make/files
The list of source files compile can now be specified either as a simple list of
files in Make/files e.g.

adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C
adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C
adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

or directly as the SOURCE entry which is used in the Makefile:

SOURCE = \
    adjointOutletPressure/adjointOutletPressureFvPatchScalarField.C \
    adjointOutletVelocity/adjointOutletVelocityFvPatchVectorField.C \
    adjointShapeOptimizationFoam.C

EXE = $(FOAM_APPBIN)/adjointShapeOptimizationFoam

In both cases the Make/files is first parsed by cpp to handle #if, #ifdef
etc. directives but in the latter form gmake directives like ifeq can be also be
used to optionally select files to compile, typically using

SOURCE += anotherFile.C

statements.
2020-12-08 19:10:21 +00:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
32990e2898 wmake: Declare all makefiles to be specifically GNU make files 2016-11-13 15:18:09 +00:00
151631c5e4 Allwmake: improved '-update' option to handle out-of-date '.dep' files
Patch contributed by Bruno Santos
Resolves bug-report http://bugs.openfoam.org/view.php?id=2091
2016-05-16 12:21:57 +01:00
8446f25f1f wmake: Update comments 2016-01-24 14:37:39 +00:00
d138d0b949 wmake: Add support for compiler type default rules
which may be optionally overridden by version-specific rules.

For example the default rules for gcc on GNU/Linux x86_64 are in the
wmake/rules/linux64Gcc directory.  If there is a need to change any of
the rules for a specific version of gcc, e.g. gcc-4.8.4 the directory
wmake/rules/linux64Gcc48 may be created into which any of the language
files may be provided containing the rules to override the defaults.
2016-01-24 14:10:07 +00:00
5defb3b751 wmake: General cleanup to improve consistency and maintainability
The Makefiles are now in the makefiles sub-directory

The "-f | -force" option in wmakeLnInclude is now "-u | -update" for
consistency with the other scripts.

The "Usage" entry in the headers is now consistently formatted in all
scripts.
2015-12-16 18:31:02 +00:00