change compiling order

change order so that lib is made before GD