We should use $BUILD_DIR instead of $target.