change Makefile.in to compile class outside of R build system so
that we get in the -fPIC git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12918 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9fcee578cd
commit
99f94cc0d2
1 changed files with 12 additions and 2 deletions
|
|
@ -1138,14 +1138,24 @@ uffi_clean:
|
|||
R = R
|
||||
RCXXSRCS = $(INTERFACE:.i=_wrap.cpp) #Need to use _wrap.cpp for R build system as it does not understand _wrap.cxx
|
||||
RRSRC = $(INTERFACE:.i=.R)
|
||||
R_CFLAGS=-fPIC
|
||||
|
||||
# need to compile .cxx files outside of R build system to make sure that
|
||||
# we get -fPIC
|
||||
|
||||
r: $(SRCS)
|
||||
$(SWIG) -r $(SWIGOPT) $(INTERFACEPATH)
|
||||
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(ISRCS) $(SRCS) )
|
||||
ifneq ($(SRCS),)
|
||||
$(CXX) -g -c $(CFLAGS) $(R_CFLAGS) $(SRCS) $(INCLUDES)
|
||||
endif
|
||||
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(ISRCS) $(OBJS) )
|
||||
|
||||
r_cpp: $(CXXSRCS)
|
||||
$(SWIG) -c++ -r $(SWIGOPT) -o $(RCXXSRCS) $(INTERFACEPATH)
|
||||
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(RCXXSRCS) $(SRCS) $(CXXSRCS))
|
||||
ifneq ($(CXXSRCS),)
|
||||
$(CXX) -g -c $(CFLAGS) $(R_CFLAGS) $(CXXSRCS) $(INCLUDES)
|
||||
endif
|
||||
+( PKG_CPPFLAGS="$(INCLUDES)" $(COMPILETOOL) $(R) CMD SHLIB -o $(LIBPREFIX)$(TARGET)$(SO) $(RCXXSRCS) $(OBJS) )
|
||||
|
||||
r_clean:
|
||||
rm -f *_wrap* *~ .~*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue