Get the CCL first. Will take ~60 days to come in. Save money during that time, and buy a gun so that you will have it once your CCL gets approved. Doing it the other way around, makes you wait longer:
Buy gun
Wait ~60 days to have the funds available for the CCW class.
Turn in paperwork to get CCL.
Wait ~60 days to get it approved.
Summary:
Buy CCL, and then gun: 2 months
Buy gun, then CCL: 4 months
It's a simple decision, if you look at it that way
This.