]> git.sesse.net Git - ffmpeg/blob - vhook/Makefile
compiling using nonstd include/library locations / add LDFLAGS to a few places patch...
[ffmpeg] / 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 -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H
6
7 ifeq ($(CONFIG_DARWIN),yes)
8 SHFLAGS+=-flat_namespace -undefined suppress
9 endif
10 HOOKS=null.so fish.so ppm.so watermark.so
11
12 ifeq ($(HAVE_IMLIB2),yes)
13     HOOKS += imlib2.so
14 endif    
15
16 ifeq ($(HAVE_FREETYPE2),yes)
17     HOOKS += drawtext.so
18     CFLAGS += `freetype-config --cflags`
19 endif    
20
21 all: $(HOOKS) 
22
23 SRCS := $(HOOKS:.so=.c)
24
25 depend: $(SRCS)
26         $(CC) -MM $(CFLAGS) $^ 1>.depend
27
28 install:
29         install -d "$(libdir)/vhook"
30         install -m 755 $(HOOKS) "$(libdir)/vhook"
31
32 imlib2.so: imlib2.o
33         $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
34
35 drawtext.so: drawtext.o
36         $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
37
38 %.so: %.o
39         $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
40
41 clean:
42         rm -f *.o *.d .depend *.so *~
43
44 ifneq ($(wildcard .depend),)
45 include .depend
46 endif