collect vhook-related makefile lines in one place
authorMåns Rullgård <mans@mansr.com>
Mon, 7 Apr 2008 22:17:42 +0000 (22:17 +0000)
committerMåns Rullgård <mans@mansr.com>
Mon, 7 Apr 2008 22:17:42 +0000 (22:17 +0000)
Originally committed as revision 12762 to svn://svn.ffmpeg.org/ffmpeg/trunk

Makefile

index b134746..8db91ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -69,28 +69,6 @@ endef
 
 $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
 
-VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
-
-BASEHOOKS = fish null watermark
-ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
-ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
-
-HOOKS-$(HAVE_FORK)      += ppm
-HOOKS-$(HAVE_IMLIB2)    += imlib2
-HOOKS-$(HAVE_FREETYPE2) += drawtext
-
-HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
-
-VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
-LIBS_imlib2$(SLIBSUF)       = `imlib2-config --libs`
-
-VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
-LIBS_drawtext$(SLIBSUF)        = `freetype-config --libs`
-
-VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
-
-vhook/%.o: CFLAGS:=$(VHOOKCFLAGS)
-
 ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
 ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
 
@@ -115,12 +93,39 @@ ffplay.o .depend: CFLAGS += $(SDL_CFLAGS)
 
 ffmpeg.o ffplay.o ffserver.o: version.h
 
+VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
+
+BASEHOOKS = fish null watermark
+ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
+ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
+
+HOOKS-$(HAVE_FORK)      += ppm
+HOOKS-$(HAVE_IMLIB2)    += imlib2
+HOOKS-$(HAVE_FREETYPE2) += drawtext
+
+HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
+
+VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
+LIBS_imlib2$(SLIBSUF)       = `imlib2-config --libs`
+
+VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
+LIBS_drawtext$(SLIBSUF)        = `freetype-config --libs`
+
+VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
+
+vhook/%.o: CFLAGS:=$(VHOOKCFLAGS)
+
 # vhooks compile fine without libav*, but need them nonetheless.
 videohook: $(DEP_LIBS) $(HOOKS)
 
 vhook/%$(SLIBSUF): vhook/%.o
        $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
 
+.vhookdep: $(ALLHOOKS_SRCS) version.h
+       $(VHOOK_DEPEND_CMD) > $@
+
+depend dep: .vhookdep
+
 documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
                                  ffplay-doc.html general.html hooks.html \
                                  $(ALLMANPAGES))
@@ -161,11 +166,6 @@ uninstall-vhook:
        rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
        -rmdir "$(SHLIBDIR)/vhook/"
 
-depend dep: .vhookdep
-
-.vhookdep: $(ALLHOOKS_SRCS) version.h
-       $(VHOOK_DEPEND_CMD) > $@
-
 clean::
        rm -f gmon.out TAGS $(ALLPROGS) $(ALLPROGS_G) \
           output_example$(EXESUF)