CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to adjust Make/options (http://www.cfd-online.com/Forums/openfoam-programming-development/73586-how-adjust-make-options.html)

bastil March 11, 2010 15:28

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
Where is LIB_SRC set and how do I need to change it? It obviously points to FOAM_SRC_DIR but I can not find any environment variable LIB_SRC?

Thanks Bastian

linch September 5, 2011 11:41

I also don't see any environment variable LIB_SRC. Where is it defined?

Regards,
illya

wyldckat September 5, 2011 14:05

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
Now, if you want to find out where it's located in one of those files, you can either use an advanced text editor (such as Kate or Eclipse IDE) or use the following commands:
Code:

cd $WM_DIR
find . | xargs grep 'LIB_SRC' -sl

The second line will use find to list all of the available files and folders; pipe "|" it to xargs for using each item on the list from find on grep. grep will then list the files that have the string we are searching for. Have doubts? Run:
Code:

man find
man xargs
man grep

For the lazy, the answer is as follows: it's defined in "$WM_DIR/Makefile".

Best regards,
Bruno

linch September 6, 2011 03:34

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

wyldckat September 6, 2011 15:07

Hi Illya,

No problem :) I was more stunned by the fact that the thread didn't receive any answers back then :(

Best regards,
Bruno


All times are GMT -4. The time now is 15:42.