R&D cost - US GAAP

Might be a silly question but for software development - Schweser states that once technological feasibility has been established, US GAAP requires subsequent costs to be capitalized.

  • Does this include legal cost related to patent filing and approval?

  • Can a software/tech company not choose to expense it?