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/)
-   -   Our friend "wmake" (http://www.cfd-online.com/Forums/openfoam-programming-development/70803-our-friend-wmake.html)

marupio December 6, 2009 22:50

Our friend "wmake"
 
I want to know what's going on behind the scenes of wmake. The Make/options file is confusing me. e.g. (in ThirdParty/malloc/hoard):

EXE_INC = -DNDEBUG -D_REENTRANT=1

LIB_LIBS = \
-ldl -lpthread

I'm guessing EXE_INC are compiler options going to gcc, but what is LIB_LIBS? Where can I learn what all the options / categories are?

olesen December 7, 2009 03:32

Quote:

Originally Posted by marupio (Post 238897)
LIB_LIBS = -ldl -lpthread

I'm guessing EXE_INC are compiler options going to gcc, but what is LIB_LIBS?

As you might guess from the names, EXE_LIBS are the libraries for EXE (ie, executables), and LIB_LIBS are the libraries for LIB (ie, for libraries).
What this specifically means is that LIB_LIBS are also linked in.

For example, if you look at src/sampling/Make/options, you should see this:
Code:

LIB_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lsurfMesh \
    -ltriSurface

which means that if you link against the libsampling.so, all these other libraries will also be linked in, without you having to specify them.
You can verify this with 'ldd'.
For example,
Code:

    ldd -v lib/linux64GccDPOpt/libsampling.so
should show these LIB_LIBS libraries too.

Quote:

Originally Posted by marupio (Post 238897)
Where can I learn what all the options / categories are?

Simply learning by example (ie, seeing how they are used in the OpenFOAM code base) worked for me.


All times are GMT -4. The time now is 14:01.