Make STATIC_LIB, SHARED_LIB, and PROFIL_LIB depend on the output directory directly.