Actually its hard to say. Kind of like the chicken or the egg.

History does document the temples role but more to the point the skills that were passed on by its descendents to the mainstream.

Shaolin is not a style but an idea. More like the MMA of its day.