From c3a03105c43cdc8162f80773ab8be5f17af3171c Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 24 Jan 2016 14:10:07 +0000 Subject: [PATCH] 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. --- wmake/makefiles/files | 20 +++++++++--------- wmake/makefiles/general | 32 ++++++++++++----------------- wmake/rules/General/general | 13 ++++++++++++ wmake/rules/linux64Clang/c | 2 +- wmake/rules/linux64Clang/c++ | 2 +- wmake/rules/linux64Clang/general | 4 ++-- wmake/rules/linux64Gcc/c | 2 +- wmake/rules/linux64Gcc/c++ | 2 +- wmake/rules/linux64Gcc/general | 4 ++-- wmake/rules/linux64Gcc45 | 1 - wmake/rules/linux64Gcc46 | 1 - wmake/rules/linux64Gcc47 | 1 - wmake/rules/linux64Gcc48 | 1 - wmake/rules/linux64Gcc49 | 1 - wmake/rules/linux64Gcc51 | 1 - wmake/rules/linux64Icc/c | 2 +- wmake/rules/linux64Icc/c++ | 2 +- wmake/rules/linux64Icc/general | 4 ++-- wmake/rules/linuxARM7Gcc/c | 2 +- wmake/rules/linuxARM7Gcc/c++ | 2 +- wmake/rules/linuxARM7Gcc/general | 4 ++-- wmake/rules/linuxClang/c | 2 +- wmake/rules/linuxClang/c++ | 2 +- wmake/rules/linuxClang/general | 4 ++-- wmake/rules/linuxGcc/c | 2 +- wmake/rules/linuxGcc/c++ | 2 +- wmake/rules/linuxGcc/general | 4 ++-- wmake/rules/linuxGcc45 | 1 - wmake/rules/linuxGcc46 | 1 - wmake/rules/linuxGcc47 | 1 - wmake/rules/linuxGcc48 | 1 - wmake/rules/linuxGcc49 | 1 - wmake/rules/linuxGcc51 | 1 - wmake/rules/linuxIA64Gcc/c | 2 +- wmake/rules/linuxIA64Gcc/c++ | 2 +- wmake/rules/linuxIA64Gcc/general | 6 +++--- wmake/rules/linuxIA64Icc/c | 2 +- wmake/rules/linuxIA64Icc/c++ | 2 +- wmake/rules/linuxIA64Icc/general | 6 +++--- wmake/rules/linuxIcc/c | 2 +- wmake/rules/linuxIcc/c++ | 2 +- wmake/rules/linuxIcc/general | 4 ++-- wmake/rules/linuxPPC64Gcc/c | 2 +- wmake/rules/linuxPPC64Gcc/c++ | 2 +- wmake/rules/linuxPPC64Gcc/general | 6 +++--- wmake/rules/linuxPPC64leGcc/c | 2 +- wmake/rules/linuxPPC64leGcc/c++ | 2 +- wmake/rules/linuxPPC64leGcc/general | 6 +++--- wmake/rules/solaris64Gcc/c | 2 +- wmake/rules/solaris64Gcc/c++ | 2 +- wmake/rules/solaris64Gcc/general | 6 +++--- wmake/rules/solarisGcc/c | 2 +- wmake/rules/solarisGcc/c++ | 2 +- wmake/rules/solarisGcc/general | 6 +++--- wmake/src/Makefile | 14 +++++-------- 55 files changed, 99 insertions(+), 108 deletions(-) delete mode 120000 wmake/rules/linux64Gcc45 delete mode 120000 wmake/rules/linux64Gcc46 delete mode 120000 wmake/rules/linux64Gcc47 delete mode 120000 wmake/rules/linux64Gcc48 delete mode 120000 wmake/rules/linux64Gcc49 delete mode 120000 wmake/rules/linux64Gcc51 delete mode 120000 wmake/rules/linuxGcc45 delete mode 120000 wmake/rules/linuxGcc46 delete mode 120000 wmake/rules/linuxGcc47 delete mode 120000 wmake/rules/linuxGcc48 delete mode 120000 wmake/rules/linuxGcc49 delete mode 120000 wmake/rules/linuxGcc51 diff --git a/wmake/makefiles/files b/wmake/makefiles/files index 91bff6265e..22c6a05f5e 100644 --- a/wmake/makefiles/files +++ b/wmake/makefiles/files @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -29,24 +29,23 @@ # #------------------------------------------------------------------------------ -GENERAL_RULES = $(WM_DIR)/rules/General -RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER) -OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) - +GENERAL_RULES = $(WM_DIR)/rules/General include $(GENERAL_RULES)/general -include $(RULES)/general + #------------------------------------------------------------------------------ # declare names of make system control files derived from file 'files' #------------------------------------------------------------------------------ -OPTIONS = $(OBJECTS_DIR)/options -FILES = $(OBJECTS_DIR)/files -VARS = $(OBJECTS_DIR)/variables -SFILES = $(OBJECTS_DIR)/sourceFiles +OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) +OPTIONS = $(OBJECTS_DIR)/options +FILES = $(OBJECTS_DIR)/files +VARS = $(OBJECTS_DIR)/variables +SFILES = $(OBJECTS_DIR)/sourceFiles -include $(OPTIONS) + #------------------------------------------------------------------------------ # Declare dependecy of all make system files on FILES # Causes all derived files to be remade if any are changed or missing @@ -74,4 +73,5 @@ $(SFILES): $(MAKE_DIR)/files $(VARS): $(SFILES) + #------------------------------------------------------------------------------ diff --git a/wmake/makefiles/general b/wmake/makefiles/general index 2fc320de19..580e96c7b2 100644 --- a/wmake/makefiles/general +++ b/wmake/makefiles/general @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -33,7 +33,7 @@ # The Makefile uses a POSIX shell #------------------------------------------------------------------------------ -SHELL = /bin/sh +SHELL = /bin/sh #------------------------------------------------------------------------------ @@ -47,29 +47,29 @@ SHELL = /bin/sh # Set the directory containing the wmake scripts #------------------------------------------------------------------------------ -WM_SCRIPTS = $(WM_DIR)/scripts +WM_SCRIPTS = $(WM_DIR)/scripts #------------------------------------------------------------------------------ # Declare default paths #------------------------------------------------------------------------------ -LIB_SRC = $(WM_PROJECT_DIR)/src -LIB_PLATFORMS = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib -OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) +LIB_SRC = $(WM_PROJECT_DIR)/src +LIB_PLATFORMS = $(WM_PROJECT_DIR)/platforms/$(WM_OPTIONS)/lib +OBJECTS_DIR = $(MAKE_DIR)/$(WM_OPTIONS) -SYS_INC = -SYS_LIBS = +SYS_INC = +SYS_LIBS = -PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude \ +PROJECT_INC = -I$(LIB_SRC)/$(WM_PROJECT)/lnInclude \ -I$(LIB_SRC)/OSspecific/$(WM_OSTYPE)/lnInclude -PROJECT_LIBS = -l$(WM_PROJECT) +PROJECT_LIBS = -l$(WM_PROJECT) -EXE_INC = -EXE_LIBS = +EXE_INC = +EXE_LIBS = -LIB_LIBS = +LIB_LIBS = #------------------------------------------------------------------------------ @@ -94,13 +94,7 @@ SEXE = a.out #------------------------------------------------------------------------------ GENERAL_RULES = $(WM_DIR)/rules/General -RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER) -WMAKE_BIN = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER) - include $(GENERAL_RULES)/general -include $(RULES)/general -include $(RULES)/$(WM_LINK_LANGUAGE) -include $(GENERAL_RULES)/transform #------------------------------------------------------------------------------ diff --git a/wmake/rules/General/general b/wmake/rules/General/general index 062c704f13..b3f20b48e8 100644 --- a/wmake/rules/General/general +++ b/wmake/rules/General/general @@ -12,4 +12,17 @@ GINC = GLIBS = -lm GLIB_LIBS = + +COMPILER_TYPE = $(shell echo $(WM_COMPILER) | tr -d [:digit:]) +DEFAULT_RULES = $(WM_DIR)/rules/$(WM_ARCH)$(COMPILER_TYPE) +RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER) +WMAKE_BIN = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER) + +include $(DEFAULT_RULES)/general +include $(DEFAULT_RULES)/$(WM_LINK_LANGUAGE) +-include $(RULES)/general +-include $(RULES)/$(WM_LINK_LANGUAGE) +include $(GENERAL_RULES)/transform + + #------------------------------------------------------------------------------ diff --git a/wmake/rules/linux64Clang/c b/wmake/rules/linux64Clang/c index e882186177..b743e3f68c 100644 --- a/wmake/rules/linux64Clang/c +++ b/wmake/rules/linux64Clang/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = clang -m64 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++ index 2e09ff8827..84ed0f4107 100644 --- a/wmake/rules/linux64Clang/c++ +++ b/wmake/rules/linux64Clang/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-u CC = clang++ -std=c++0x -m64 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linux64Clang/general b/wmake/rules/linux64Clang/general index 243cb7d8c7..1002cb169b 100644 --- a/wmake/rules/linux64Clang/general +++ b/wmake/rules/linux64Clang/general @@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linux64Gcc/c b/wmake/rules/linux64Gcc/c index 66435ccf05..1097b3a594 100644 --- a/wmake/rules/linux64Gcc/c +++ b/wmake/rules/linux64Gcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -m64 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++ index 7c7af702e2..a47d0d499a 100644 --- a/wmake/rules/linux64Gcc/c++ +++ b/wmake/rules/linux64Gcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -m64 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linux64Gcc/general b/wmake/rules/linux64Gcc/general index 243cb7d8c7..1002cb169b 100644 --- a/wmake/rules/linux64Gcc/general +++ b/wmake/rules/linux64Gcc/general @@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linux64Gcc45 b/wmake/rules/linux64Gcc45 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc45 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Gcc46 b/wmake/rules/linux64Gcc46 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc46 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Gcc47 b/wmake/rules/linux64Gcc47 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc47 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Gcc48 b/wmake/rules/linux64Gcc48 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc48 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Gcc49 b/wmake/rules/linux64Gcc49 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc49 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Gcc51 b/wmake/rules/linux64Gcc51 deleted file mode 120000 index 7a0c1a8505..0000000000 --- a/wmake/rules/linux64Gcc51 +++ /dev/null @@ -1 +0,0 @@ -linux64Gcc \ No newline at end of file diff --git a/wmake/rules/linux64Icc/c b/wmake/rules/linux64Icc/c index 97da5c28f0..14a3a231d5 100644 --- a/wmake/rules/linux64Icc/c +++ b/wmake/rules/linux64Icc/c @@ -4,7 +4,7 @@ cWARN = cc = icc -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++ index 85b976ae4f..03bee61dce 100644 --- a/wmake/rules/linux64Icc/c++ +++ b/wmake/rules/linux64Icc/c++ @@ -8,7 +8,7 @@ c++LESSWARN = -diag-disable 1224,2026,2305 CC = icpc -std=c++0x -fp-trap=common -fp-model precise -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository diff --git a/wmake/rules/linux64Icc/general b/wmake/rules/linux64Icc/general index 45c285f1ee..52b0e177d7 100644 --- a/wmake/rules/linux64Icc/general +++ b/wmake/rules/linux64Icc/general @@ -4,5 +4,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxARM7Gcc/c b/wmake/rules/linuxARM7Gcc/c index d7bda5d1df..dfae4adda0 100644 --- a/wmake/rules/linuxARM7Gcc/c +++ b/wmake/rules/linuxARM7Gcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++ index b647cc85e6..80fccf2710 100644 --- a/wmake/rules/linuxARM7Gcc/c++ +++ b/wmake/rules/linuxARM7Gcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxARM7Gcc/general b/wmake/rules/linuxARM7Gcc/general index 376c614846..1e51dcc403 100644 --- a/wmake/rules/linuxARM7Gcc/general +++ b/wmake/rules/linuxARM7Gcc/general @@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxClang/c b/wmake/rules/linuxClang/c index 7d67b4c022..2c8e8a7f9c 100644 --- a/wmake/rules/linuxClang/c +++ b/wmake/rules/linuxClang/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = clang -m32 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++ index 216cc67f7b..b029fbcfd7 100644 --- a/wmake/rules/linuxClang/c++ +++ b/wmake/rules/linuxClang/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedef -Wno-tautological-un CC = clang++ -std=c++0x -m32 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxClang/general b/wmake/rules/linuxClang/general index fa1eb5b925..e3427c3181 100644 --- a/wmake/rules/linuxClang/general +++ b/wmake/rules/linuxClang/general @@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxGcc/c b/wmake/rules/linuxGcc/c index 81c64cf710..8eddde0490 100644 --- a/wmake/rules/linuxGcc/c +++ b/wmake/rules/linuxGcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -m32 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++ index b115000d95..c1c34a8419 100644 --- a/wmake/rules/linuxGcc/c++ +++ b/wmake/rules/linuxGcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -m32 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxGcc/general b/wmake/rules/linuxGcc/general index fa1eb5b925..e3427c3181 100644 --- a/wmake/rules/linuxGcc/general +++ b/wmake/rules/linuxGcc/general @@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxGcc45 b/wmake/rules/linuxGcc45 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc45 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxGcc46 b/wmake/rules/linuxGcc46 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc46 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxGcc47 b/wmake/rules/linuxGcc47 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc47 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxGcc48 b/wmake/rules/linuxGcc48 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc48 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxGcc49 b/wmake/rules/linuxGcc49 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc49 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxGcc51 b/wmake/rules/linuxGcc51 deleted file mode 120000 index e30dec7be4..0000000000 --- a/wmake/rules/linuxGcc51 +++ /dev/null @@ -1 +0,0 @@ -linuxGcc \ No newline at end of file diff --git a/wmake/rules/linuxIA64Gcc/c b/wmake/rules/linuxIA64Gcc/c index d7bda5d1df..dfae4adda0 100644 --- a/wmake/rules/linuxIA64Gcc/c +++ b/wmake/rules/linuxIA64Gcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++ index d07854e064..6d152ecd1a 100644 --- a/wmake/rules/linuxIA64Gcc/c++ +++ b/wmake/rules/linuxIA64Gcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxIA64Gcc/general b/wmake/rules/linuxIA64Gcc/general index 480ea1b9c4..182ee7f901 100644 --- a/wmake/rules/linuxIA64Gcc/general +++ b/wmake/rules/linuxIA64Gcc/general @@ -4,6 +4,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxIA64Icc/c b/wmake/rules/linuxIA64Icc/c index 3952de58fb..2b19596b1a 100644 --- a/wmake/rules/linuxIA64Icc/c +++ b/wmake/rules/linuxIA64Icc/c @@ -4,7 +4,7 @@ cWARN = cc = icc -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++ index 4d24538e97..a8a9341e1a 100644 --- a/wmake/rules/linuxIA64Icc/c++ +++ b/wmake/rules/linuxIA64Icc/c++ @@ -8,7 +8,7 @@ c++LESSWARN = -diag-disable 1224,2026,2305 CC = icpc -std=c++0x -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository diff --git a/wmake/rules/linuxIA64Icc/general b/wmake/rules/linuxIA64Icc/general index 9dc446d4b2..09a3896656 100644 --- a/wmake/rules/linuxIA64Icc/general +++ b/wmake/rules/linuxIA64Icc/general @@ -4,6 +4,6 @@ GLIBS = include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxIcc/c b/wmake/rules/linuxIcc/c index a6441bcbd0..c9f75c9021 100644 --- a/wmake/rules/linuxIcc/c +++ b/wmake/rules/linuxIcc/c @@ -4,7 +4,7 @@ cWARN = cc = icc -gcc-version=400 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -KPIC diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++ index 48fdb9f6b1..88976144c1 100644 --- a/wmake/rules/linuxIcc/c++ +++ b/wmake/rules/linuxIcc/c++ @@ -8,7 +8,7 @@ c++LESSWARN = -diag-disable 1224,2026,2305 CC = icpc -std=c++0x -fp-trap=common -fp-model precise -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository diff --git a/wmake/rules/linuxIcc/general b/wmake/rules/linuxIcc/general index 8a38ddf6d4..5c94cad44a 100644 --- a/wmake/rules/linuxIcc/general +++ b/wmake/rules/linuxIcc/general @@ -5,5 +5,5 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxPPC64Gcc/c b/wmake/rules/linuxPPC64Gcc/c index 1fa057876c..f973417062 100644 --- a/wmake/rules/linuxPPC64Gcc/c +++ b/wmake/rules/linuxPPC64Gcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -m64 -mcpu=power5+ -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++ index c5dcaa4d96..7c33079384 100644 --- a/wmake/rules/linuxPPC64Gcc/c++ +++ b/wmake/rules/linuxPPC64Gcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -m64 -mcpu=power5+ -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxPPC64Gcc/general b/wmake/rules/linuxPPC64Gcc/general index fa717f9645..a590cc29c8 100644 --- a/wmake/rules/linuxPPC64Gcc/general +++ b/wmake/rules/linuxPPC64Gcc/general @@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/linuxPPC64leGcc/c b/wmake/rules/linuxPPC64leGcc/c index d9aa80f726..c5e3c73eba 100644 --- a/wmake/rules/linuxPPC64leGcc/c +++ b/wmake/rules/linuxPPC64leGcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -m64 -mcpu=power8 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++ index 76c4947183..805f821822 100644 --- a/wmake/rules/linuxPPC64leGcc/c++ +++ b/wmake/rules/linuxPPC64leGcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds CC = g++ -std=c++0x -m64 -mcpu=power8 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/linuxPPC64leGcc/general b/wmake/rules/linuxPPC64leGcc/general index f800e09afc..7867cbde8f 100644 --- a/wmake/rules/linuxPPC64leGcc/general +++ b/wmake/rules/linuxPPC64leGcc/general @@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -ldl include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/solaris64Gcc/c b/wmake/rules/solaris64Gcc/c index 66435ccf05..1097b3a594 100644 --- a/wmake/rules/solaris64Gcc/c +++ b/wmake/rules/solaris64Gcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -m64 -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++ index e7f16f4d46..324522f10b 100644 --- a/wmake/rules/solaris64Gcc/c++ +++ b/wmake/rules/solaris64Gcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = CC = g++ -std=c++0x -m64 -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/solaris64Gcc/general b/wmake/rules/solaris64Gcc/general index 83b7ebf4e0..bbf1b69bc2 100644 --- a/wmake/rules/solaris64Gcc/general +++ b/wmake/rules/solaris64Gcc/general @@ -5,6 +5,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -lnsl -lsocket -L$(FOAM_LIBBIN)/dummy -lPstream include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/rules/solarisGcc/c b/wmake/rules/solarisGcc/c index d7bda5d1df..dfae4adda0 100644 --- a/wmake/rules/solarisGcc/c +++ b/wmake/rules/solarisGcc/c @@ -4,7 +4,7 @@ cWARN = -Wall cc = gcc -include $(RULES)/c$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c$(WM_COMPILE_OPTION) cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++ index d6bf189010..d8e968fb9f 100644 --- a/wmake/rules/solarisGcc/c++ +++ b/wmake/rules/solarisGcc/c++ @@ -7,7 +7,7 @@ c++LESSWARN = CC = g++ -std=c++0x -include $(RULES)/c++$(WM_COMPILE_OPTION) +include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) ptFLAGS = -DNoRepository -ftemplate-depth-100 diff --git a/wmake/rules/solarisGcc/general b/wmake/rules/solarisGcc/general index cda7ba8673..2e6e7b1f40 100644 --- a/wmake/rules/solarisGcc/general +++ b/wmake/rules/solarisGcc/general @@ -4,6 +4,6 @@ PROJECT_LIBS = -l$(WM_PROJECT) -lnsl -lsocket -L$(FOAM_LIBBIN)/dummy -lPstream include $(GENERAL_RULES)/standard -include $(RULES)/X -include $(RULES)/c -include $(RULES)/c++ +include $(DEFAULT_RULES)/X +include $(DEFAULT_RULES)/c +include $(DEFAULT_RULES)/c++ diff --git a/wmake/src/Makefile b/wmake/src/Makefile index 92a2b087e6..4162a3b45d 100644 --- a/wmake/src/Makefile +++ b/wmake/src/Makefile @@ -2,7 +2,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -43,19 +43,15 @@ SHELL = /bin/sh #------------------------------------------------------------------------------ -# set compilation and dependency building rules +# Set compilation and dependency building rules #------------------------------------------------------------------------------ -GENERAL_RULES = $(WM_DIR)/rules/General -RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER) -WMAKE_BIN = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER) - -include $(RULES)/general -include $(RULES)/$(WM_LINK_LANGUAGE) +GENERAL_RULES = $(WM_DIR)/rules/General +include $(GENERAL_RULES)/general #------------------------------------------------------------------------------ -# targets +# Targets #------------------------------------------------------------------------------ all: $(WMAKE_BIN)/dirToString $(WMAKE_BIN)/wmkdep