Generation of three-atom Greenberger-Horne-Zeilinger entangled states based on separate cavities