use av memory handling functions
[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
57514323
ZK
32OBJS = ffmpeg.o ffserver.o
33SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
34
85f07f22
FB
35all: lib $(PROG)
36
37lib:
2cc8ae96
FB
38 $(MAKE) -C libavcodec all
39 $(MAKE) -C libav all
85f07f22 40
cabad2ad 41ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
c6a8f2ce 42 $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
85f07f22 43
cabad2ad 44ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
c6a8f2ce 45 $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
85f07f22 46
2744a37f
FB
47ffplay: ffmpeg$(EXE)
48 ln -sf $< $@
49
85f07f22 50%.o: %.c
daf8e955 51 $(CC) $(CFLAGS) -c -o $@ $<
85f07f22
FB
52
53install: all
0fd94442 54 $(MAKE) -C libavcodec install
980fc7b8 55 install -s -m 755 $(PROG) $(prefix)/bin
2744a37f 56 ln -sf ffmpeg $(prefix)/bin/ffplay
85f07f22 57
57514323
ZK
58dep: depend
59
60depend:
61 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
62
85f07f22 63clean:
2cc8ae96
FB
64 $(MAKE) -C libavcodec clean
65 $(MAKE) -C libav clean
1ac9248b 66 rm -f *.o *~ .depend gmon.out TAGS $(PROG)
85f07f22
FB
67
68distclean: clean
c72c6d2d 69 $(MAKE) -C libavcodec distclean
980fc7b8 70 rm -f config.mak config.h
85f07f22
FB
71
72TAGS:
73 etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
57514323
ZK
74
75ifneq ($(wildcard .depend),)
76include .depend
77endif