Re: [Rd] R CMD SHLIB flags

From: Dirk Eddelbuettel <edd_at_debian.org>
Date: Thu 27 Jul 2006 - 00:47:37 GMT

On 26 July 2006 at 16:59, Thomas Lumley wrote:
|
| How can one specify multiple extra flags to R CMD SHLIB? The example in
| R-exts section 5.5
| MAKEFLAGS="CFLAGS=-O3" R CMD SHLIB *.c
| works for a single flag, but when I try
| MAKEFLAGS="CFLAGS=-g -O2 -Wall" R CMD SHLIB *.c
| only the first flag is used and the rest seem to be ignored (version
| 2.3.1, Mac OS X)

As it seems to break at the space, escaping those seems to help:

edd@basebud:~/src/debian/CRAN/tseries-0.10-3/src> MAKEFLAGS='CFLAGS=-g\ -O2\ -Wall' R CMD SHLIB *.c
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c arma.c -o arma.o
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c bdstest.c -o bdstest.o
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c boot.c -o boot.o
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c garch.c -o garch.o
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c ppsum.c -o ppsum.o
gcc -I/usr/share/R/include -I/usr/share/R/include     -fpic  -g -O2 -Wall -c tsutils.c -o tsutils.o
gcc -shared -o arma.so arma.o bdstest.o boot.o garch.o ppsum.o tsutils.o -lblas-3 -lgfortran -lm -lgcc_s -L/usr/lib/R/lib -lR edd@basebud:~/lan/chibud/src/debian/CRAN/tseries-0.10-3/src> MAKEFLAGS='CFLAGS=-g\ -O2\ -Wall' R CMD SHLIB *.c

Using bash on Debian. Does that work for you on Mac OS X too?

Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu Jul 27 10:51:16 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 27 Jul 2006 - 06:27:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.