a tall building near the coast or shore with a flashing light at the top to warn ships of rocks and other dangers

the beacon is in the lighthouse.