Simplify vhook build.
[libav.git] / vhook / Makefile
CommitLineData
26b4bb70
PG
1include ../config.mak
2
b55e4ef4
PG
3VPATH=$(SRC_PATH)/vhook
4
c11c2bc2 5CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
26b4bb70 6
fb3d46da 7#FIXME: This needs to be in configure/config.mak
47930f09 8ifeq ($(CONFIG_DARWIN),yes)
fb3d46da 9 SHFLAGS = -dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(libdir)/vhook/$@
47930f09 10endif
4e159595 11HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
26b4bb70
PG
12
13ifeq ($(HAVE_IMLIB2),yes)
4e159595 14 HOOKS += imlib2$(SLIBSUF)
a11d5f50 15 LDFLAGS += -lImlib2
115329f1 16endif
26b4bb70 17
b90a6beb 18ifeq ($(HAVE_FREETYPE2),yes)
4e159595 19 HOOKS += drawtext$(SLIBSUF)
b90a6beb 20 CFLAGS += `freetype-config --cflags`
a11d5f50 21 LDFLAGS += `freetype-config --libs`
115329f1 22endif
b90a6beb 23
115329f1 24all: $(HOOKS)
26b4bb70 25
4e159595 26SRCS := $(HOOKS:$(SLIBSUF)=.c)
7c235fe2 27
91d742b7 28depend: $(SRCS)
7c235fe2 29 $(CC) -MM $(CFLAGS) $^ 1>.depend
77b71ddc 30
a11a334d 31install: $(HOOKS)
cc973ecb
LB
32 install -d "$(libdir)/vhook"
33 install -m 755 $(HOOKS) "$(libdir)/vhook"
26b4bb70 34
4e159595 35%$(SLIBSUF): %.o
56b04ceb 36 $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
26b4bb70 37
26b4bb70 38clean:
98013cc1
DB
39 rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
40
41distclean: clean
04c07634 42 rm -f .depend
7c235fe2
FB
43
44ifneq ($(wildcard .depend),)
45include .depend
46endif