cosmetics: Reorder some entries for more consistency and readability.
[ffmpeg.git] / vhook / Makefile
1 include ../config.mak
2
3 VPATH=$(SRC_PATH)/vhook
4
5 CFLAGS=-fPIC $(SHCFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavformat \
6        -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
7
8 #FIXME: This needs to be in configure/config.mak
9 ifeq ($(CONFIG_DARWIN),yes)
10         SHFLAGS = -dynamiclib -Wl,-single_module -flat_namespace \
11                   -undefined suppress -Wl,-install_name,$(libdir)/vhook/$@
12 endif
13
14 HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
15 ALLHOOKS=$(HOOKS) imlib2$(SLIBSUF) drawtext$(SLIBSUF)
16
17 ifeq ($(HAVE_IMLIB2),yes)
18     HOOKS += imlib2$(SLIBSUF)
19     LDFLAGS += -lImlib2
20 endif
21
22 ifeq ($(HAVE_FREETYPE2),yes)
23     HOOKS += drawtext$(SLIBSUF)
24     CFLAGS += `freetype-config --cflags`
25     LDFLAGS += `freetype-config --libs`
26 endif
27
28 SRCS := $(HOOKS:$(SLIBSUF)=.c)
29
30 all: $(HOOKS)
31
32 depend: $(SRCS)
33         $(CC) -MM $(CFLAGS) $^ 1>.depend
34
35 install: $(HOOKS)
36         install -d "$(libdir)/vhook"
37         install -m 755 $(HOOKS) "$(libdir)/vhook"
38
39 uninstall:
40         rm -f $(addprefix $(libdir)/vhook/,$(ALLHOOKS))
41         -rmdir "$(libdir)/vhook/"
42
43 %$(SLIBSUF): %.o
44         $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
45
46 clean:
47         rm -f *.o *.d *~ *.a *.lib *.so *.dylib *.dll
48
49 distclean: clean
50         rm -f .depend
51
52 ifneq ($(wildcard .depend),)
53 include .depend
54 endif