Generally speaking, this only applies to business property.
expenses related to acquisition of the property are added to the cost basis of the property.
Expenses related to the acquisition of the loan are amortized (not capitalized) and deducted (not depreciated) over the life of the loan.