Knicks team president Phil Jackson will have $27 million in cap space on July 1 and may be willing to save a trifle of it for 7-foot free-agent center Jason Smith.

According to a source, Jackson would love to have Smith back as the backup center — a sweet-shooting big man for the triangle. Jackson realizes it may not be possible if Smith gets offered significantly more than the $1.4 million veteran’s minimum.

Jackson may be willing to go higher than the minimum to retain Smith, depending on how his other free-agent forays unfold. Jackson has said he may not get a big man he covets in the draft and the Knicks don’t have a traditional big man under contract, and Smith has said he would like to return.

Smith, who averaged 8.0 points on 43.4 percent shooting, had signed a one-year deal with the Knicks for the mini-midlevel exception of $3.2 million. Jackson only wanted to commit short-term to a player coming off multiple knee surgeries.

Nevertheless, Smith played in all 82 games.

After a poor start, Smith played better from mid-January on, figuring out the triangle and becoming a lot more aggressive on the defensive end.

As an under-the-cap team, the Knicks don’t have a midlevel exception but can offer more than the minimum in what’s called the room exception if they get within $1 million of the cap.

Carmelo Anthony has started to shoot as he rehabs from knee surgery to fix a partially torn patellar tendon.

“He was on the court yesterday shooting,’’ Jackson said. “Looked great. Made a lot of shots. He’s happy where he’s at.’’

Jackson noted Anthony stayed to watch prospect Kristaps Porzingis’ workout that was cut short by cramps.

Because the Knicks have so many holes to fill, Jackson said he wishes the NBA would adopt a change and have free agency come before the draft. “We’ve got these things backward right now,’’ Jackson said.

The Kings, a franchise Jackson would have taken over had it moved from Sacramento to Seattle, reportedly is in trade talks with the Lakers for star center DeMarcus Cousins. Jackson said he doubts the Knicks will be involved.

“We’re aware of the situation. We’re just going to see what falls out,” Jackson said. “We don’t know if we have enough stuff to even be in the talk, but we’re aware of what’s going on.”