Origin of precursors of organic molecules during evaporation of meteorites and rocks