IRVING, Texas -- The Dallas Cowboys are under the salary cap.

The Cowboys released center Phil Costa and reworked the contract of right guard Mackenzy Bernadeau on Friday to get under the $134.55 million salary cap, according to sources. The Cowboys trimmed roughly $20 million in cap room during the week by cutting Costa, reworking Bernadeau's deal and restructuring the contracts of Tony Romo, Sean Lee and Orlando Scandrick.

With free agency set to open next week, the Cowboys now have roughly $2 million in cap room.

There is a chance they could gain more space if they reach a new deal with DeMarcus Ware or release the franchise's all-time leader in sacks.

According to a source, the Cowboys approached Ware this week about taking less money to remain with the club. Ware is set to make $12.75 million this year in salary and workout bonus, and will count a little more than $16 million against the cap.

The Cowboys would like to keep Ware at a lower price, which could give them a chance to add pieces in free agency or keep their own free agents, such as Jason Hatcher and/or Anthony Spencer. If the Cowboys cut Ware, they would save $7.4 million against the cap.

Ware is coming off a six-sack season in 2013 and turns 32 in July, but after undergoing right elbow surgery, he told ESPN.com he expects to return to Pro Bowl form.

"I'm going to shut my mouth and be quiet and let my work on the field characterize who I am," Ware said last month. "I'm not going to sit here and talk about what I'm going to do. I'm going behind the scenes and do what I need to do and get the job done, and at the end of the day there's going to be a bandwagon everybody needs to jump back on."

The Cowboys could create $5.5 million in salary cap room by releasing wide receiver Miles Austin after next Wednesday with a post-June 1 designation. The team would not get the credit until June, but they would be able to use that money to sign their rookie draft picks.

As part of the reworked deal with Bernadeau, he is guaranteed $2 million over the next two years, according to a source.

Bernadeau started 11 games in 2013 and played well when he returned to the starting lineup after Brian Waters suffered a season-ending triceps injury. Bernadeau joined the Cowboys as a free agent in 2012 with a four-year deal worth $11 million, including a $3.25 million signing bonus, after spending his first four years with the Carolina Panthers. He was going to make $2.75 million this year and count a little more than $4 million against the cap.

He missed his first offseason with the Cowboys because of hip and knee surgeries that kept him off the field until training camp, and he did not take part in last year's offseason program because of shoulder surgery.

Bernadeau had no surgeries this offseason and will be able to take part in the organized team activities and minicamp.

Costa dressed for 12 games in 2013, playing in three. He became an afterthought when Travis Frederick was selected in the first round of the 2013 draft. The move saves the Cowboys $1.5 million in salary-cap space.

Costa, who made the roster as an undrafted free agent in 2010, started every game in 2011 but had his 2012 season cut short by back and ankle injuries. He had season-ending ankle surgery late in the season and played in only three games.