Make ppm vhook depend on fork()
[libav.git] / vhook / Makefile
CommitLineData
26b4bb70
PG
1include ../config.mak
2
997baf01 3VPATH=$(SRC_PATH_BARE)/vhook
041514a4 4
cbeee4d8 5CFLAGS=-I$(BUILD_ROOT) -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec \
a163ed1a 6 -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libswscale $(VHOOKCFLAGS) -DHAVE_AV_CONFIG_H
ca373eb7 7LDFLAGS+= -g
26b4bb70 8
4f3da985
RP
9HOOKS=null$(SLIBSUF) fish$(SLIBSUF) watermark$(SLIBSUF)
10ALLHOOKS=$(HOOKS) ppm$(SLIBSUF) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
11
12ifeq ($(HAVE_FORK),yes)
13 HOOKS += ppm$(SLIBSUF)
14endif
26b4bb70
PG
15
16ifeq ($(HAVE_IMLIB2),yes)
4e159595 17 HOOKS += imlib2$(SLIBSUF)
1b45e304
VP
18 CFLAGS += `imlib2-config --cflags`
19 LIBS_imlib2$(SLIBSUF) = `imlib2-config --libs`
115329f1 20endif
26b4bb70 21
b90a6beb 22ifeq ($(HAVE_FREETYPE2),yes)
4e159595 23 HOOKS += drawtext$(SLIBSUF)
b90a6beb 24 CFLAGS += `freetype-config --cflags`
3c573748 25 LIBS_drawtext$(SLIBSUF) = `freetype-config --libs`
115329f1 26endif
b90a6beb 27
4e159595 28SRCS := $(HOOKS:$(SLIBSUF)=.c)
7c235fe2 29
302cdccf
DB
30all: $(HOOKS)
31
220d2d82 32depend dep: $(SRCS)
7c235fe2 33 $(CC) -MM $(CFLAGS) $^ 1>.depend
77b71ddc 34
a11a334d 35install: $(HOOKS)
84c22efd
DB
36 install -d "$(shlibdir)/vhook"
37 install -m 755 $(HOOKS) "$(shlibdir)/vhook"
26b4bb70 38
f9edb717 39uninstall:
84c22efd
DB
40 rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
41 -rmdir "$(shlibdir)/vhook/"
f9edb717 42
4e159595 43%$(SLIBSUF): %.o
fbb9d104 44 $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$@)
26b4bb70 45
26b4bb70 46clean:
b8d40825 47 rm -f *.o *~ *.a *.lib *.so *.dylib *.dll
98013cc1
DB
48
49distclean: clean
04c07634 50 rm -f .depend
7c235fe2 51
3263626f
DB
52.PHONY: all depend dep clean distclean install* uninstall*
53
78645c98 54-include .depend