Electromagnetic resonances in conducting structures give rise to the enhancement of local fields and extinction efficiencies. Conducting structures are conventionally fabricated with a fixed geometry that determines their resonant response. Here, we challenge this conventional approach by demonstrating the photo-generation of THz linear antennas on a flat semiconductor layer by the structured optical illumination through a spatial light modulator. Free charge carriers are photo-excited only on selected areas, which enables the realization of different conducting antennas on the same sample by simply changing the illumination pattern, thus without the need of physically structuring the sample. These results open a wide range of possibilities for the all-optical spatial control of resonances on surfaces and the concomitant control of THz extinction and local fields.