[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    Re: [Rd] R CMD SHLIB flags
From:       Dirk Eddelbuettel <edd () debian ! org>
Date:       2006-07-27 0:47:37
Message-ID: 17608.3369.321430.848590 () basebud ! nulle ! part
[Download RAW message or body]


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic