From wdunlap at tibco.com  Wed Sep 16 17:30:11 2009
From: wdunlap at tibco.com (William Dunlap)
Date: Wed, 16 Sep 2009 08:30:11 -0700
Subject: [Rd] Building R package with .c sub-routine files
In-Reply-To: <20090916163432.fbnaqwqz60oo4owk@web.supagro.inra.fr>
References: <20090915200451.pcj3j24q168s048k@web.supagro.inra.fr><D54A75FE-D6B4-4173-AFE3-A855CCD22ED4@epfl.ch>
	<20090916163432.fbnaqwqz60oo4owk@web.supagro.inra.fr>
Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70001CE5850@NA-PA-VBE03.na.tibco.com>

> -----Original Message-----
> From: r-devel-bounces at r-project.org 
> [mailto:r-devel-bounces at r-project.org] On Behalf Of 
> pleydell at supagro.inra.fr
> Sent: Wednesday, September 16, 2009 7:35 AM
> To: Kjell Konis
> Cc: r-devel at r-project.org
> Subject: Re: [Rd] Building R package with .c sub-routine files
> 
> > Create a file named Makevars in the same directory and put the  
> > following line in it:
> >
> > OBJECTS=file1.o
> >
> > Then R CMD SHLIB will only compile file1.c.
> >
> > Kjell
> 
> Great, that's done the job nicely.

Note that this will fail if your compiler makes object
files with a different suffix, say ".obj".  Using the
conventional '.h' for included files fixes this problem
and helps others understand your code more quickly.

Bill Dunlap
TIBCO Software Inc - Spotfire Division
wdunlap tibco.com  

> 
> Many thanks
> David
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



[Rd] Building R package with .c sub-routine files
William Dunlap