Commit | Line | Data |
---|---|---|
26b4bb70 PG |
1 | include ../config.mak |
2 | ||
041514a4 DB |
3 | VPATH=$(SRC_PATH)/vhook |
4 | ||
7981555d DB |
5 | CFLAGS=-I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec \ |
6 | -I$(SRC_PATH)/libavformat $(VHOOKCFLAGS) -DHAVE_AV_CONFIG_H | |
ca373eb7 | 7 | LDFLAGS+= -g |
26b4bb70 | 8 | |
4e159595 | 9 | HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF) |
302cdccf | 10 | ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF) |
26b4bb70 PG |
11 | |
12 | ifeq ($(HAVE_IMLIB2),yes) | |
4e159595 | 13 | HOOKS += imlib2$(SLIBSUF) |
3c573748 | 14 | LIBS_imlib2$(SLIBSUF) = -lImlib2 |
115329f1 | 15 | endif |
26b4bb70 | 16 | |
b90a6beb | 17 | ifeq ($(HAVE_FREETYPE2),yes) |
4e159595 | 18 | HOOKS += drawtext$(SLIBSUF) |
b90a6beb | 19 | CFLAGS += `freetype-config --cflags` |
3c573748 | 20 | LIBS_drawtext$(SLIBSUF) = `freetype-config --libs` |
115329f1 | 21 | endif |
b90a6beb | 22 | |
4e159595 | 23 | SRCS := $(HOOKS:$(SLIBSUF)=.c) |
7c235fe2 | 24 | |
302cdccf DB |
25 | all: $(HOOKS) |
26 | ||
91d742b7 | 27 | depend: $(SRCS) |
7c235fe2 | 28 | $(CC) -MM $(CFLAGS) $^ 1>.depend |
77b71ddc | 29 | |
a11a334d | 30 | install: $(HOOKS) |
84c22efd DB |
31 | install -d "$(shlibdir)/vhook" |
32 | install -m 755 $(HOOKS) "$(shlibdir)/vhook" | |
26b4bb70 | 33 | |
f9edb717 | 34 | uninstall: |
84c22efd DB |
35 | rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS)) |
36 | -rmdir "$(shlibdir)/vhook/" | |
f9edb717 | 37 | |
4e159595 | 38 | %$(SLIBSUF): %.o |
fbb9d104 | 39 | $(CC) $(LDFLAGS) -o $@ $(VHOOKSHFLAGS) $< $(VHOOKLIBS) $(LIBS_$@) |
26b4bb70 | 40 | |
26b4bb70 | 41 | clean: |
98013cc1 DB |
42 | rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll |
43 | ||
44 | distclean: clean | |
04c07634 | 45 | rm -f .depend |
7c235fe2 FB |
46 | |
47 | ifneq ($(wildcard .depend),) | |
48 | include .depend | |
49 | endif |