Wars have generally been waged by countries against countries, or levied against a country’s leader, but much like Huntington’s thesis in his book, Clash of Civilisations, the current wars in the Middle East are a clash of ideologies not countries. The wars in the Middle East are not about Syria against Iraq, or Saudi Arabia and Turkey against Assad’s regime, they are Sunni against Shia. The line up of opposing forces makes this all too clear.
Turkey, Saudi Arabia, Egypt, and the Gulf States (with internal Sunni Shia strife in Bahrain, Yemen) all Sunni dominated countries and all oppose Assad and his Alawite (offshoot of the Shia) government.
Iran and Iraq, both Shia governments, are pro-Assad and his Shia Alawite government, with Shia Iran assuming an active role in support of Alawite Assad with arms and personnel.
This is where it becomes complicated.
The Sunni contingent is supporting the US led attack on ISIL in Syria and the primary reason for cooperating is to bring down the Alawites in Syria. The Sunni nations see the ISIL extremists as a potential threat to their countries but, by bombing ISIL, they are aiding and abetting their Alawaite nemesis, Assad. And that is precisely why Turkey does not cooperate with the US attacks on ISIL. The Sunni Turks see Assad as the greater of the threats on their southern border because Assad and his Alawaites are related ideologically with the Shia.
For the US, this presents a similar problem. By bombing ISIL, the US aids and strengthens Assad, the government they would like to overthrow. The Americans abhor Iran but they are forced to work with Iran, which is fighting a common enemy, ISIL, in Iraq and Syria.
The US does not want to be aligned ideologically with Sunni or Shia but, of necessity, they must support Shia Iraq (politics and oil) and Sunni Saudi Arabia (for oil) and Sunni Turkey (a member of NATO) and talk with Shia Iran (for Shia Iraq and ISIL). This is creating tensions and serious disagreements between the US and its partners, including Israel. The US is at odds with Turkey, Saudi Arabia, Iraq and even Israel because Israel sees Iran as the greatest threat whereas, at least for now, the US considers ISIL the major problem. The US, by its diplomatic and military involvement in the region, seems to have alienated all parties concerned, Sunni, Shia and Israeli. Another in a long series of US foreign policy failures.