Statistics
| Branch: | Revision:

ffmpeg / Makefile @ dd9ca370

History | View | Annotate | Download (1.55 KB)

1
# Main ffmpeg Makefile
2
# (c) 2000, 2001, 2002 Gerard Lantau
3
#
4
include config.mak
5

    
6
VPATH=$(SRC_PATH)
7

    
8
CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libav
9
LDFLAGS= -g
10
ifeq ($(TARGET_GPROF),yes)
11
CFLAGS+=-p
12
LDFLAGS+=-p
13
endif
14

    
15
ifeq ($(CONFIG_WIN32),yes)
16
EXE=.exe
17
PROG=ffmpeg$(EXE)
18
else
19
EXT=
20
PROG=ffmpeg ffplay ffserver
21
endif
22

    
23
ifeq ($(BUILD_SHARED),yes)
24
FFMPEG_LIB=-Llibavcodec -lffmpeg
25
DEP_FFMPEG_LIB=
26
else
27
FFMPEG_LIB=libavcodec/libavcodec.a
28
DEP_FFMPEG_LIB=libavcodec/libavcodec.a
29
ifeq ($(CONFIG_MP3LAME),yes)
30
EXTRALIBS+=-lmp3lame
31
endif
32
endif
33

    
34
OBJS = ffmpeg.o ffserver.o
35
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
36

    
37
all: lib $(PROG)
38

    
39
lib:
40
	$(MAKE) -C libavcodec all
41
	$(MAKE) -C libav all
42

    
43
ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
44
	$(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
45

    
46
ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
47
	$(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
48

    
49
ffplay: ffmpeg$(EXE)
50
	ln -sf $< $@
51

    
52
%.o: %.c
53
	$(CC) $(CFLAGS) -c -o $@ $< 
54

    
55
install: all
56
	$(MAKE) -C libavcodec install
57
	install -s -m 755 $(PROG) $(prefix)/bin
58
	ln -sf ffmpeg $(prefix)/bin/ffplay 
59

    
60
dep:	depend
61

    
62
depend:
63
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
64

    
65
clean: 
66
	$(MAKE) -C libavcodec clean
67
	$(MAKE) -C libav clean
68
	$(MAKE) -C tests clean
69
	rm -f *.o *~ .depend gmon.out TAGS $(PROG) 
70

    
71
distclean: clean
72
	$(MAKE) -C libavcodec distclean
73
	rm -f config.mak config.h
74

    
75
TAGS:
76
	etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
77

    
78
# regression tests
79

    
80
test mpeg4 mpeg: ffmpeg$(EXE)
81
	make -C tests $@
82

    
83
ifneq ($(wildcard .depend),)
84
include .depend
85
endif