CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   How to adjust Make/options (

bastil March 11, 2010 16: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:


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?


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:

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:

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:

man find
man xargs
man grep

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

Best regards,

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,

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,

All times are GMT -4. The time now is 03:43.