Skip to content

Makefile to compile .so in src (was: Re: automated libR location)

3 messages · Uwe Ligges, Matyas Sustik

#
On 01.02.2012 03:37, Matyas Sustik wrote:
1. I don't believe you really need all the flags from above. If so, 
within a package, use a Makevars file.

2. R CMD SHLIB QUIC.cpp shoudl do the trick already, perhaps some linker 
flags are required for blas that can be specified in the same line, see 
R CMD SHLIB --help

Uwe Ligges
3 days later
#
Hi Uwe,
Thanks, I think I understand now better.  I was not familiar with
Makevars files (I only dealt with Makefiles before).

I ended up simply using in the Makevars file:

PKG_LIBS = $(LAPACK_LIBS) $(FLIBS) $(BLAS_LIBS)
PKG_CXXFLAGS = -D_LANG_R

which seems to do the job.  I am just slightly uncertain about the $()
notation; in some docs I saw @BLAS_LIBS@ to appear.  So is
$() ok? Is it the right syntax?

Thanks again!
-Matyas
#
On 05.02.2012 23:17, Matyas Sustik wrote:
The @BLAS_LIBS@ should typically appear in an .in file only rather than 
the Makevars file itself.

Uwe Ligges