re-order CFLAGS
fix build dependencies