You do know that millions of leaflets were dropped all over Japan urging the civilian population to evacuate the cities as they were to be targeted for destruction. You also know that the Japanese government had reclassified nearly all civilians as combatants when the defensive plan Ketsu-go was adopted in April of 1945. You know that, right?
Secondly, even an advance warning to citizens in those cities wouldn't make an indiscriminate bombing campaign acceptable by any objective moral measure. If that were the case, then an al-Qaeda attack on the U.S. like the 9/11 terrorist attacks would somehow be "acceptable" because Osama bin Laden had already warned America that he intended to have his minions carry our these attacks on the U.S. because of our military presence in the Arabian Peninsula.
Thirdly, any "leaflets dropped all over Japan" would be completely out of character for the U.S. at the time. I recall no such stories about this measure being taken in advance of other bombing campaigns in Germany (Dresden) or Japan (Tokyo) that were aimed specifically at civilian populations.
And lastly, the classification of civilians as combatants by a government in a case of defending a nation hardly renders those civilians a legitimate military target. The U.S. has more guns than people these days, and we have a Bill of Rights written into our constitution that is aimed at protecting our right to keep and bear arms. Does that make every American a legitimate military target for a foreign adversary?