remove duplicate -I
use --no-as-needed as needed
rewrite test build in terms of makefiles