Replace -I../-I. by -I$(BUILD_ROOT).
[ffmpeg.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 HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
10 ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
11
12 ifeq ($(HAVE_IMLIB2),yes)
13     HOOKS += imlib2$(SLIBSUF)
14     LIBS_imlib2$(SLIBSUF) = -lImlib2
15 endif
16
17 ifeq ($(HAVE_FREETYPE2),yes)
18     HOOKS += drawtext$(SLIBSUF)
19     CFLAGS += `freetype-config --cflags`
20     LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
21 endif
22
23 SRCS := $(HOOKS:$(SLIBSUF)=.c)
24
25 all: $(HOOKS)
26
27 depend dep: $(SRCS)
28         $(CC) -MM $(CFLAGS) $^ 1>.depend
29
30 install: $(HOOKS)
31         install -d "$(shlibdir)/vhook"
32         install -m 755 $(HOOKS) "$(shlibdir)/vhook"
33
34 uninstall:
35         rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
36         -rmdir "$(shlibdir)/vhook/"
37
38 %$(SLIBSUF): %.o
39         $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$@)
40
41 clean:
42         rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
43
44 distclean: clean
45         rm -f .depend
46
47 .PHONY: all depend dep clean distclean install* uninstall*
48
49 ifneq ($(wildcard .depend),)
50 include .depend
51 endif