divx5 draw_edges bugfix
[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
0fd94442
NK
27endif
28
85f07f22
FB
29all: lib $(PROG)
30
31lib:
2cc8ae96
FB
32 $(MAKE) -C libavcodec all
33 $(MAKE) -C libav all
85f07f22 34
cabad2ad 35ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
ef0bc4c9 36 $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
85f07f22 37
cabad2ad 38ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
ef0bc4c9 39 $(CC) $(LDFLAGS) $(EXTRALIBS) -o $@ $^ $(FFMPEG_LIB)
85f07f22 40
2744a37f
FB
41ffplay: ffmpeg$(EXE)
42 ln -sf $< $@
43
85f07f22 44%.o: %.c
daf8e955 45 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
46
47install: all
0fd94442 48 $(MAKE) -C libavcodec install
980fc7b8 49 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 50 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22
FB
51
52clean:
2cc8ae96
FB
53 $(MAKE) -C libavcodec clean
54 $(MAKE) -C libav clean
85f07f22
FB
55 rm -f *.o *~ gmon.out TAGS $(PROG)
56
57distclean: clean
c72c6d2d 58 $(MAKE) -C libavcodec distclean
980fc7b8 59 rm -f config.mak config.h
85f07f22
FB
60
61TAGS:
62 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]