* using some small char buffer - needed for sprintf
[libav.git] / Makefile
CommitLineData
85f07f22
FB
1# Main ffmpeg Makefile
2# (c) 2000, 2001 Gerard Lantau
3#
980fc7b8 4include config.mak
85f07f22 5
8d75673b
J
6CFLAGS= $(OPTFLAGS) -Wall -g -I./libavcodec -I./libav
7LDFLAGS= -g
980fc7b8 8ifeq ($(TARGET_GPROF),yes)
85f07f22
FB
9CFLAGS+=-p
10LDFLAGS+=-p
11endif
12
daf8e955
FB
13ifeq ($(CONFIG_WIN32),yes)
14EXE=.exe
15PROG=ffmpeg$(EXE)
16else
17EXT=
2744a37f 18PROG=ffmpeg ffplay ffserver
daf8e955 19endif
85f07f22 20
0fd94442
NK
21ifeq ($(BUILD_SHARED),yes)
22FFMPEG_LIB=-Llibavcodec -lffmpeg
cabad2ad 23DEP_FFMPEG_LIB=
0fd94442
NK
24else
25FFMPEG_LIB=libavcodec/libavcodec.a
cabad2ad 26DEP_FFMPEG_LIB=libavcodec/libavcodec.a
a6741398
J
27ifeq ($(CONFIG_MP3LAME),yes)
28EXTRALIBS+=-lmp3lame
29endif
0fd94442
NK
30endif
31
85f07f22
FB
32all: lib $(PROG)
33
34lib:
2cc8ae96
FB
35 $(MAKE) -C libavcodec all
36 $(MAKE) -C libav all
85f07f22 37
cabad2ad 38ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
ef0bc4c9 39 $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
85f07f22 40
cabad2ad 41ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
ef0bc4c9 42 $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
85f07f22 43
2744a37f
FB
44ffplay: ffmpeg$(EXE)
45 ln -sf $< $@
46
85f07f22 47%.o: %.c
daf8e955 48 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
49
50install: all
0fd94442 51 $(MAKE) -C libavcodec install
980fc7b8 52 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 53 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22
FB
54
55clean:
2cc8ae96
FB
56 $(MAKE) -C libavcodec clean
57 $(MAKE) -C libav clean
85f07f22
FB
58 rm -f *.o *~ gmon.out TAGS $(PROG)
59
60distclean: clean
c72c6d2d 61 $(MAKE) -C libavcodec distclean
980fc7b8 62 rm -f config.mak config.h
85f07f22
FB
63
64TAGS:
65 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]