This is a great question. I do believe that there should be rules to international military engagement. There is such a thing. It is called the Geneva Conventions. There are four areas of coverage: the wounded, prisoners of war, civilians, and religious and medical persons. In short, it protects them to a certain extent.
In light of this, I believe that the Geneva Conventions are not followed, which means that they need to be enforced much better. Second, they are not enough in our modern age. With the proliferation of nuclear weapons, biological and chemical weapons and most of all nuclear missiles, we need to rethink everything. There is no way to differential civilians from military people with these weapons of mass destruction.
Finally, terrorism throws another complicated element. There must be a lot of thought put into all of this. More importantly, we need to figure out how we can enforce it.