IDF forces attacked military targets directly connected to Hamas and other terrorist organizations' military activities against Israel.
These targets included: Hamas' bases, posts and headquarters, armament production and storage sites, rocket and mortar launch sites, smuggling tunnels and Mosques used by Hamas for military purposes.
All of these targets were targeted in accordance with the principle of distinction.
Extended Answer