The invention belongs to the technical field of medicines, in particular to an aryl kinase inhibitor represented by the general formula (I), pharmaceutically acceptable salts or stereisomers thereof, wherein R1, R2, R3, m, n, R5, Y, W, M, L or Q are defined in the specification. The invention further relates to a preparation method of the compounds, pharmaceutical preparations or pharmaceutical compositions comprising the compounds, and an application of the compounds for preparing medicines for treating and/or preventing ALK or c-Met mediated cancer related diseases.