If you're making one or two, straight sided splines can be made in a milling machine.
In production, involute splines are popular because they're stronger than a straight spline, and because the male spline is rolled, in a special machine, in a couple of seconds.
Spline roller: Imagine a rack and pinion assembly. Now imagine it with two racks, teeth facing each other, on opposite sides of the pinion. The racks start displaced, then approach each other as the pinon rotates between them. Now imagine the racks are powered externally, and the pinion starts out with no teeth. Just like rolling clay between your palms. The rack teeth are hard, and tapered in depth. The spline teeth are fully formed in one stroke of the racks.
Mike Halloran
Pembroke Pines, FL, USA