## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.
#PKG_LIBS = 
PKG_LIBS = -L./ARPACK -larpack $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

.PHONY: all clean

all: $(SHLIB)

$(SHLIB): ARPACK/libarpack.a

ARPACK/libarpack.a:
	cd ARPACK && $(MAKE) all F77="$(F77)" FFLAGS="$(ALL_FFLAGS)" AR="$(AR)" RM="$(RM)"

clean:
	$(RM) *.o
	$(RM) *.dll
	$(RM) *.so
	cd ARPACK && $(MAKE) clean
