added proposed API for parse_only mode to extract compressed frames from compressed...
[libav.git] / Makefile
CommitLineData
a1b63811 1#
85f07f22 2# Main ffmpeg Makefile
a1b63811 3# (c) 2000, 2001, 2002 Fabrice Bellard
85f07f22 4#
980fc7b8 5include config.mak
85f07f22 6
dd9ca370
FB
7VPATH=$(SRC_PATH)
8
eddbd7e5 9CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libav -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
8d75673b 10LDFLAGS= -g
980fc7b8 11ifeq ($(TARGET_GPROF),yes)
85f07f22
FB
12CFLAGS+=-p
13LDFLAGS+=-p
14endif
15
daf8e955
FB
16ifeq ($(CONFIG_WIN32),yes)
17EXE=.exe
18PROG=ffmpeg$(EXE)
19else
20EXT=
2744a37f 21PROG=ffmpeg ffplay ffserver
daf8e955 22endif
85f07f22 23
a1b63811 24
0fd94442 25ifeq ($(BUILD_SHARED),yes)
a1b63811 26DEP_LIBS=libavcodec/libavcodec.so libav/libavformat.a
0fd94442 27else
a1b63811 28DEP_LIBS=libavcodec/libavcodec.a libav/libavformat.a
a6741398
J
29ifeq ($(CONFIG_MP3LAME),yes)
30EXTRALIBS+=-lmp3lame
31endif
0fd94442
NK
32endif
33
57514323
ZK
34OBJS = ffmpeg.o ffserver.o
35SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
36
85f07f22
FB
37all: lib $(PROG)
38
39lib:
2cc8ae96
FB
40 $(MAKE) -C libavcodec all
41 $(MAKE) -C libav all
85f07f22 42
a1b63811
FB
43ffmpeg$(EXE): ffmpeg.o $(DEP_LIBS)
44 $(CC) $(LDFLAGS) -o $@ ffmpeg.o -L./libavcodec -L./libav \
45 -lavformat -lavcodec $(EXTRALIBS)
85f07f22 46
a1b63811
FB
47ffserver$(EXE): ffserver.o $(DEP_LIBS)
48 $(CC) $(LDFLAGS) -o $@ ffserver.o -L./libavcodec -L./libav \
49 -lavformat -lavcodec $(EXTRALIBS)
85f07f22 50
2744a37f
FB
51ffplay: ffmpeg$(EXE)
52 ln -sf $< $@
53
85f07f22 54%.o: %.c
daf8e955 55 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
56
57install: all
0fd94442 58 $(MAKE) -C libavcodec install
980fc7b8 59 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 60 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22 61
57514323
ZK
62dep: depend
63
64depend:
65 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
66
85f07f22 67clean:
2cc8ae96
FB
68 $(MAKE) -C libavcodec clean
69 $(MAKE) -C libav clean
dd9ca370 70 $(MAKE) -C tests clean
1ac9248b 71 rm -f *.o *~ .depend gmon.out TAGS $(PROG)
85f07f22
FB
72
73distclean: clean
c72c6d2d 74 $(MAKE) -C libavcodec distclean
980fc7b8 75 rm -f config.mak config.h
85f07f22
FB
76
77TAGS:
78 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
57514323 79
dd9ca370
FB
80# regression tests
81
4c41db9a 82libavtest test mpeg4 mpeg: ffmpeg$(EXE)
dd9ca370
FB
83 make -C tests $@
84
57514323
ZK
85ifneq ($(wildcard .depend),)
86include .depend
87endif