The federal rule is, in general terms, you cannot make a firearm with the intention of selling it, state laws may vary from this of course. However, you can sell firearms that you have made, or give them away, or pass the to your heirs, legally, as long as the recipient is legal to receive them...