fix Mac OS X build and remove unused makefiles