makefiles: some fixes for paths and linux