Build feature of RStudio is just using make as build tool to use project with Makefile.
You can configure with what argument the command make is run when you click on Build (and which is the root directory)
You are able to specify here all the targets you want and any argument the same way you would do it on command line
make mytarget
By default, it is empty and you get the default make behaviour. (nothing specific to RStudio). See the documentation for a way to change the default behavior of make
https://www.gnu.org/software/make/manual/html_node/How-Make-Works.html
By default, make starts with the first target (not targets whose names start with ‘.’). This is called the default goal . ( Goals are the targets that make strives ultimately to update. You can override this behavior using the command line (see Arguments to Specify the Goals) or with the .DEFAULT_GOAL special variable (see Other Special Variables).
Hope it helps