reorder the targets so that all the other defines happen first. this should fix the problem where some targets are not picked up