* Wal-Mart, Target, Walgreen, Costco, Kroger hit hard
* Amazon gives biggest lift to S&P
* S&P tech sector drops for second week
* Dow up 0.11 pct, S&P up 0.03 pct, Nasdaq down 0.22 pct (Updates to close of U.S. markets)
By Lewis Krauskopf
NEW YORK, June 16 (Reuters) - Major U.S. stock indexes ended little changed on Friday even as Amazon.com's $13.7 billion deal to buy upscale grocer Whole Foods roiled the retail sector and rocked shares of an array of companies including Wal-Mart and Target.
Energy sector shares helped buoy the S&P 500 and the Dow industrials, while Apple dragged on the Nasdaq.
The deal by Amazon, a proven retail disruptor, marked a major step by the internet retailer into the brick-and-mortar retail sector.
Wal-Mart shares sank 4.7 percent, weighing the most on the Dow. Shares of Target, Walgreen Boots and Costco fell between 5 percent and 7 percent.
"It’s going to send a shock wave across the board, and this represents the true utmost in market disruption," said Burns McKinney, chief investment officer with the Dallas investment team for Allianz Global Investors. "There’s big winners and big losers."
Amazon shares gained 2.4 percent, making the stock the biggest boost to the S&P 500. Whole Foods shares surged 29.1 percent.
The S&P consumer staples sector fell 1 percent, by far the worst performing major sector. The S&P 500 food and staples retailing index dropped 4.2 percent.
Grocery chain Kroger was the biggest loser on the S&P 500, falling 9.2 percent, while Supervalu dropped 14.4 percent.
"I would not like to be somebody playing in the grocery space right now," said Jan Rogers Kniffen, chief executive of retail consultancy firm J. Rogers Kniffen WWE in New York.
The Dow Jones Industrial Average rose 24.38 points, or 0.11 percent, to end at 21,384.28, the S&P 500 gained 0.69 point, or 0.03 percent, to 2,433.15 and the Nasdaq Composite dropped 13.74 points, or 0.22 percent, to 6,151.76.
The technology sector fell 0.2 percent, continuing its recent slump. Apple shares closed down 1.4 percent.
Tech has led the S&P 500's 8.7 percent rally this year, but posted its second week of declines, prompting questions over whether investors are moving money into other sectors.
"I think we need to see more of a pullback to say there is a serious rotation going on as opposed to just some profits coming off the top," said Chuck Carlson, chief executive officer at Horizon Investment Services in Hammond, Indiana.
Energy shares rose 1.7 percent, propping up the S&P 500. Oil prices bounced off the year's lows as some producers reduced exports and U.S. rig additions slowed.
U.S. homebuilding fell for a third straight month in May to the lowest in eight months as construction activity declined broadly. Investors were continuing to digest the Federal Reserve's interest rate hike on Wednesday, with some concerned about the economy's ability to absorb higher rates.
In other corporate news, Booz Allen Hamilton shares dropped 19 percent after news of a U.S. Department of Justice investigation.
Advancing issues outnumbered declining ones on the NYSE by a 1.36-to-1 ratio; on Nasdaq, a 1.22-to-1 ratio favored decliners.
About 9.7 billion shares changed hands in U.S. exchanges, well above the 6.8 billion daily average over the last 20 sessions. (Additional reporting by Caroline Valetkevitch in New York, and Yashaswini Swamynathan, Natalie Grover and Sruthi Shankar in Bengaluru; Editing by Anil D'Silva and James Dalgleish)