How to adjust Make/options
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 |
I also don't see any environment variable LIB_SRC. Where is it defined?
Regards, illya |
Greetings to all!
(:eek: 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 Code:
man find Best regards, Bruno |
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 |
Hi Illya,
No problem :) I was more stunned by the fact that the thread didn't receive any answers back then :( Best regards, Bruno |
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 = \ 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 |
You can set environment variable usign export command in linux. You can set LIB_USER_SRC to path you want.
|
All times are GMT -4. The time now is 16:56. |