add debugging.
be more informative on open failure.
remove redundant src dir
Remove autotools and switch to build.mk