fix makefiles and cross-file references