In the quest to make the perfect film for the age of Trump, some strive for success and others stumble upon it. In the former camp, there’s Steven Spielberg’s Pentagon Papers drama The Post, a tale of journalists battling government corruption, hurried through production so that it could be in multiplexes before Trump’s first year was over.

And then there’s Richard Linklater’s Last Flag Flying, a film about three retired soldiers on a quest to give one man’s son a full military burial. Set at the time of the second Iraq war, Linklater’s film is poignant and blackly funny, but not something that felt particularly specific to today. Or at least it didn’t – until Trump began his tirade against NFL players kneeling during the national anthem. He claimed they were disrespecting the flag and those tasked with defending it. Suddenly the themes of the film – patriotism, the military, respecting the star-spangled banner – were being hotly debated on cable news and social media. Linklater had made a Trump movie … by accident.

“Isn’t it funny?” says the director, seated in a Soho hotel room, as the film arrives in Britain. “A year ago, when we were filming, it couldn’t have been further from our minds. I guess it just shows there are perpetual questions: what is patriotism, what does the flag mean, whose flag is it, and are you disrespecting it?”

Shooting the breeze … Laurence Fishburne, Steve Carell and Bryan Cranston in Last Flag Flying Photograph: Allstar/Amazon Studios

This is Linklater’s 21st film in a career that has seen him bounce between genre, studio and tone. There are his most celebrated works – Boyhood, Before Sunrise and its two sequels, Dazed and Confused – but that barely scratches the surface. In his three decades of directing, he’s dabbled in musicals (School of Rock), sci-fi (his animated adaptation of Philip K Dick’s A Scanner Darkly), sport (The Bad News Bears), historical drama (Me and Orson Welles) and pitch-black comedy (Bernie). Running through all those are his familiar preoccupations: a fascination with those snatches of downtime in the midst of life’s big moments, and loose, ideas-heavy conversations that tell us far more than any carefully sculpted dialogue.

These continue into Last Flag Flying, which Linklater describes as “my kind of war movie” – namely, a war movie without the war. A sequel of sorts to Hal Ashby’s raucous 1973 military comedy The Last Detail, the film stars Steve Carell as Doc, a taciturn ex-marine who has asked two of his old Vietnam war buddies to help him transport his son’s coffin back home from Arlington National Cemetery for a proper send-off. Bryan Cranston plays self-destructive barkeeper Sal, while Laurence Fishburne is reformed hellraiser Mueller.

En route, the trio reconnect and, in the manner of all Linklater films, shoot the breeze – arguing, reminiscing and lamenting the two wars that bookended their adult years, the first taking their innocence, the second one of their children. Their boozy, bawdy adventures unfold in the course of a rambunctious road trip through New York and Boston. Led by trouble-magnet Cranston, the three veterans bar hop, banter and get into a surprising scrape with Homeland Security who flag Fishburne, now a man of the cloth, as a terrorist.

Richard Linklater and Bryan Cranston during shooting. Photograph: Wilson Webb

Linklater first encountered Darryl Ponicsán’s source novel in 2005 and immediately saw its potential. But he also thought the chances of a studio giving it a green light were slim. “The Iraq war was an open wound,” he says. “It was just too ugly a subject. People are always gung-ho running into a war, and then when it’s finally done with, they don’t want to deal with it. I think the timing is much better now. People can sit down and go, ‘OK, what the hell was that?’”

From the footage of Saddam’s statue being toppled to the ban on photos of soldiers’ coffins, Iraq was as carefully stage managed as a war can be, with all criticism decried as unpatriotic. Now, with the benefit of more than a decade’s hindsight, the conflict is so unpopular that even Trump could make hay in the Republican primaries by denouncing it. But at the time, there was a cost to speaking out as, to give just one example, the Dixie Chicks discovered when they voiced their shame to a British audience – and flew home to record boycotts.

“They were really a step ahead,” Linklater says of the US’s hawkish leaders. “I mean, they’re pretty smart people. They’d seen other wars – it’s textbook how [the government] slowly lost the American population’s support for Vietnam. They wanted to avoid that. And they did a pretty good job. George W Bush was re-elected, shamefully. A guy who had made such a blunder still got re-elected, which is mind-boggling and probably due to their stagecraft.”

Vietnam was, he says, more reported. “The My Lai massacre, the killing of women and children. I think a lot of that did fall on soldiers. They didn’t get the hero’s welcome American troops had gotten in the past.” What we now have, he says, is a notion that the military itself is beyond reproach, with criticism of a war equating to criticism of those fighting it. “What does ‘I support the troops’ mean? It’s a shallow slogan. I support the troops so much that I don’t want them killed for no reason.”

Coming of age … Ellar Coltrane in 2014’s Boyhood. Photograph: Allstar/Universal Pictures

Indeed, Last Flag Flying makes the point that the people fighting the wars are often the ones most critical of them. Doc, Mueller and Sal might reminisce about the wilder moments of their time in Vietnam, but they also carry the wounds – physical and psychological – and are angry to see the same fate befall the next generation. Soldiers have the right to be critical, says Linklater. “Anyone caught up in a bureaucracy will look up and go, ‘They’re a bunch of incompetents.’ And nothing’s more bureaucratic than the military. You can’t really go through that system and not feel a little screwed over.

“I’m haunted by the way it affects them afterwards, the suicide rate. These guys come back from war and are like, ‘No one in my group died, but within two years the guys are killing themselves. What the fuck?’ That’s horrible. We’re not meant to kill people. It’s not natural – 99% of us aren’t cut out for that. You’ve got to be a good psychopath to want to kill and like it.”

If there’s a common thread in Linklater’s work, it’s how major events stay with us and change us as time passes: from Boyhood’s epic coming-of-age story, filmed in real time as its lead grew from child to man; to the multi-decade love story brought to life by Ethan Hawke and Julie Delpy in the Before trilogy, as the pair journey from first flutterings to lasting romance to the more complex and fraught relationship that comes with marriage and kids.

Time passes … Ethan Hawke and Julie Delpy in Before Sunset, 2004, second in their characters’ romantic trilogy. Photograph: Allstar/Castle Rock

Will there be a fourth Before film? Hawke hinted last year that one might be in the offing. Certainly, Linklater is keen to get the gang back together but aware of the pitfalls of rushing into anything. “I just saw Ethan in New York,” he says. “Usually, at the five-year period, we go, ‘You know, what if Jesse and Celine… ’ We did look at each other – but until we have that great idea, we’re not gonna do it just to do it. That’s how bad movies get made. Let’s see if Jesse and Celine have anything to say about being 50. We’re just following our instincts. I kind of like the not knowing. You just feel your way through this shit.”

Last Flag Flying is also about time passing but, unusually for Linklater, it doesn’t feature young adults looking ahead but rather older individuals looking back. Perhaps this is because he is now decidedly into his 50s himself, with three daughters. “As a middle-aged person,” he says, “it’s an interesting moment. Who are you? Are you the same person you were then? Can you be pulled back to who you were? The film is really about finding a common ground in their old friendship.”

Ultimately, he says, we all have more in common than is generally realised. “It’s really just a few issues that separate people,” he says. “If you’re pro-gun, pro-abortion, whatever, you can have an opinion, but why hate? It’s painful to see the divides, but that’s what happens in this world, between and within countries.

“In North America, we’ve got the best neighbours imaginable – Canada and Mexico. We all kind of believe the same things, there’s plurality, religion, a work ethic, everything! And then you have Trump who’s like, ‘The people who live just across that border are horrible.’ And people give in to it, think the hordes are charging the gates. It’s unbelievable.”

And so, inevitably, things return to Trump and his one-man war against everyone from minorities to Mexico to the NFL. Yet Linklater is confident that, for his every action, there is an equal and opposite reaction. “When Trump hurled insults at those NFL players,” he says, “I did see some deeper analysis of what it means to protest. So I’m glad to see those athletes using their position. The times demand it.”