diff --git a/examples.mk b/examples.mk
index 6befa506f82b02c283039d487f8ee7a76a8d9002..b29ab9c349df8b14520a76dd995ab0b036869dd3 100644
--- a/examples.mk
+++ b/examples.mk
@@ -110,11 +110,13 @@ GEN_EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8cx_set_ref.c
 vp8cx_set_ref.GUID                  = C5E31F7F-96F6-48BD-BD3E-10EBF6E8057A
 vp8cx_set_ref.DESCRIPTION           = VP8 set encoder reference frame
 
-# C file is provided, not generated automatically.
-UTILS-$(CONFIG_MULTI_RES_ENCODING) += vp8_multi_resolution_encoder.c
-vp8_multi_resolution_encoder.SRCS         += $(LIBYUV_SRCS)
-vp8_multi_resolution_encoder.GUID         = 04f8738e-63c8-423b-90fa-7c2703a374de
-vp8_multi_resolution_encoder.DESCRIPTION  = VP8 Multiple-resolution Encoding
+
+ifeq ($(CONFIG_MULTI_RES_ENCODING),yes)
+GEN_EXAMPLES-$(CONFIG_VP8_DECODER) += vp8_multi_resolution_encoder.c
+vp8_multi_resolution_encoder.SRCS       += $(LIBYUV_SRCS)
+vp8_multi_resolution_encoder.GUID        = 04f8738e-63c8-423b-90fa-7c2703a374de
+vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
+endif
 
 # Handle extra library flags depending on codec configuration
 
diff --git a/vp8_multi_resolution_encoder.c b/examples/vp8_multi_resolution_encoder.c
similarity index 100%
rename from vp8_multi_resolution_encoder.c
rename to examples/vp8_multi_resolution_encoder.c