Statistics
| Branch: | Revision:

ffmpeg / vhook / Makefile @ 4e159595

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
ifeq ($(CONFIG_DARWIN),yes)
8
	SHFLAGS += -flat_namespace
9
endif
10
HOOKS=null$(SLIBSUF) fish$(SLIBSUF) ppm$(SLIBSUF) watermark$(SLIBSUF)
11

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

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

    
21
all: $(HOOKS) 
22

    
23
SRCS := $(HOOKS:$(SLIBSUF)=.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$(SLIBSUF): imlib2.o
33
	$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $< -lImlib2
34

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

    
38
%$(SLIBSUF): %.o
39
ifeq ($(CONFIG_DARWIN),yes)
40
	$(CC) $(LDFLAGS) $(SHFLAGS) -Wl,-install_name,$(libdir)/vhoook/$@ -g -o $@ $<
41
else
42
	$(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
43
endif
44

    
45
clean:
46
	rm -f *.o *.d .depend *$(SLIBSUF) *~
47

    
48
ifneq ($(wildcard .depend),)
49
include .depend
50
endif