Fix DESTDIR handling. DESTDIR got prepended twice for $(DESTDIR)$libdir
[libav.git] / vhook / Makefile
CommitLineData
26b4bb70
PG
1include ../config.mak
2
b55e4ef4
PG
3VPATH=$(SRC_PATH)/vhook
4
f130fd46
DB
5CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat \
6 -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
26b4bb70 7
4e159595 8HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
302cdccf 9ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
26b4bb70
PG
10
11ifeq ($(HAVE_IMLIB2),yes)
4e159595 12 HOOKS += imlib2$(SLIBSUF)
a11d5f50 13 LDFLAGS += -lImlib2
115329f1 14endif
26b4bb70 15
b90a6beb 16ifeq ($(HAVE_FREETYPE2),yes)
4e159595 17 HOOKS += drawtext$(SLIBSUF)
b90a6beb 18 CFLAGS += `freetype-config --cflags`
a11d5f50 19 LDFLAGS += `freetype-config --libs`
115329f1 20endif
b90a6beb 21
4e159595 22SRCS := $(HOOKS:$(SLIBSUF)=.c)
7c235fe2 23
302cdccf
DB
24all: $(HOOKS)
25
91d742b7 26depend: $(SRCS)
7c235fe2 27 $(CC) -MM $(CFLAGS) $^ 1>.depend
77b71ddc 28
a11a334d 29install: $(HOOKS)
cc973ecb
LB
30 install -d "$(libdir)/vhook"
31 install -m 755 $(HOOKS) "$(libdir)/vhook"
26b4bb70 32
f9edb717
DB
33uninstall:
34 rm -f $(addprefix $(libdir)/vhook/,$(ALLHOOKS))
35 -rmdir "$(libdir)/vhook/"
36
4e159595 37%$(SLIBSUF): %.o
3409385d 38 $(CC) $(LDFLAGS) -g -o $@ $(VHOOKFLAGS) $<
26b4bb70 39
26b4bb70 40clean:
98013cc1
DB
41 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
42
43distclean: clean
04c07634 44 rm -f .depend
7c235fe2
FB
45
46ifneq ($(wildcard .depend),)
47include .depend
48endif