P.S. Sorry -- missed the question -- as far as the makenek is concerned -- you could use  USR_LFLAGS= like

USR_LFLAGS="-L/usr/lib -lfoo"

From: nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]
Sent: Friday, August 29, 2014 2:12 PM
To: nek5000-users@lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Linking other libs to Nek, e.g. ESSL in Blue Gene

Hi Joerg,

The easiest place to call your routines will be in userchk since it is called by every rank every time step including istep=0

Best.
Aleks


From: nek5000-users-bounces@lists.mcs.anl.gov [nek5000-users-bounces@lists.mcs.anl.gov] on behalf of nek5000-users@lists.mcs.anl.gov [nek5000-users@lists.mcs.anl.gov]
Sent: Friday, August 29, 2014 1:15 PM
To: nek5000-users@lists.mcs.anl.gov
Subject: [Nek5000-users] Linking other libs to Nek, e.g. ESSL in Blue Gene

Dear Neks,

I have a short technical question. For our post processing analysis of turbulent convection 
we want to use routines from ESSL Library. 

Where is the best place to include the link command to this library into the makefile or makenek?

Thanks in advance, Joerg. 
====================================================
Joerg Schumacher 
Professor for Fluid Mechanics

Institute of Thermodynamics and Fluid Mechanics
Technische Universität Ilmenau
P.O. Box 100565 
D-98684 Ilmenau 
Germany 

E-mail: joerg.schumacher@tu-ilmenau.de
http://www.tu-ilmenau.de/tsm
Phone: +49-3677-69-2428
Fax:   +49-3677-69-2411
====================================================