function out = getCustomToolchainOptionMacros(h,bcOptionKeys)

%   Copyright 2014 The MathWorks, Inc.

bcKeys = h.ToolchainInfo.BuildConfigurations.keys();
aBuildConfigObj = h.ToolchainInfo.BuildConfigurations.getValue( bcKeys{ 1 } );
if nargin==1
    bcOptionKeys = h.CustomToolchainOptions( 1:2:end );
end
if iscell( bcOptionKeys )
    out = cell( 1, numel( bcOptionKeys ) );
    for i = 1:numel( out )
        out{ i } = aBuildConfigObj.getOption( bcOptionKeys{ i } ).getMacro();
    end
elseif ischar( bcOptionKeys )
    out = aBuildConfigObj.getOption( bcOptionKeys ).getMacro();
end
end
