diff --git a/Makefile b/Makefile
index d49bb1c76b5e8c444410604757755e005613b497..dc45497d92ef8b281bdd8c4a7a6699395735fcb2 100644
--- a/Makefile
+++ b/Makefile
@@ -103,8 +103,18 @@ ffmpeg.o ffplay.o ffserver.o: version.h
 videohook: .libs
 	$(MAKE) -C vhook all
 
-documentation:
-	$(MAKE) -C doc all
+documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
+                                 ffplay-doc.html hooks.html $(ALLMANPAGES))
+
+doc/%.html: doc/%.texi
+	texi2html -monolithic -number $<
+	mv $(@F) $@
+
+doc/%.pod: doc/%-doc.texi
+	doc/texi2pod.pl $< $@
+
+doc/%.1: doc/%.pod
+	pod2man --section=1 --center=" " --release=" " $< > $@
 
 install: install-progs install-libs install-headers
 
@@ -206,9 +216,9 @@ clean:
 	$(MAKE) -C libswscale  clean
 	$(MAKE) -C tests       clean
 	$(MAKE) -C vhook       clean
-	$(MAKE) -C doc         clean
 	rm -f *.o *.d *~ .libs gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
 	   output_example$(EXESUF) qt-faststart$(EXESUF) cws2fws$(EXESUF)
+	rm -f doc/*.html doc/*.pod doc/*.1
 
 distclean: clean
 	$(MAKE) -C libavutil   distclean
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index 4fc9dfb8f96d8e87418a696d181952376ee6b6f5..0000000000000000000000000000000000000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
--include ../config.mak
-
-VPATH=$(SRC_PATH_BARE)/doc
-
-all: ffmpeg-doc.html faq.html ffserver-doc.html ffplay-doc.html hooks.html \
-     ffmpeg.1 ffserver.1 ffplay.1
-
-%.html: %.texi Makefile
-	texi2html -monolithic -number $<
-
-%.pod: %-doc.texi
-	./texi2pod.pl $< $@
-
-%.1: %.pod
-	pod2man --section=1 --center=" " --release=" " $< > $@
-
-clean:
-	rm -f *.html *.pod *.1
-
-.PHONY: all clean