A nonlinear macroelement model for the seismic analysis of masonry buildings