Production of building materials