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