The hungry baby did nothing but cry.

Literal

Belly [object-を] emptied baby [topic-は] just cry only was.

腹を空かした is a relative clause: 'a baby whose belly was emptied' (i.e., hungry). ただ泣くばかり means 'did nothing but cry' — ただ (just) + ばかり (nothing but) reinforces the exclusivity.