add more info about new configure features
[libav.git] / Makefile
CommitLineData
85f07f22 1# Main ffmpeg Makefile
dd9ca370 2# (c) 2000, 2001, 2002 Gerard Lantau
85f07f22 3#
980fc7b8 4include config.mak
85f07f22 5
dd9ca370
FB
6VPATH=$(SRC_PATH)
7
8CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libav
8d75673b 9LDFLAGS= -g
980fc7b8 10ifeq ($(TARGET_GPROF),yes)
85f07f22
FB
11CFLAGS+=-p
12LDFLAGS+=-p
13endif
14
daf8e955
FB
15ifeq ($(CONFIG_WIN32),yes)
16EXE=.exe
17PROG=ffmpeg$(EXE)
18else
19EXT=
2744a37f 20PROG=ffmpeg ffplay ffserver
daf8e955 21endif
85f07f22 22
0fd94442
NK
23ifeq ($(BUILD_SHARED),yes)
24FFMPEG_LIB=-Llibavcodec -lffmpeg
cabad2ad 25DEP_FFMPEG_LIB=
0fd94442
NK
26else
27FFMPEG_LIB=libavcodec/libavcodec.a
cabad2ad 28DEP_FFMPEG_LIB=libavcodec/libavcodec.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
cabad2ad 43ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
c6a8f2ce 44 $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
85f07f22 45
cabad2ad 46ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
c6a8f2ce 47 $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
85f07f22 48
2744a37f
FB
49ffplay: ffmpeg$(EXE)
50 ln -sf $< $@
51
85f07f22 52%.o: %.c
daf8e955 53 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
54
55install: all
0fd94442 56 $(MAKE) -C libavcodec install
980fc7b8 57 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 58 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22 59
57514323
ZK
60dep: depend
61
62depend:
63 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
64
85f07f22 65clean:
2cc8ae96
FB
66 $(MAKE) -C libavcodec clean
67 $(MAKE) -C libav clean
dd9ca370 68 $(MAKE) -C tests clean
1ac9248b 69 rm -f *.o *~ .depend gmon.out TAGS $(PROG)
85f07f22
FB
70
71distclean: clean
c72c6d2d 72 $(MAKE) -C libavcodec distclean
980fc7b8 73 rm -f config.mak config.h
85f07f22
FB
74
75TAGS:
76 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
57514323 77
dd9ca370
FB
78# regression tests
79
4c41db9a 80libavtest test mpeg4 mpeg: ffmpeg$(EXE)
dd9ca370
FB
81 make -C tests $@
82
57514323
ZK
83ifneq ($(wildcard .depend),)
84include .depend
85endif