[Rcpp-commits] r692 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 16 16:48:20 CET 2010


Author: edd
Date: 2010-02-16 16:48:20 +0100 (Tue, 16 Feb 2010)
New Revision: 692

Modified:
   pkg/src/Makevars.win
Log:
applied corrections by Brian Ripley


Modified: pkg/src/Makevars.win
===================================================================
--- pkg/src/Makevars.win	2010-02-16 15:40:56 UTC (rev 691)
+++ pkg/src/Makevars.win	2010-02-16 15:48:20 UTC (rev 692)
@@ -3,26 +3,15 @@
 # Makefile.win for Rcpp
 #
 # Copyright (C) 2008 - 2009 Dirk Eddelbuettel <edd at debian.org>
+# Copyright (C) 2010        Dirk Eddelbuettel and Romain Francois
 #
 # Contributions from an older Makefile.win are
 # (C) Dominick Samperi and Uwe Ligges and gratefully acknowledged
+#
+# Contributions from Brian D Ripley are also gratefully acknowledged 
 
-## ask R about compiler flags and libraries
-#RCPPFLAGS = 	`${R_HOME}/bin/R CMD config --cppflags`
-#RLDFLAGS := 	`${R_HOME}/bin/R CMD config --ldflags`
+PKG_CPPFLAGS =	-I.
 
-# or just set it directly
-#RCPPFLAGS =	-I$(R_HOME)/include -I.
-RLDFLAGS =	-L$(R_HOME)/bin -lR
-
-# or just copy defaults (cf $R_HOME/etc/Makeconf)
-#RCPPFLAGS = $(ALL_CXXFLAGS)
-#RLDFLAGS = $(LIBR) $(LIBM)
-
-## and pass this on to the implicit build rules
-PKG_CPPFLAGS +=	-I.
-PKG_LIBS +=	-s $(RLDFLAGS)
-
 ## all sources and objects
 SOURCES =	$(wildcard *.cpp)
 OBJECTS =	$(SOURCES:.cpp=.o)
@@ -34,10 +23,6 @@
 USERDIR	= 	../inst/lib$(R_ARCH)
 USERLIB	= 	$(USERDIR)/libRcpp.a
 
-## to filter out -Wall which generated a ton with older compilers
-newCXXFLAGS := 	$(filter-out -Wall,$(CXXFLAGS))
-CXXFLAGS := 	$(newCXXFLAGS)
-
 ## C++0X support enabled if 
 ## - the RCPP_CXX0X environment variable is set to "yes"
 ## - it is possible (GCC>=4.3)
@@ -47,22 +32,17 @@
 
 ## the 'package' library contains both Rcpp.{cpp,h} and the RcppExample used to demonstrate the package
 ## it is loaded via library(Rcpp) but is not used for compiling / linking against
-PKGLIB = 	Rcpp.dll
-PKGOBJ = 	$(OBJECTS)
 
 RM = 		rm -f
 
-.PHONY: 	all clean
+.PHONY: 	all clean userdir
 
-all: 		$(USERLIB) $(PKGLIB)
+all: 		userdir $(USERLIB) $(SHLIB)
 
 clean:
-		${RM} $(PKGOBJ) $(PKGLIB)
+		${RM} $(OBJECTS) $(SHLIB)
 
-$(PKGLIB): 	$(PKGOBJ)
-		$(CXX) -shared -o $(PKGLIB) $(PKGOBJ) $(PKG_LIBS)
-
-$(USERLIB):	$(USEROBJ)
+userdir:
 		-mkdir -p $(USERDIR)/Rcpp/internal 2>/dev/null
 		-mkdir -p $(USERDIR)/Rcpp/traits 2>/dev/null
 		$(AR) r $(USERLIB) $(USEROBJ)



More information about the Rcpp-commits mailing list