5b68b43d091aa486ccd01ca9a2f32e54c344ff96
[ffmpeg.git] / vhook / Makefile
1 include ../config.mak
2
3 CFLAGS=$(VHOOKCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat \
4        -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
5
6 HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
7 ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
8
9 ifeq ($(HAVE_IMLIB2),yes)
10     HOOKS += imlib2$(SLIBSUF)
11     LDFLAGS += -lImlib2
12 endif
13
14 ifeq ($(HAVE_FREETYPE2),yes)
15     HOOKS += drawtext$(SLIBSUF)
16     CFLAGS += `freetype-config --cflags`
17     LDFLAGS += `freetype-config --libs`
18 endif
19
20 SRCS := $(HOOKS:$(SLIBSUF)=.c)
21
22 all: $(HOOKS)
23
24 depend: $(SRCS)
25         $(CC) -MM $(CFLAGS) $^ 1>.depend
26
27 install: $(HOOKS)
28         install -d "$(shlibdir)/vhook"
29         install -m 755 $(HOOKS) "$(shlibdir)/vhook"
30
31 uninstall:
32         rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
33         -rmdir "$(shlibdir)/vhook/"
34
35 %$(SLIBSUF): %.o
36         $(CC) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $<
37
38 clean:
39         rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
40
41 distclean: clean
42         rm -f .depend
43
44 ifneq ($(wildcard .depend),)
45 include .depend
46 endif