1. A method for determining a source shape, a mask shape and a target shape for a lithography process comprising: formulating an optimization problem by forming a constraint function; solving, by a hardware processor, the optimization problem by integrating over process condition variations to simultaneously determine the source shape, the mask shape and the target shape; and outputting the determined source shape and mask shape.