Linear Codes with Constrained Generator Matrices