Kapax or equivalent miter saw with depth stops. Start with a square piece and set the compound miter to the right angles and cut the vertical slots. Rotate to the side and cut the horizontal. Rotate again to cut all the way through to get the angles.
You will need to clamp it to a waste board for some if not all of your cuts.