diff --git a/libavcodec/libpostproc/Makefile b/libavcodec/libpostproc/Makefile
index e690122aa403a1d579ab9933a87af2082f398adf..87a118a8ea8a2463530a6e212b801588fbe76fbf 100644
--- a/libavcodec/libpostproc/Makefile
+++ b/libavcodec/libpostproc/Makefile
@@ -1,6 +1,8 @@
 
 include ../../config.mak
 
+VPATH=$(SRC_PATH)/libavcodec/libpostproc
+
 ifeq ($(SHARED_PP),yes)
 SPPLIB = $(SLIBPREF)postproc$(SLIBSUF)
 SPPVERSION = 0.0.1
@@ -18,7 +20,7 @@ CFLAGS  = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
 # .PHONY: all clean
 
 .c.o:
-	$(CC) -c $(CFLAGS) -I.. -I../.. -o $@ $<
+	$(CC) -c $(CFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
 
 all:    $(SWSLIB) $(PPLIB) $(SPPLIB)