COMP: fix some linkage issues for mingw

COMP: automatically add FlexLexer.h to MSwindows OSspecific

- useful, frequently forgotten step for cross-compiling
This commit is contained in:
Mark Olesen
2020-06-16 14:47:50 +02:00
parent ddfe9ae2a3
commit c1c995d3fe
10 changed files with 29 additions and 3 deletions

View File

@ -3,4 +3,5 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \
-lmultiphaseSystem -lmultiphaseSystem

View File

@ -10,6 +10,8 @@ EXE_INC = \
-I../twoPhaseSystem/lnInclude -I../twoPhaseSystem/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lcompressibleTwoPhaseSystem \ -lcompressibleTwoPhaseSystem \
-lcompressibleTransportModels \ -lcompressibleTransportModels \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \

View File

@ -6,5 +6,6 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lblockMesh \ -lblockMesh \
-lfileFormats \
-lmeshTools \ -lmeshTools \
-ldynamicMesh -ldynamicMesh

View File

@ -6,7 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude -I$(LIB_SRC)/mesh/blockMesh/lnInclude
EXE_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfileFormats \ -lfileFormats \
-lsurfMesh \ -lsurfMesh \

View File

@ -38,8 +38,10 @@ License
#include <cstring> #include <cstring>
#ifndef FULLDEBUG #ifndef FULLDEBUG
#ifndef NDEBUG
#define NDEBUG #define NDEBUG
#endif #endif
#endif
#include <cassert> #include <cassert>
using namespace Foam; using namespace Foam;

View File

@ -46,8 +46,10 @@ License
#include "OSspecific.H" #include "OSspecific.H"
#ifndef FULLDEBUG #ifndef FULLDEBUG
#ifndef NDEBUG
#define NDEBUG #define NDEBUG
#endif #endif
#endif
#include <cassert> #include <cassert>
using namespace Foam; using namespace Foam;

View File

@ -31,8 +31,10 @@ License
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#ifndef FULLDEBUG #ifndef FULLDEBUG
#ifndef NDEBUG
#define NDEBUG #define NDEBUG
#endif #endif
#endif
#include <cassert> #include <cassert>
using namespace Foam::constant; using namespace Foam::constant;

View File

@ -31,8 +31,10 @@ License
#include "mathematicalConstants.H" #include "mathematicalConstants.H"
#ifndef FULLDEBUG #ifndef FULLDEBUG
#ifndef NDEBUG
#define NDEBUG #define NDEBUG
#endif #endif
#endif
#include <cassert> #include <cassert>
using namespace Foam::constant; using namespace Foam::constant;

View File

@ -4,6 +4,18 @@ targetType=libo # Preferred library type
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments $* . ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments $*
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if [ -f /usr/include/FlexLexer.h ] && [ ! -f FlexLexer.h ]
then
echo "Adding FlexLexer.h link to ${PWD##*/} for cross-compilation"
ln -sf /usr/include/FlexLexer.h FlexLexer.h
if [ -d lnInclude ]
then
(cd lnInclude && ln -sf ../FlexLexer.h .)
fi
fi
unset COMP_FLAGS LINK_FLAGS unset COMP_FLAGS LINK_FLAGS
# Make object (non-shared by default) # Make object (non-shared by default)

View File

@ -3,15 +3,17 @@ EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lfileFormats \ -lfileFormats \
-lsurfMesh \ -lsurfMesh \
-lmeshTools \ -lmeshTools \
-lsampling \
-ldynamicMesh \
-ltwoPhaseMixture \ -ltwoPhaseMixture \
-ltwoPhaseProperties -ltwoPhaseProperties