Revision fdf11906 Makefile

View differences:

Makefile
32 32
FF_EXTRALIBS := $(FFEXTRALIBS)
33 33
FF_DEP_LIBS  := $(DEP_LIBS)
34 34

  
35
ALL_TARGETS-$(CONFIG_VHOOK) += videohook
36 35
ALL_TARGETS-$(BUILD_DOC)    += documentation
37 36

  
38
INSTALL_TARGETS-$(CONFIG_VHOOK) += install-vhook
39 37
ifneq ($(PROGS),)
40 38
INSTALL_TARGETS-yes             += install-progs install-data
41 39
INSTALL_TARGETS-$(BUILD_DOC)    += install-man
......
81 79

  
82 80
alltools: $(addsuffix $(EXESUF),$(addprefix tools/, cws2fws pktdumper qt-faststart trasher))
83 81

  
84
VHOOKCFLAGS += $(filter-out -mdynamic-no-pic,$(CFLAGS))
85

  
86
BASEHOOKS = fish null watermark
87
ALLHOOKS = $(BASEHOOKS) drawtext imlib2 ppm
88
ALLHOOKS_SRCS = $(addprefix vhook/, $(addsuffix .c, $(ALLHOOKS)))
89

  
90
HOOKS-$(HAVE_FORK)      += ppm
91
HOOKS-$(HAVE_IMLIB2)    += imlib2
92
HOOKS-$(HAVE_FREETYPE2) += drawtext
93

  
94
HOOKS = $(addprefix vhook/, $(addsuffix $(SLIBSUF), $(BASEHOOKS) $(HOOKS-yes)))
95

  
96
VHOOKCFLAGS-$(HAVE_IMLIB2) += `imlib2-config --cflags`
97
LIBS_imlib2$(SLIBSUF)       = `imlib2-config --libs`
98

  
99
VHOOKCFLAGS-$(HAVE_FREETYPE2) += `freetype-config --cflags`
100
LIBS_drawtext$(SLIBSUF)        = `freetype-config --libs`
101

  
102
VHOOKCFLAGS += $(VHOOKCFLAGS-yes)
103

  
104
vhook/%.o vhook/%.d: CFLAGS:=$(VHOOKCFLAGS)
105

  
106
# vhooks compile fine without libav*, but need them nonetheless.
107
videohook: $(FF_DEP_LIBS) $(HOOKS)
108

  
109
$(eval VHOOKSHFLAGS=$(VHOOKSHFLAGS))
110
vhook/%$(SLIBSUF): vhook/%.o
111
	$(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$(@F))
112

  
113
VHOOK_DEPS = $(HOOKS:$(SLIBSUF)=.d)
114
depend dep: $(VHOOK_DEPS)
115

  
116 82
documentation: $(addprefix doc/, ffmpeg-doc.html faq.html ffserver-doc.html \
117
                                 ffplay-doc.html general.html hooks.html \
118
                                 $(ALLMANPAGES))
83
                                 ffplay-doc.html general.html $(ALLMANPAGES))
119 84

  
120 85
doc/%.html: doc/%.texi
121 86
	texi2html -monolithic -number $<
......
141 106
	install -d "$(MANDIR)/man1"
142 107
	install -m 644 $(MANPAGES) "$(MANDIR)/man1"
143 108

  
144
install-vhook: videohook
145
	install -d "$(SHLIBDIR)/vhook"
146
	install -m 755 $(HOOKS) "$(SHLIBDIR)/vhook"
147

  
148
uninstall: uninstall-progs uninstall-data uninstall-man uninstall-vhook
109
uninstall: uninstall-progs uninstall-data uninstall-man
149 110

  
150 111
uninstall-progs:
151 112
	rm -f $(addprefix "$(BINDIR)/", $(ALLPROGS))
......
156 117
uninstall-man:
157 118
	rm -f $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
158 119

  
159
uninstall-vhook:
160
	rm -f $(addprefix "$(SHLIBDIR)/",$(ALLHOOKS_SRCS:.c=$(SLIBSUF)))
161
	-rmdir "$(SHLIBDIR)/vhook/"
162

  
163 120
testclean:
164 121
	rm -rf tests/vsynth1 tests/vsynth2 tests/data tests/asynth1.sw tests/*~
165 122

  
......
168 125
	rm -f doc/*.html doc/*.pod doc/*.1
169 126
	rm -f $(addprefix tests/,$(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr))
170 127
	rm -f $(addprefix tools/,$(addsuffix $(EXESUF),cws2fws pktdumper qt-faststart trasher))
171
	rm -f vhook/*.o vhook/*~ vhook/*.so vhook/*.dylib vhook/*.dll
172 128

  
173 129
distclean::
174
	rm -f version.h config.* vhook/*.d
130
	rm -f version.h config.*
175 131

  
176 132
# regression tests
177 133

  
......
355 311
	$(CC) $(FF_LDFLAGS) $(CFLAGS) -o $@ $< $(FF_EXTRALIBS)
356 312

  
357 313

  
358
.PHONY: lib videohook documentation *test regtest-* swscale-error zlib-error alltools check
359

  
360
-include $(VHOOK_DEPS)
314
.PHONY: lib documentation *test regtest-* swscale-error zlib-error alltools check

Also available in: Unified diff