function [MakeStrs,Vars,Vals] = getMakeVars(h)
%GETMAKEVARS - returns strings formatted for use as makefile variables    
%[MakeStrs, Vars, Vals] = getMakeVars()

% Copyright 2012-2023 The MathWorks, Inc.

    rootFolders = h.Settings.getRootFolders();
    sDirVals = { rootFolders.Path };
    sDirVars = { rootFolders.Variable };    

    [toks, tokVals] = h.getKeyValuePair('type','Tokens','incGroups',{'makevar'});
    % strip off the '|>' and '<|' delimiters from the token vars
    tokVars = regexprep(toks,'\|>([^<]*)<\|','$1');    
    
    % get the buildArgs that are also makevars
    [bArgVars, bArgVals] = h.getKeyValuePair('type','BuildArgs','incGroups',{'makevar'});
        

    % get the additional makevars as well
    [mvKeys, mvVals] = h.getKeyValuePair('type','MakeVars');

    Vars = [sDirVars(:)' tokVars(:)' bArgVars(:)' mvKeys(:)'];
    Vals = [sDirVals(:)' tokVals(:)' bArgVals(:)' mvVals(:)'];
    
    MakeStrs = strcat(Vars, {' = '}, Vals);
