How could I make homemade ankle splint?

Buy one. They care cheap enough, buy one.
Soften PVC pipes. You may want to try taking PVC pipes and cut them to the appropriate size and then heat them in hot water until soft. Bend them around the inside and outside of the ankle over a sock and let them cool. Then wrap with velcro to hold in place.