Function to create the GMACS executable from the gmacsbase.tpl and personal.tpl files.

createGmacsExe(vv, Dir, verbose = FALSE, logFiles = FALSE, ADMBpaths = NULL)

Arguments

vv

(integer/character string)- index in Dir indicating folder to create executable in. If set equal to "all", the executable will be create in all the folders declared in Dir.

Dir

(character string)- vector of folder names.

verbose

(logical)- flag (TRUE/FALSE) to print processing information.

logFiles

(logical)- flag (TRUE/FALSE) to create log files during executable creation.

ADMBpaths

(character string)- (filepath): absolute or relative to current working directory path to file defining required ADMB paths. The default is `NULL`.

Value

Nothing.

Details

This function assumes that any additional cpp files are in a subfolder of Dir named "lib", with the associated header files in a subfolder named "include". It merges the two tpl files together, then uses [.buildGmacs()] to convert the gmacs.tpl code to a cpp files (gmacs.cpp and gmacs.htp), calls ADMB to compile all .cpp files required to build gmacs and creates the gmacs executable in the folder specified by Dir[vv]. The executable will be "gmacs.exe" on windows platforms and "gmacs" on linux-like (including MacOS) machines. Object files created during compilation from the additional cpp files will be in the Dir folder on Windows machines and in the Dir/lib folder on unix-like machines. These can be "cleaned" up using [clean_root()].