function out = getOptionMacros(h,preference)

%   Copyright 2014 The MathWorks, Inc.

narginchk( 1, 2 );
cfg = h.getBuildConfiguration();
options = [  ];
if nargin==1
    options = cfg.Options.values();
elseif nargin==2 && strcmpi( preference, 'ordered' )
    optionKeys = h.getBuildConfigOrderedOptions();
    options = h.getBuildConfiguration().getOption( optionKeys );
end
numOpts = numel( options );
out = cell( 1, numOpts );
for i = 1:numOpts
    out{ i } = options{ i }.getMacro();
end
end
