You quote what we wrote. There is nothing specific here: you just want to learn about the basic Makefile syntax and parameters.
Using src/Makevars , if you do not understand what you are doing, is not recommended. You are likely to break something, in particular, relying on a different architecture. Simon Urbanek is very categorical regarding this advice.
Brian Ripley, of course, is semi-correct: if debugging is enabled, there are more libraries. But CXXFLAGS never installed, especially the -g flag is set to enable debugging. So this is not us: if debugging is enabled by default, something else turned it on. By default, R can be R. See .R/Makevars .
Another driver for size is C ++ templates. Compare with other packages using (Rcpp) Eigen, they are also great. This is “just the cost of doing business”: templates give you the (coding) power that you enjoy.
Edited for typos
source share