From RedCafe:
Ok let's do a detailed exercise with who they scored against.
These tiers are my own view so feel free to comment on them.
Historical Giants
Brazil
Uruguay
Spain
France
Germany
Portugal (let's pretend plz)
Netherlands
Argentina
In this tier, Messi scored 14 goals in 32 games while Ronaldo scored 8 goals in 25 games.
In friendlies Messi scored 10 goals in 14 games while Ronaldo scored 1 goal in 10 games.
In competitive games Messi scored 4 goals in 18 games while Ronaldo scored 7 goals in 15 games.
All the competitive goals Messi scored were against Uruguay in WC qualifiers. No goals in final stages of the tournaments.
Strong teams
Paraguay
Colombia
Chile
Switzerland
Mexico
Croatia
Serbia-Montenegro / Serbia
Sweden
Belgium
Denmark
Russia
Greece
Poland
Czech Republic
In this tier Messi scored 20 goals, 13 in competitive and 7 in friendlies.
Ronaldo scored 23 goals, 20 in competitive and 3 in friendlies.
Medium teams
Venezuela
Ecuador
Bolivia
Nigeria
Algeria
Peru
Iran
United States
Slovenia
Bosnia-Herzegovina
Hungary
Northern Ireland
Cameroon
Egypt
Finland
Ghana
Iceland
Morocco
Slovakia
Ukraine
Wales
In this tier Messi scored 21 goals, 16 in competitive and 5 in friendlies
Ronaldo scored 22 goals, 16 in competitive and 6 in friendlies.
Weak teams
Panama
Haiti
Guatemala
Hong Kong
Nicaragua
Albania
Lithuania
Andorra
Armenia
Latvia
Luxembourg
Estonia
Faroe Islands
Azerbaijan
Cyprus
Kazakhstan
Saudi Arabia
New Zealand
North Korea
In this tier Messi scored 14 goals, 3 in competitive and 11 in friendlies.
Ronaldo scored 46 goals, 40 in competitive and 6 in friendlies.
So, if you ignore the badmouthed weak team tiers this is their numbers:
Messi: 55 goals, 33 in competitive and 22 in friendlies
Ronaldo: 53 goals, 43 in competitive and 10 in friendlies
Now let's also remove the medium tier to have only giants and strong teams
Messi: 34 goals, 17 in competitive and 17 in friendlies
Ronaldo: 31 goals, 27 in competitive and 4 in friendlies
What, shocking! Ronaldo scores basically the same as Messi vs strong teams, but he actually does it in competitive games!
But Messi has 14 goals against the giant tier while Ronaldo has only 8 goals. Messi needed 32 games for that (0.4375 goals per game) while Ronaldo needed 25 (0.32 gpg).
But if we go competitive the tables turn dramatically! Messi has 4 goals in 18 games (0.22 gpg, and no goal in final stages of competitions) while Ronaldo has 7 goals in 15 games (0.466 gpg, all in final stages).
So another shocking horror: in competitive games vs the giants Ronaldo has more than twice the goal ratio of Messi!
Those friendlies, gotta catch 'em all!