|
[Sponsors] |
March 11, 2010, 15:28 |
How to adjust Make/options
|
#1 |
Senior Member
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20 |
Hi all,
I have re-written triSurface library (MytriSurface) and placed them in FOAM_USER_LIBDIR. How I want a application to use this library. How do I need to adjust Make/options: Code:
-I$(LIB_SRC)/MytriSurface/lnInclude Thanks Bastian |
|
September 5, 2011, 11:41 |
|
#2 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16 |
I also don't see any environment variable LIB_SRC. Where is it defined?
Regards, illya |
|
September 5, 2011, 14:05 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
( the initial post was a year and a half ago...) OK, these kinds of variables that aren't in the shell environment, are usually defined somewhere in the wmake folder, also known as $WM_DIR: Code:
echo $WM_DIR Code:
cd $WM_DIR find . | xargs grep 'LIB_SRC' -sl Code:
man find man xargs man grep Best regards, Bruno
__________________
|
|
September 6, 2011, 03:34 |
|
#4 |
Senior Member
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16 |
Thank you Bruno,
I saw, that the original post is very old, but since there was no answer and I was interested in, I thought I'll take the existing one instead of starting a new one. Best regards, Illya |
|
September 6, 2011, 15:07 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Illya,
No problem I was more stunned by the fact that the thread didn't receive any answers back then Best regards, Bruno
__________________
|
|
March 11, 2020, 05:27 |
|
#6 |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9 |
Hello Bruno,
sorry for reopening again this years-old thread but I didn't find much about these matters in the forum. Suppose I'm writing a small custom library with some solvers and a few additional features, let's say boundary conditions or function objects. Using a tree structure similar to the OpenFOAM one now I'm able to compile such features into a single library, to the $(FOAM_USER_LIBBIN) from a customPath/src/myLibrary/ source folder. To access such functionalities and to link the library to my solvers, now the Make/options file of my solvers should look like: Code:
EXE_INC = \ -IcustomPath/src/myLibrary/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lmyLibrary \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lradiationModels \ -lfiniteVolume \ -lsampling \ -lmeshTools \ -lfvOptions What if I decide to compile more custom libraries separately, and I want to define something like $(LIB_USER_SRC) to point to the customPath/src base folder automatically without having to specify the whole path for each -I line? I understand that $(LIB_SRC) is defined when calling wmake, and that to define an analogous $(LIB_USER_SRC) I could in principle either modify the wmake folder or create a custom one in my library, but this seems quite overkill. Another possibility is maybe to define it somehow in the customPath/Allwmake script, but this would prevent me to compile solvers separately during development and testing. Is there some possibility to define a variable pointing to the base folder within the Make/options file, just as it can be done in the Make/files file? I know, it's more a curiosity than a real necessity, but I was wondering about it and since you are one the OpenFOAM pros around here maybe you know the tricks! Thank you! Andrea |
|
March 12, 2020, 00:36 |
|
#7 |
Senior Member
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 15 |
You can set environment variable usign export command in linux. You can set LIB_USER_SRC to path you want.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with ADJUST FUNCTION | Munir Ahmed Khan | FLUENT | 0 | August 8, 2008 06:33 |
ADJUST udf | Jubs | FLUENT | 3 | February 12, 2007 06:00 |
adjust gradient temperature on the cylinder's wall | Konrad | FLUENT | 1 | August 28, 2006 07:16 |
udf ADJUST for recuperer the couple louse each ite | hamina | FLUENT | 1 | March 2, 2006 14:54 |
How to adjust turbulent transport constants? | Wang | FLUENT | 0 | December 6, 2000 07:57 |