The "migrant" crisis forces us to relearn a lesson we already ought to have learned from Communism: that when people don't own something, they don't take care of it. From Greece to Croatia, country after country fails to put up any proper defence of its own borders because it knows the "migrants" do not intend to remain there. It'll be someone else problem, so just pass it on.
Turkey, for example, is racketeering big-time with illegal immigration. People smuggling is now an industry worth billions of euros. As the French consul who was selling boats to the invaders admitted (see here), almost everyone in the coastal region, from politicians to police, is involved in it. They're also raking in even more with "migrant assistance" from the European Union. In addition, they are deliberately using immigration as a blackmailing tool to extort concessions from the European Union, on everything from visa-free travel, permission to oppress the Kurds to membership of the EU itself (see here).
To restore order, we need to make facilitating of illegal immigration costly instead of profitable. A literal cost must be imposed on irresponsible behaviour. When an illegal immigrant arrives in a country, a determination should be made about which other country the invader arrived from. The government of that country should then be billed for all of the costs the presence of the illegal is likely to give rise to. These don't need to be precisely worked out in every individual case. A generic average could be calculated.
So, for example, the per-person average cost of providing invaders with accommodation, food, health care should be calculated; the costs of processing their asylum claims, including lawyers' and translators' fees etc.; ultimately, the costs of repatriating them if the need arises. Every expense incurred by the government in relation to an asylum seeker should be worked out, generalised to give a global average, and perhaps a "processing fee" added. The source country should then be invoiced for this amount.
To illustrate, let's say three invaders arrive on a lorry from Calais. The British government has calculated that, on average, an invader costs the British taxpayer £1 million. So it sends the French government an invoice for £3 million. Very likely, the French government will refuse to pay it. What happens then? The British government should impose a customs duty on French imports until the amount is recovered. French exporters will then pressure their government to take action. Faced with an actual cost to its irresponsibility, the French government might then be tempted to adopt a similar approach. So, for example, it could send a bill to the government of Italy for the invaders coming from there. And so on. If each government imposes a cost on the source country its invaders are coming from, all governments will end up having a strong incentive to act responsibly. And the problem will be solved.
Economic incentives are the drivers of the problem of illegal immigration. But they can also be its solution.