Statistics
| Branch: | Revision:

ffmpeg / vhook / Makefile @ 5509bffa

History | View | Annotate | Download (1.11 KB)

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 -I$(SRC_PATH)/libavutil -DHAVE_AV_CONFIG_H
6

    
7
#FIXME: This needs to be in configure/config.mak
8
ifeq ($(CONFIG_DARWIN),yes)
9
	SHFLAGS = -dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(libdir)/vhook/$@
10
endif
11
HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
12

    
13
ifeq ($(HAVE_IMLIB2),yes)
14
    HOOKS += imlib2$(SLIBSUF)
15
endif
16

    
17
ifeq ($(HAVE_FREETYPE2),yes)
18
    HOOKS += drawtext$(SLIBSUF)
19
    CFLAGS += `freetype-config --cflags`
20
endif
21

    
22
all: $(HOOKS)
23

    
24
SRCS := $(HOOKS:$(SLIBSUF)=.c)
25

    
26
depend: $(SRCS)
27
	$(CC) -MM $(CFLAGS) $^ 1>.depend
28

    
29
install:
30
	install -d "$(libdir)/vhook"
31
	install -m 755 $(HOOKS) "$(libdir)/vhook"
32

    
33
imlib2$(SLIBSUF): imlib2.o
34
	$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
35

    
36
drawtext$(SLIBSUF): drawtext.o
37
	$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< `freetype-config --libs`
38

    
39
%$(SLIBSUF): %.o
40
	$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
41

    
42
clean:
43
	rm -f *.o *.d .depend *$(SLIBSUF) *~
44

    
45
ifneq ($(wildcard .depend),)
46
include .depend
47
endif