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