If this is a Personal Residence the closing costs, fees, survey expense, is all part of the cost of the home (regardless in paid within or outside the actual closing).
Closing costs are not deductible for a Personal Residence, unless they are Points on a Loan (which is considered interest), interest paid, Mortgage Insurance Premium or Property Taxes.
If this is a Rental then those costs are used to compute the basis (cost) of the house for deprecation.