mb qp limits
[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
abac6175 9CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavformat -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
4baca069 10LDFLAGS+= -g
37736979 11
980fc7b8 12ifeq ($(TARGET_GPROF),yes)
85f07f22
FB
13CFLAGS+=-p
14LDFLAGS+=-p
15endif
16
daf8e955
FB
17ifeq ($(CONFIG_WIN32),yes)
18EXE=.exe
19PROG=ffmpeg$(EXE)
20else
21EXT=
2744a37f 22PROG=ffmpeg ffplay ffserver
daf8e955 23endif
85f07f22 24
dfdfa47c
FR
25ifeq ($(CONFIG_AUDIO_BEOS),yes)
26EXTRALIBS+=-lmedia -lbe
27endif
a1b63811 28
0fd94442 29ifeq ($(BUILD_SHARED),yes)
abac6175 30DEP_LIBS=libavcodec/libavcodec.so libavformat/libavformat.a
0fd94442 31else
abac6175 32DEP_LIBS=libavcodec/libavcodec.a libavformat/libavformat.a
a6741398
J
33ifeq ($(CONFIG_MP3LAME),yes)
34EXTRALIBS+=-lmp3lame
35endif
81e0d0b4
MH
36ifeq ($(CONFIG_VORBIS),yes)
37EXTRALIBS+=-logg -lvorbis -lvorbisenc
38endif
0fd94442
NK
39endif
40
142fc6b9
PG
41ifeq ($(BUILD_VHOOK),yes)
42VHOOK=videohook
43INSTALLVHOOK=install-vhook
44CLEANVHOOK=clean-vhook
47930f09 45endif
142fc6b9 46
57514323
ZK
47OBJS = ffmpeg.o ffserver.o
48SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
49
142fc6b9 50all: lib $(PROG) $(VHOOK)
85f07f22
FB
51
52lib:
2cc8ae96 53 $(MAKE) -C libavcodec all
abac6175 54 $(MAKE) -C libavformat all
85f07f22 55
37736979 56ffmpeg_g$(EXE): ffmpeg.o $(DEP_LIBS)
abac6175 57 $(CC) $(LDFLAGS) -o $@ ffmpeg.o -L./libavcodec -L./libavformat \
a1b63811 58 -lavformat -lavcodec $(EXTRALIBS)
85f07f22 59
37736979 60ffmpeg$(EXE): ffmpeg_g$(EXE)
fcd43156 61 cp -p $< $@ ; $(STRIP) $@
37736979 62
a1b63811 63ffserver$(EXE): ffserver.o $(DEP_LIBS)
a43bd1d7 64 $(CC) $(LDFLAGS) $(FFSLDFLAGS) \
abac6175 65 -o $@ ffserver.o -L./libavcodec -L./libavformat \
9c938e77 66 -lavformat -lavcodec $(EXTRALIBS)
85f07f22 67
2744a37f
FB
68ffplay: ffmpeg$(EXE)
69 ln -sf $< $@
70
85f07f22 71%.o: %.c
daf8e955 72 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22 73
142fc6b9
PG
74videohook:
75 $(MAKE) -C vhook all
76
77install: all $(INSTALLVHOOK)
0fd94442 78 $(MAKE) -C libavcodec install
c1325d18 79 install -d $(prefix)/bin
980fc7b8 80 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 81 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22 82
142fc6b9
PG
83install-vhook: $(prefix)/lib/vhook
84 $(MAKE) -C vhook install INSTDIR=$(prefix)/lib/vhook
85
86$(prefix)/lib/vhook:
4baca069 87 install -d $@
142fc6b9 88
37736979
FB
89installlib:
90 $(MAKE) -C libavcodec installlib
abac6175 91 $(MAKE) -C libavformat installlib
37736979 92
57514323
ZK
93dep: depend
94
95depend:
96 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
97
142fc6b9 98clean: $(CLEANVHOOK)
2cc8ae96 99 $(MAKE) -C libavcodec clean
abac6175 100 $(MAKE) -C libavformat clean
dd9ca370 101 $(MAKE) -C tests clean
37736979 102 rm -f *.o *~ .depend gmon.out TAGS ffmpeg_g$(EXE) $(PROG)
85f07f22 103
142fc6b9
PG
104clean-vhook:
105 $(MAKE) -C vhook clean
106
85f07f22 107distclean: clean
c72c6d2d 108 $(MAKE) -C libavcodec distclean
980fc7b8 109 rm -f config.mak config.h
85f07f22
FB
110
111TAGS:
abac6175 112 etags *.[ch] libavformat/*.[ch] libavcodec/*.[ch]
57514323 113
dd9ca370
FB
114# regression tests
115
4c41db9a 116libavtest test mpeg4 mpeg: ffmpeg$(EXE)
9c938e77 117 $(MAKE) -C tests $@
dd9ca370 118
57514323
ZK
119ifneq ($(wildcard .depend),)
120include .depend
121endif