Move required libs after the object file for the shared lib compilation.
[libav.git] / vhook / Makefile
CommitLineData
26b4bb70
PG
1include ../config.mak
2
041514a4
DB
3VPATH=$(SRC_PATH)/vhook
4
7981555d
DB
5CFLAGS=-I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec \
6 -I$(SRC_PATH)/libavformat $(VHOOKCFLAGS) -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)
b2565d71 13 LDFLAGS_imlib2$(SLIBSUF) = -lImlib2
115329f1 14endif
26b4bb70 15
b90a6beb 16ifeq ($(HAVE_FREETYPE2),yes)
4e159595 17 HOOKS += drawtext$(SLIBSUF)
b90a6beb 18 CFLAGS += `freetype-config --cflags`
b2565d71 19 LDFLAGS_drawtext$(SLIBSUF) = `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)
84c22efd
DB
30 install -d "$(shlibdir)/vhook"
31 install -m 755 $(HOOKS) "$(shlibdir)/vhook"
26b4bb70 32
f9edb717 33uninstall:
84c22efd
DB
34 rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
35 -rmdir "$(shlibdir)/vhook/"
f9edb717 36
4e159595 37%$(SLIBSUF): %.o
529dd3c9 38 $(CC) $(LDFLAGS) -g -o $@ $(VHOOKSHFLAGS) $< $(LDFLAGS_$@)
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