It is an abbreviation often found on the foundation stones of churches and other religious buildings, as well as religious art and stained glass. It is the motto of the Jesuits, a religious order of the Roman Catholic Church. The current Pope is a Jesuit.
You can see AMDG here, on the foundation stone of St Mary Magdalene's. The stone is inside the church building, at the front on the northern side.
- Ad majorem Dei glorium [Wikipedia]