# -*- mode: Makefile; tab-width: 8 -*- # # Makevars for Rcpp # # Copyright (C) 2008 - 2009 Dirk Eddelbuettel # Copyright (C) 2008, 2013 Simon Urbanek # Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois ## $(SHLIB) is the usual default target that is built automatically from all source ## files in this directory. userLibrary is an additional target for the second library ## that will be installed in ../inst/lib$(R_ARCH) and which users can link against. ## uncomment this to enable c++0x features (experimental) ## CLINK_CPPFLAGS=-std=c++0x all: $(SHLIB) userLibrary ## we place it inside the inst/ directory so that it gets installed by the package USERDIR = ../inst/lib USERLIB = libRcpp$(DYLIB_EXT) USERLIBST = libRcpp.a PKG_CPPFLAGS += -I../inst/include/ -I/opt/local/include PKG_CPPFLAGS += -I/usr/local/Cellar/octave/3.6.4/include/octave-3.6.4 PKG_CPPFLAGS += -I/usr/local/Cellar/octave/3.6.4/include/octave-3.6.4/octave ## For Rcpp.so (not Rcpp.dylib) PKG_LIBS += -L/usr/local/Cellar/octave/3.6.4/lib/octave/3.6.4 -loctave -loctinterp -lcruft userLibrary: $(USERLIB) $(USERLIBST) -@if test ! -e $(USERDIR)$(R_ARCH); then mkdir -p $(USERDIR)$(R_ARCH); fi cp $(USERLIB) $(USERDIR)$(R_ARCH) cp $(USERLIBST) $(USERDIR)$(R_ARCH) rm $(USERLIB) $(USERLIBST) $(USERLIB): $(OBJECTS) $(SHLIB_CXXLD) -o $(USERLIB) $(OBJECTS) $(SHLIB_CXXLDFLAGS) $(ALL_LIBS) -L/usr/local/Cellar/octave/3.6.4/lib/octave/3.6.4 -loctave -loctinterp -lcruft echo "R_PACKAGE_DIR=$(R_PACKAGE_DIR)" : $${INSTALL_NAME_TOOL=/usr/bin/install_name_tool}; if test -e "$$INSTALL_NAME_TOOL"; then "$$INSTALL_NAME_TOOL" -id '$(R_PACKAGE_DIR)/lib$(R_ARCH)/$(USERLIB)' '$(USERLIB)'; fi $(USERLIBST): $(OBJECTS) $(AR) qc $(USERLIBST) $(OBJECTS) @if test -n "$(RANLIB)"; then $(RANLIB) $(USERLIBST); fi .PHONY: all clean userLibrary clean: rm -f $(OBJECTS) $(SHLIB) $(USERLIB) $(USERLIBST)