Dear all, My package makes use of two shared objects. The default R CMD build script only creates one of them, so I added targets to my Makevars.in file. The Makevars.in file uses constants from $(R_HOME)/etc/Makeconf such as ALL_CPPFLAGS, SHLIB_LINK, etc... and this works fine. However, under Windows, it appears that Makevars.win is read before ($R_HOME)/etc/Makeconf and so I can't make use of the constants I need... Can anyone help? Is there an easier way to specify which shared objects R CMD build should create under Windows? Thanks, E # Makevars.in PKG_CPPFLAGS = @BGX_CPPFLAGS@ PKG_LIBS = @LIBS@ MYCXXFLAGS=@BGX_CXXFLAGS@ MYCFLAGS=@BGX_CFLAGS@ all: $(SHLIB) sokal.so %.o: %.cc $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(MYCXXFLAGS) -c $< -o $@ %.o: %.c $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(MYCFLAGS) -c $< -o $@ sokal.so: sokal.o $(SHLIB_LINK) sokal.o -o sokal.so
[Bioc-devel] Compiling more than one shared object
3 messages · Ernest Turro, Martin Morgan
Begin forwarded message:
From: Ernest Turro <ernest.turro at imperial.ac.uk> Date: 10 September 2007 12:49:12 BDT To: bioc-devel at stat.math.ethz.ch Subject: [Bioc-devel] Compiling more than one shared object X-Mailer: Apple Mail (2.752.3) Dear all, My package makes use of two shared objects. The default R CMD build script only creates one of them, so I added targets to my Makevars.in file. The Makevars.in file uses constants from $(R_HOME)/etc/Makeconf such as ALL_CPPFLAGS, SHLIB_LINK, etc... and this works fine. However, under Windows, it appears that Makevars.win is read before ($R_HOME)/etc/Makeconf and so I can't make use of the constants I need... Can anyone help? Is there an easier way to specify which shared objects R CMD build should create under Windows?
Regarding my previous message, I have combined the various C functions I call from R into one shared object, and now R CMD build works fine on Windows. It still might be worth looking into why R_HOME/etc/Makeconf macros are available in Makevars.in under unix but not in Makevars.win under Windows...
Thanks, E # Makevars.in PKG_CPPFLAGS = @BGX_CPPFLAGS@ PKG_LIBS = @LIBS@ MYCXXFLAGS=@BGX_CXXFLAGS@ MYCFLAGS=@BGX_CFLAGS@ all: $(SHLIB) sokal.so %.o: %.cc $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(MYCXXFLAGS) -c $< -o $@ %.o: %.c $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(MYCFLAGS) -c $< -o $@ sokal.so: sokal.o $(SHLIB_LINK) sokal.o -o sokal.so
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
1 day later
Ernest Several workarounds come to mind, but probably a more definitive answer will come from asking on R-devel. I encourage you to ask there. Sorry not to be more helpful. Martin Ernest Turro <ernest.turro at ic.ac.uk> writes:
Dear all, My package makes use of two shared objects. The default R CMD build script only creates one of them, so I added targets to my Makevars.in file. The Makevars.in file uses constants from $(R_HOME)/etc/Makeconf such as ALL_CPPFLAGS, SHLIB_LINK, etc... and this works fine. However, under Windows, it appears that Makevars.win is read before ($R_HOME)/etc/Makeconf and so I can't make use of the constants I need... Can anyone help? Is there an easier way to specify which shared objects R CMD build should create under Windows? Thanks, E # Makevars.in PKG_CPPFLAGS = @BGX_CPPFLAGS@ PKG_LIBS = @LIBS@ MYCXXFLAGS=@BGX_CXXFLAGS@ MYCFLAGS=@BGX_CFLAGS@ all: $(SHLIB) sokal.so %.o: %.cc $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(MYCXXFLAGS) -c $< -o $@ %.o: %.c $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(MYCFLAGS) -c $< -o $@ sokal.so: sokal.o $(SHLIB_LINK) sokal.o -o sokal.so
_______________________________________________ Bioc-devel at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Martin Morgan Bioconductor / Computational Biology http://bioconductor.org