C or C++ code inside subfolders in the src/
for example src/libfoo
don't get compiled when I install a package.
When I searched on other questions I found this that mentions Makevars. I searched the Matrix package Makevars. I I thought that I should add:
PKG_LIBS: -Llibfoo
But that didn't work.
I also found that on Writing R Extensions. I added the following to my Makevars and It didn't work either.
SOURCES = $(libfoo/*.c)
OBJECTS = $(SOURCES:.c=.o)
How should I tweak the Makevars file?