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