Roast all ingredients, one at a time, on the skillet. You want them to be aromatic and two or three shades darker than they were, but don't let them burn or darken too much. Since the turmeric is already powdered, toast it very lightly, for only about a minute-- if you toast it last, you can even do this in the already-hot skillet with the heat turned off.
Put all the toasted spices including turmeric into a spice grinder or blender and process to a very fine powder.
Spices for the sambar and rasam powders are typically sun-dried for a couple of days, then ground into a fine powder. I skillet-roast the spices for expediency and it works fine.