Glyph of Warding clearly states that glyph and the embedded spell are cast at same time: "casting it as part of creating the glyph". Note that glyph must be cast from a sufficiently high level slot to contain teleportation circle.
Teleportation Circle clearly states drawing the circle and the sigils is part of the casting. Note that glyphBecause it must be cast from a sufficiently high level slot to contain teleportation circleat the same time as the glyph, that means all the decisions must be made ahead of time.
Your second interpretation is correct.